wxIPC API doesn't map well onto DDE, as we don't have wxIPCFormat
parameter in StartAdvise() but do allow specifying the format when
calling Advise() itself, whereas DDE requires specifying the format when
establishing the advise loop and the data always must use this format
later.
Because of this, we have to pass the actual format with the data itself
instead of relying on DDE formats support. This has the advantage of
allowing wxIPC_UTF8TEXT to work, while previously it didn't and
couldn't, as DDE only supports the standard (or custom, but registered)
clipboard formats and it wasn't one of them. Of course, this also has a
disadvantage of having to make another copy of the data, but this seems
unavoidable.
This change allow Advise() overload taking wxString to work, including
for non-ASCII strings, as shown by the update to the IPC sample. It also
makes wxDDEConnection::m_dataType unnecessary, as we must always use the
format passed to DDE callback anyhow when handling XTYP_ADVREQ.
Closes#17900.
The latest changes to wxTranslations::AddCatalog() behaviour were not
backwards-compatible and also had other problem, so revert them for now,
even if this means that #18227 has to be reopened.
This is a combination of the following commits:
----
Revert "Fix regression in wxTranslations::AddCatalog()"
This reverts commit 14e905858d.
See #18297.
----
Revert "Fix crash in translations code when no translations are found"
This reverts commit 80904d1bc7.
See #18299.
----
Revert "Rename new wxTranslations method to GetAcceptableTranslations()"
This reverts commit 20b02d6169.
----
Revert "Load catalogs for all preferred languages, if they exist"
This reverts commit 2d784da2ee.
----
Revert "Allow getting all usable translations languages"
This reverts commit 5d08e404c7.
----
See #18227, #18300.
Closes#18302.
Compute the best size of the notebook, taking into account all the
different layout possibilities, and add a test checking that this works
as expected.
Closes https://github.com/wxWidgets/wxWidgets/pull/1085
The new method takes minimal size just computed by RecalcSizes() as its
argument making it unnecessary to store it as a member variable in the derived
classes such as wx{Box,FlexGrid}Sizer.
The old method can still be overridden for compatibility and by the derived
class that don't need minimal size when updating children.
Under wxQT, wxMemoryDC was previously rendering to a temporary image
which was only being blitted back to the original wxBitmap when either
the DC wx destroyed or a new bitmap was selected (via SelectObject).
With these change wxMemoryDCImpl now draws directly to the bitmap
managed by wxBitmap, this makes the behaviour more consistent with the
MSW and GTK implementations.
Closes https://github.com/wxWidgets/wxWidgets/pull/1083
As wxDataViewColumnList was never public, it should be fine to not
define it any more and use a vector instead.
This makes the code more clear and also marginally more efficient.
Previously, the last column couldn't be effectively resized at all, as
its size was always automatically set to the remaining width of the
window after subtracting the widths of all the previous columns. Now
this is only done if this remaining width is greater than the width
given to the column by the user or by the program.
Effectively, this means that the user can now drag-resize the column to
increase its size (at the price of showing the horizontal scrollbar).
See #18295.
This reverts commit 24054c95d8 as it
actually should be possible to increase the size of the last column,
even if this shows the horizontal scroll bar.
If a QGroupBox is disabled, then you cannot set any of its items to be
enabled without first enabling it. Enabling/disabling it will set that
value (true/false) on all of its items, although setting the QGroupBox
to an enabled state which it already has does not result in this
behaviour.
Fix wxQt to match the expected wxRadioBox behaviour and allow the unit
test to pass.
Closes https://github.com/wxWidgets/wxWidgets/pull/1064
This is slightly simpler, as it doesn't require checking whether the
control state really changes or not (it always does if DoEnable() is
called) and allows disabling the controls before creating them, e.g.
code like
wxButton* const b = new wxButton();
b->Disable();
b->Create(this, wxID_OK);
works as expected now instead of spewing GTK+ errors.
Make wxUxThemeIsActive() available even in this case to fix compilation
in some places and add the unavoidable preprocessor checks in other
ones.
Closes#18207.
RandomAccessIterator requirements include LessThanComparable, so
implement the missing comparison operators for this class, as well as
for const_reverse_iterator.
This also fixes compilation problems with MSVS 2013 in debug mode, where
the CRT uses these operators to check the iterators correctness.
See https://github.com/wxWidgets/wxWidgets/pull/1048
Avoid creating a default wxGraphicsContext unnecessarily, only to
immediately delete it and replace it with the provided one.
This was at best unnecessary and at worst resulted in a crash if the
default context couldn't be created, as happened on a headless system
(where wxImage-based wxGraphicsContext can still be created
successfully).
If nothing else, this avoids 2 calls to each of wxGetDisplaySize() and
wxGetDisplaySizeMM() on each and every wxGCDC construction which are
completely unnecessary as wxGCDCImpl uses its own hardcoded resolution
of 72 DPI, as do some other classes deriving from wxDCImpl.
And even for the classes which do compute these fields using the display
resolution, it may still be unnecessary to do it as they can be never
used if neither GetSizeMM() nor SetLogicalScale() are called on the
corresponding wxDC object.
Finally, this is more than an optimization as when using Cairo-based
wxGCDC without display (which is explicitly supported), calling
wxGetDisplaySize() simply doesn't work at all.
Removing a page from wxToolbook could result in crashes due to
dereferencing the now invalid page index. Fix this by not assuming that
the page index is the same as its tool ID, but adding functions to
explicitly map one to the other.
Also fix inserting pages into wxToolbook, which worked as appending them
before.
Closes https://github.com/wxWidgets/wxWidgets/pull/1042Closes#18275.
Update the colours used when the system theme changes.
This is especially important to use the colour scheme compatible with
macOS 10.14+ dark mode.
Note that this commit is best viewed with "git diff --color-moved".
Closes https://github.com/wxWidgets/wxWidgets/pull/916
Add functions to enable or disable pages inside wxToolbook.
Using the new functions you can present disabled icons so that the user
can expect more functionality and you do not need to add/remove pages in
different states.
Closes https://github.com/wxWidgets/wxWidgets/pull/1038
private field 'm_dwCookie' is not used
'return' will never be executed
result of comparison of unsigned enum expression < 0 is always false
'FlushDC' overrides a member function but is not marked 'override'
potentially uninitialized local variable 'bound' used
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.
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.