This makes the code slightly simpler (no more need for the scope guard) and
avoids memory leaks when not using wxEntry() (but calling wxEntryStart()
instead).
Closes#16664.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is done in preparation for adding a new wxCursor method and will allow us
to define it in a single place by default instead of having to provide stubs
for all ports.
See #16539.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This ensures that we never forget to delete the handles returned by
GetIconInfo() and also centralizes the error message given if it fails in a
single place.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This was supposed to be done in r78066, but after introducing this new
wxUSE_XXX symbol I forgot to actually use it in the place it was intended to
be used.
Fixes compilation with wxUSE_STD_DEFAULT==0 and closes#16673.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These events are supposed to carry a pointer to the menu which was opened or
closed, but wxMenuEvent::GetMenu() always returned NULL for the menus opened
when a child MDI frame was active, as its menu bar, containing the menu, was
not searched for it.
Fix this by overriding MSWFindMenuFromHMENU() at wxMDIParentFrame level, just
as we already do for FindItemInMenuBar().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Show the menu associated with the event, if any, directly in the sample to
make comparing the behaviour of the different ports easier.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add the bitmap margins to the bitmap size, not the total button size.
This fixes the buttons becoming unnecessarily tall as soon as they were
assigned even a tiny bitmap.
Closes#16536.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The comment didn't correspond to the code since the changes of r62842, the
asserts don't result in an immediate trap now even if they happen in non-main
thread.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The text control was left empty if the string value was not specified, but
it should use the numeric initial value instead in this case.
This notably affected wxSpinCtrlDouble under non-GTK platforms.
Closes#16621.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is a compromise solution between r78040, which handled monochrome bitmaps
correctly, but broke drawing bitmaps without using their mask, and r78054
which simply reverted it: this version preserves the old behaviour when not
using the mask, but draws at least the shape (if not the colour) correctly
for the monochrome bitmaps.
Notice that this also reverts r78039 which is not needed any more without
r78040.
Closes#16512.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calling SetHICON() is not enough, the icon size already needs to be set or,
even better, CreateFromHICON(), which does both atomically, should be used.
Closes#16672.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxStaticText emulates disabled state on OS X by changing text color to
light grey. When re-enabling the control, though, it always set the
color to the standard text color, which broke static texts with a custom
color.
Fix this by keeping track of the original color and restoring it back
when setEnabled:YES is called.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, but this is more consistent with the other controls.
It also highlights the ports which use non-default style, e.g. wxQt where
wxNO_BORDER should probably not be used as part of default toolbar style but
rather added in the ctor implementation.
Closes#16667.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The actual default styles for the toolbars don't include wxTB_FLAT anywhere,
so don't include it in the (currently almost unused) wxTB_DEFAULT_STYLE
neither.
See #16667.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only unselected wxPG property can be marked as 'being deleted'.
If this is done for selected wxGP property then in some circumstances it cannot be unselected and hence cannot be safely deleted.
See #16617.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use scaled size and scale factor when creating wxMemoryDC so that the
modified output bitmap has same physical dimensions as the source one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxOSX's wxToolBar code uses toolbar size computed by
AdjustToolBitmapSize() to determine which of the builtin toolbar sizes
to use. Because AdjustToolBitmapSize() returned 2x the "logical" size,
it would always pick NSToolbarSizeModeRegular regardless of icon size,
resulting in differently-sized toolbar on HiDPI and low-DPI screens.
Use scaled size instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code for doing this was accidentally disabled in r74957, which intended to
disable it for Darwin, but ended up disabling it for everything but Darwin.
Reenable it for all platforms now, clearly it didn't hurt to have it enabled
under Darwin, and we do need to do it, e.g. see #12636.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxComboBox::Clear() must call wxTextEntry::SetValue() explicitly instead of
calling its Clear() which just forwards back to wxComboBox own SetValue(),
which (correctly) doesn't work for read-only comboboxes when passed an empty
string.
Closes#16654.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This ensures that overridden wxComboBox::Clear() is called even when it's
invoked via a pointer or a reference to wxItemContainer (and not just one
to wxComboBox itself or its other base wxTextEntry).
Closes#16654.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Correct the HTML output format for wxGA_PROGRESS, it was indented incorrectly
because Doxygen appears to need a blank line (i.e. end of paragraph) after a
"@since".
Also improve the wording of the styles descriptions a little.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Documentation generated by @overload is misleading in this case as it refers
to the "different argument [the function] accepts", but there are none, the
methods can be overloaded only by const modifier as well.
Use \copydetails instead to reuse the original documentation, this is less
confusing and arguably more useful as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775