Under wxMSW this method is re-entered due to triggering EVT_ACTIVATE when EVT_LEFT_UP is being already handled.
We need to prevent this to avoid generating spurious EVT_TEXT events and raising errors on calling SetFocus().
Closes#18260.
Add the handler earlier, as creating the handler main frame uses
wxArtProvider::GetBitmap() which can add the PNG handler on some
platforms (e.g. macOS, when using wxTangoArtProvider), so calling
wxImage::AddHandler() again after creating the frame could result in a
debug error message about adding the same handler twice.
We have to update index of the currently selected item if value of inserted item is the same as the value of currently selected item (we take lower index in this case) or if new item is inserted before the current selection (current selection index has to be increased in this case).
Closes#14153.
Sensitivity should be greater for high DPI displays to allow the user
clicking as far from the separator in this case as with standard DPI.
Also define a named constant for this value instead of using it
directly.
See https://github.com/wxWidgets/wxWidgets/pull/972
Dragging a column header in a wxHeaderCtrl and dropping it past the
rightmost column resulted in a crash due to accessing a column with
invalid index.
Fix this and correctly move the column to the last position when this
happens instead.
This bug notably affected dragging columns in wxGrid.
Closes https://github.com/wxWidgets/wxWidgets/pull/972
This fixes the access specifier effectively used for the members
following these macros, as it's changed to "public" inside them, meaning
that e.g. m_privateContextMenu was actually public even though it was
ostensibly declared in the private section and the intention was for it
to be private.
Closes#16038.
Previously it was set to true if content scale factor was less or equal
to 1 in some places or if it was strictly less than 2 in some others.
Fix this by adding a new helper SetEnableOffsetFromScaleFactor()
function and using it everywhere to consistently only enable offset for
non-high DPI displays in all cases.
Make wxDataViewCtrl::GetIremRect() work under all platforms and improve
tests, documentation and fix a couple of other problems in the same code
area.
See https://github.com/wxWidgets/wxWidgets/pull/1015
Defining a Mac-specific Create(wxMemoryBuffer) overload hid the other
Create() overloads, which are actually part of the public API, so they
couldn't be used any longer since the changes of
e7d21f6638
Fix this by renaming this Create() to OSXCreate(), to avoid hiding the
base class methods.
Also remove Mac-specific ctor taking wxMemoryBuffer, this is confusing
and can be avoided by just calling OSXCreate() directly in the only
place where it is used.
even on dark mode not all NSViews have their own layer, therefore don’t take that as a condition, because a child of such a view still might be layer-backed and need an explicit redraw.
Avoid spurious redraws for not visible windows (especiall important for not-yet fully constructed views or views during destruction)
Return empty rectangle if the item is not currently visible, for
whatever reason, and use physical coordinates for the rectangle origin.
This makes the unit test for GetItemRect() pass under macOS too.
For some unfathomable reason IsExpanded() returns wrong value for one of
the items. This should be fixed, but for now just leave a warning in the
test but don't fail it.
Also document this bug to at least spare people some surprises.
This method allows to retrieve the window this context is associated
with, if any.
Add "wxWindow*" argument to wxGraphicsContext ctor and provide the
window pointer to it when available, i.e. when creating the context from
a wxWindow directly or from wxWindowDC, which is also associated with a
window, in platform-specific code.
No real changes yet.
Store wxPGProperty for which wxPGComboBox editor is activated and use
this reference in all further drawing operations instead of retrieving
each time currently selected wxPGProperty which during the entire
lifetime of the editor is the same as property selected on editor
activation.
See #18211.
As anything shown to the user, this string must be translated, so use
_() around it instead of wxT().
Also reword the string a little; remove unnecessary call to .c_str() and
use a const reference instead of making a copy of the URL unnecessarily.
As SendEvent() not only sends the event about clicking on the link, but
also opens the link in the default browser if this event was not
processed (which wasn't really obvious from its name, so at least
mention it in its comment), the event is actually always handled and so
MSWOnNotify() must return true, not false (and definitely not 0) to
indicate it.
Closes#18266.
The documentation comment belongs to interface/wx/math.h, not the header
under include.
Also change the argument type to wxUint32 as the non-gcc version only
works for 32 bit values.
Generate wxJoystickEvent with the same fields under all platforms by
making the Linux and macOS versions follow MSW convention of using
"1 << N" for the changed button.
Add GetButtonOrdinal() accessor which can be used to retrieve just N.
Closes#18233.