This method can be used to change the list view header appearance.
Add the method declaration, documentation, show it in the sample and implement
it for wxMSW (only, for now).
It can be necessary to compare two item attributes for equality, e.g. to check
if the attributes have changed, so provide a straightforward implementation of
equality and inequality operator for it.
Add a helper wxMSWImpl::CustomDraw class which will be reused in the other
places too and, for now, use it just to implement support for custom colours
in wxHeaderCtrl.
Notice that the control took care of the custom font on its anyhow and that
background colour is ignored when themes are enabled, so the net effect of
this change is that now changing the header foreground colour works, while
it was ignored before.
The two existing structs were completely identical, just replace them with a
single wxItemAttr.
Notice that wxDataViewItemAttr is not quite the same, although pretty similar,
so it remains separate for now. It would be nice to combine it with this one
too in the future, e.g. to make it simpler to make items bold in a wxListCtrl.
Unlike the other operators, we comparing for equality has a well-defined
semantics even for invalid objects, so there doesn't seem any reason to not
allow it.
Avoid duplicating the same code, even if it's trivial, in both places.
Notice that these functions are implemented in terms of operators and not vice
versa because we have no functions corresponding to operator<=() or
operator>=().
The code in QueryBgBitmap() and MSWPrintChild() is sufficiently different that
we can't easily reuse the drawing calls between them, so don't tie ourselves
in knots trying to do it, just duplicating these 2 calls in the 2 functions is
not that bad and the code is more clear.
No real changes.
Don't define BeginRepositioningChildren() and EndRepositioningChildren() at
all in this case instead of defining them as "do nothing" functions because
BeginRepositioningChildren() still needs to return a bool, so the old code
didn't compile and we would need to add another "#else" to fix this -- instead
make it simpler by just not compiling at all in this case.
Return the size of the entire virtual screen, possibly composed from multiple
monitors, rather than just the size of the primary monitor.
This makes this method consistent with wxScreenDC actually representing the
entire virtual screen and not just the primary monitor and also with wxGTK.
Closes#13279.
There is nothing we can do about these (harmless) warnings, so just
disable them. Also make sure that the header is included via
wx/msw/wrapshl.h everywhere.
Expand() called ExpandAncestors() in the generic wxDataViewCtrl implementation
but not in the native ones, resulting in observable difference in the
behaviour: for example, the wxDataViewTreeCtrl in the dataview sample appeared
initially expanded under MSW, using the generic version, but collapsed under
GTK and OSX.
Harmonize this among all ports. This also has a nice side effect of making
Expand() less horribly inefficient as it is not recursively called by
ExpandAncestors() which it itself used to call: now ExpandAncestors() only
calls DoExpand() which is a simple function that only expands the item passed
to it and does nothing else.
Closes#14803.
Take care of all the common stuff such as setting the event object and the
model, which is used for all events, in the ctor. Also set both the column
pointer and the column index at once instead of having two separate setters
for them which could result in inconsistent event objects (and did, as
sometimes only one or only the other field was set).
This makes the code shorter (we save 160 lines) and more clear and ensures
that everything is always initialized.
Closes#12649.
Caching the best column widths broke autosizing behaviour if the column title
was updated after setting the width to wxCOL_WIDTH_AUTOSIZE.
Fix this by invaliding the column cached width if its text changes.
This class can be used even without SEH, provided debug help API is available,
so just make wxUSE_STACKWALKER dependent on wxUSE_DBGHELP instead of
unconditionally disabling it if SEH support is not available.
MinGW64 and TDM-GCC come with imagehlp.h and can compile the code using debug
help API too, so enable wxUSE_DBGHELP when using these compilers by default
and also allow enabling it via a configure option.
Don't rely on wx/string.h being already included, but include it explicitly
ourselves to fix compilation error when wx/stackwalk.h is the first wx header
to be included.
UpdateColumnSizes() was called whenever the control was modified in any way
since 4156e1a5c9 and it refreshed the entire
last column even if absolutely nothing changed.
Don't do this unless the last column width has really changed.
Avoid calling UpdateDisplay() unnecessarily if the column width didn't really
change. This doesn't result in anything really bad happening right now, but it
could easily result in an infinite stream of updates if the code were only
slightly different and it just seems useless to do it.
Contrary to the documentation, this method only existed in the generic
control, add it to the base class now so that the code using it could compile
when using the native ports too.
There doesn't seem to be any reason for this method to be virtual other than
preventing "virtual function hiding" warnings from gcc, so just rename it to
have a different name than the virtual EnsureVisible() inherited from the base
class instead.
Mark the overridden virtual functions as being overridden.
Also reformat some methods to put them on several lines to prevent the lines
from becoming way too long.
Changes of d053a90486 only updated the generated
wx/msw/setup0.h file but not the file wx/msw/setup_inc.h from which it is
generated and so would have been lost after the next modification to the
latter.
Modify the latter one too to ensure that the changes stick.
See https://github.com/wxWidgets/wxWidgets/pull/238
These grid table requests seem to have been never used and were not doing much
in wxGrid neither, moreover they were never documented, so just stop
supporting them.
Add XRC handler for wxAuiManager and include the existing wxAuiNotebook
handler into it (but notice that wxAuiToolBar handler added by a later #15686
in f269f868d7 remains separate).
Also update the AUI dialog in the sample and stop hardcoding its size in
pixels.
See #13520.
Make wxHyperlinkCtrl ctors non-inline to work around an error about incomplete
wxHyperlinkCtrlColData in the inline ctor body with this compiler (but not
with g++ 4.9 nor 5.3, somehow).
Closes#17089.