RegisterHotKey() wrongly expected to be given VK_XXX MSW virtual key
code constant, which couldn't work in portable code, so fix it to accept
WXK_XXX constants, while preserving compatibility by still accepting
VK_XXX values not clashing with them.
Add wxFileDialog::GetCurrentlySelectedFilterIndex() similar to the
existing GetCurrentlySelectedFilename(), which can be used to retrieve
the index of the currently selected filter and update the state of the
extra controls in wxFileDialog accordingly.
Implement this for wxMSW only by updating the internally stored value
from the native CDN_TYPECHANGE notification and also generating a
wxEVT_UPDATE_UI event to allow the extra controls to update themselves.
Closes https://github.com/wxWidgets/wxWidgets/pull/1310
We need implement copy ctor and assignment operator because we are going to do a shallow copy of wxPGHashMapS2P data member and therefore we have to manually update reference counters of the objects being referenced in this map.
Notification about changes of column widths needs to be sent locally from wxPropertyGrid to wxPropertyGridManager (to update the header) so it would be good to use a dedicated non-public event type for these purposes.
For some operations when grid needs to be recreated currently selected options to show the header and to enable label editing are being ignored and it can be seen a discrepancy between the options selected (and shown) in the menu and the mode of just created wxPropertyGrid. To avoid this inconsistency respective flags can be stored and used to enable/disable features in just created grid.
This shouldn't be done unconditionally, trace mask can always be enabled
using WXTRACE environment variable from outside the test.
Also remove a useless tracing message.
The solution with specializing std::iter_swap() for wxString::iterator
was not conforming as the iterator was still not swappable, as it is
required to be.
Fix this by providing std::swap() overload for wxString::iterator, which
is correct and even simpler.
This allows std::reverse(s.begin(), s.end()) work with clang too and
incidentally avoids warnings about the code relying on non-conforming
extensions with MSVS 2017 which were due to the fact that iter_swap()
workaround wasn't enabled for it, while the new swap() overload is.
These functions were never used anywhere and their meaning was not
clear, so just drop them.
Also remove the now unused "tested" member and "WAIT_DURATION" constant.
Use CallAfter() to perform idle-time initialization, this is shorter and
simpler than dealing with the idle events explicitly.
Unfortunately the remaining use of idle events can't be avoided, explain
the reasons for this in a comment.
Just bind the idle events we want to execute dynamically instead.
This is already more clear and robust than the old version, but will be
simplified event further in the next commit.
When this style is specified, TAB has to be handled manually as well and
we do it by calling our Navigate() method explicitly. But for it to work
correctly we need to pretend that it's called in response to a real TAB
press by specifying FromTab flag and the code forgot to do this -- just
add the missing flag to fix it now.
In particular, this ensures that the special code handling radio buttons
in wxControlContainer::HandleOnNavigationKey() is really executed and
fixes a bug with pressing TAB on a wxTextCtrl with wxTE_PROCESS_ENTER
before a radio button group would select the first radio button of this
group instead of jumping to the currently selected button.
Closes#18392.
Since the changes of 05b980aba1, this
function returned a value which was too small because the code in it
never accounted for the text control margins, but this was hidden by a
weird hack adding extra "3*y/10 + 10" pixels to the horizontal extent
which was removed by the commit above.
Really fix it now by reusing wxTextCtrl::GetSizeFromTextSize() which
correctly accounts for the margins and everything else.
See #12297.
Closes#18391.
Describe what is returned when corresponding functions are queried for values of built-in attributes and wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES style is set.
If given attribute is not a built-in attribute handled by the current property it should be passed to the parent property because it may be handled there.