wxFloatingPointValidator and wxIntegerValidator copy ctor didn't copy
the associated window, so it was lost when the validator was Clone()'d.
Fix this by correctly using wxValidator copy ctor, instead of the
default one, in the copy ctor of the common wxNumValidatorBase base
class.
This header ends up being included by wx/apptrait.h, which is in
BASE_CMN_HDR, so it needs itself to be there too in order for
compilation to work when using non-GUI library build.
Closes#18038.
Using GtkBin as widget parent didn't work without overriding its
size-related vfuncs until GTK+ 3.8 and, in particular, resulted in the
editor (which was the child of the bin) not being visible at all with
GTK+ 2.
Switch to using GtkHBox as parent, which does work with both GTK+ 2 and
any GTK+ 3 version, but keep using GtkBin with GTK+ 4 as GtkHBox is
removed in it.
This fixes bug introduced in c2821dcea0
since which custom wxDataViewCtrl editors were not visible any more.
Closes#17686.
Don't pretend that AddData() allows to add multiple objects to the
clipboard because it doesn't work like this by default under any
platform and only MSW possibly supports this in the non-default build
with wxUSE_OLE==0 -- but mentioning it in the documentation would
arguably be more confusing than helpful.
See #17925.
No real changes, just don't call gtk_wx_cell_renderer_get_size()
unnecessarily as we never use its result: the code using the returned
rectangle was commented out ever since it was added (more than 10 years
ago) in 1e510b1e2d
No real changes, just don't define macros that we never use and don't
plan on using it (why would we need to test whether something is of this
type when we already know it).
While it seems to be harmless in this particular case, it still prevents
testing this code with UBSAN by triggering it here, so check that
multiplication doesn't overflow.
Don't divide by waveformat.uiBlockAlign which could be 0, but rather
multiply by it and verify that we get the expected result. This is more
robust, as it prevents crashes on malformed input and also slightly more
efficient even for correct input.
Check that we have enough data in the input instead of happily reading
out of bounds memory.
This fixes the most common problem of crashing on bad data which doesn't
look like WAV at all, but doesn't fix problems with parsing input which
does look like WAV, but is incorrect -- this will be done in subsequent
commits.
This is a micro-optimization, as pre-increment is at least as efficient
as post-increment and typically slightly more so because it doesn't need
to make a copy of the iterator, and better conforms to the prevailing
C++ style.
Closes https://github.com/wxWidgets/wxWidgets/pull/655
Avoid problems when using this header in code also include <windows.h>
(and not doing it via wx/msw/wrapwin.h) by ensuring that min and max
used here are not defined as macros.
We need to explicitly generate this event from the char hook handler as
we don't get the normal WM_CHAR for it, it is apparently intercepted by
the window proc installed by the auto-completing code, so check if
wxTE_PROCESS_ENTER is used for the text entry and call a special new
MSWProcessSpecialKey() method to do the right thing if it is.
Similarly, handle Tab presses correctly if wxTE_PROCESS_TAB is used.
Closes#12613.
If we don't pass these messages to it, the selected items highlight
rectangle doesn't get updated when the columns are resized when using
visual themes, as could be seen in the listctrl sample.
While this did work if the wxEVT_LIST_COL_DRAGGING event handler skipped
the event, prefer to not require doing this as things work without this
call to wxEvent::Skip() under the other platforms and even MSW with
themes disabled.
Closes#18032.
Even though the value of this variable is not actually used in this
case, we still must initialize it to something before comparing with
NSGestureRecognizerState{Began,Ended} below.
Closes https://github.com/wxWidgets/wxWidgets/pull/645
Account for the empty lines explicitly by reserving enough vertical
space for them, as wxDC::GetTextExtent() wouldn't do it as it simply
returns 0 for empty strings.
Closes#18028.
GtkAssertDialog UI is now defined with GtkBuilder XML because
gtk_widget_push_composite_child() and gtk_widget_pop_composite_child() are
deprecated since 3.10 and composite widget templates should be used
to make composite children.