Don't leave the variable uninitialized, even though it's not totally obvious
which value should it have for wxFontRefData objects created from native
fonts, using "true" seems more appropriate and is definitely better than not
initializing the field at all.
The generic implementation requires wxComboCtrl, so pull it in if
wxDatePickerCtrl is enabled.
Explicitly testing for the platform here is ugly, as it duplicates the checks
in wx/datectrl.h and will get out of date when/if they're changed there, but
there just doesn't seem to be any other way.
See #17159.
If WX_STANDARD_OPTIONS() is not used, we shouldn't add any debugging nor
optimization options to C{,XX}FLAGS as the application presumably handles it
on its own, it was completely unexpected to see -O2 appear in CXXFLAGS.
Fix this by only doing anything if DEBUG variable is defined. Even this is not
optimal as it's such a common name that it could clash with an unrelated
variable in the application configure script, but doing anything else risks
breaking existing scripts relying on it being named like this.
Remove the private and undocumented control and it's usage in wxGenericCollapsiblePane. The class used a low resolution bitmap which looks bad on high resolution displays. The generic implementation using wxRendererNative::DrawCollapseButton() is better fit even on OS X.
This simple class has a collapsed state which is indicated by a small button and a label. It is now used in the generic implementation of wxCollapsiblePane.
It could be used in more complex layouts than wxCollapsiblePane and is therefore available and documented to the user.
There doesn't seem to be any need for it, the library compiles fine without it
and the few warnings generated with -Wstrict-aliasing=2 are harmless (i.e. the
strict aliasing rule is not really broken).
While wxWidgets itself is compiled with -fno-strict-aliasing, the user code
including wx headers can be compiled without it and, worse, even with
-Wstrict-aliasing=2 which would give tons of warnings (two for each
instantiation of the template class) of possibly breaking strict aliasing rule.
Fix this by using a union to cast between two pointers of different types
instead of using a reinterpret cast.
Add a new method that should be used for controls like wxCollapsiblePane.
It is implemented natively for wxMSW (Windows Vista+) and provides a generic fallback for other ports and WinXP.
wxSystemThemedControl allows to use the "system theme" (i.e. the theme used by
the system applications such as file manager and which can, surprisingly, be
different from the default one). Currently it is only implemented for wxMSW
and does nothing under the other platforms.
Use wxSystemThemedControl for wxDataViewCtrl, wxListCtrl and, optionally, if
wxTR_TWIST_BUTTONS style is specified, wxTreeCtrl to give them more native
appearance under MSW.
Closes#16414.
Add a new method that should be used for drawing the elements of list-like
controls (i.e. wx{List,Tree,DataView}Ctrl and similar).
Implement it for wxMSW natively and provide a straightforward generic fallback
for the other ports.
See #16414.
Use pango_font_description_copy() to copy fonts instead of
pango_font_description_to_string() and pango_font_description_from_string()
via wxNativeFontInfo::{To,From}String() respectively.
This is not only more efficient but also preserves the original family whereas
wxNativeFontInfo::FromString() helpfully replaces any fonts it doesn't know
about with the normal font name. That behaviour is probably wrong on its own,
but for now at least avoid silently changing fonts when copying them.
Don't interpret them relatively to the current path, so that an URL like
"/pictures/foo.png" in the file "/webpages/bar.html" is resolved correctly and
not as "/webpages/pictures/foo.png" as it was previously.
See #17148.
Dragging the mouse (even accidentally by a pixel or two) resulted in a
confusing "Unknown event" line in the log, so don't log these messages neither
just as we already don't log the mouse motion events.
On wxGTK, wxFileDataObject::SetData calls g_filename_from_uri which
percent-decodes URIs. No corresponding percent-encoding was done in
wxFileDataObject::GetDataSize/GetDataHere. Use g_filename_to_uri instead in so
that filenames are properly escaped.
This commit also fixes the data being truncated if it contains non-ASCII
characters on wide-character builds, see the memcpy arguments in the original
code.
Sibling windows (like labels and radio buttons) need to be explicitly
refreshed when foreground or background colour is changed. This is implemented
by invoking newly implemented method wxSubwindows::Refresh every time the
colour of the control is changed.
Note: Setting foreground colour of wxRadioBox still doesn't work correctly
when themes are enabled.
Closes#17142.
When using Whole Program Optimization, pItem->OnDrawItem() incorrectly calls the
base class wxOwnerDrawn::OnDrawItem() instead of the appropriate override, for
example wxCheckListBoxItem::OnDrawItem(). The problem can be avoided by not
using an unnecessary cast to wxListBoxItem*.
Make scrolling upwards (positive delta) go to the past (i.e. decrease the
date) for consistency with the native calendar controls.
See 50daf1feab (commitcomment-13087042)
Mimics the scrolling behaviour of native MSW and GTK calendars by allowing to
increment/decrement the month by scrolling anywhere on the generic calendar.
Additionally, use horizontal scrolling to increment/decrement the year.
Closes https://github.com/wxWidgets/wxWidgets/pull/88
Allow to disable maximize and minimize buttons dynamically just as we already
allow to disable the "Close" button using EnableCloseButton().
Currently implemented for MSW and OSX only.
Closes#17133.