Failing to send wxEVT_UPDATE_UI to hidden windows made it impossible to show
them from their update UI handler which was totally unexpected as the
documented wxUpdateUIEvent::Show() method could never be used.
Do send these events to the hidden windows themselves but avoid sending the
update UI events to the children of hidden windows as this is really useless
because any change of their state wouldn't be seen by the user anyhow (even if
the child is shown, it would still remain hidden until its parent is) and
would just waste time processing a lot of needless events.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't generate wxWindowDestroyEvent when destroying the windows that had been
never created for symmetry with wxWindowCreateEvent which wasn't sent for this
window neither.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The other ports don't assert if a default-constructed wxWindow object for
which Create() had never been called is Destroy()d and wxGTK shouldn't do this
neither.
The new behaviour is more logical but also fixes a problem with an assert in
wxOwnerDrawnComboBox that can currently be seen in wxGTK unit tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Both completing a set of fixed strings and dynamic completion using a custom
completer are supported, although completing the file names remains MSW-only
for now.
Note that, unlike under MSW, auto-completion under Mac is not automatic and
has to be triggered manually by calling complete: method. This is done by
pressing F5 key by default. In the future we should call it automatically on a
timer event to make it more obviously discoverable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This class will be used in other ports too so don't make it private to wxMSW
(although it still remains private to wxWidgets for now as it doesn't make
much sense to use it in user code).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In r39715 the height parameter of a call to SetSize was changed to -1, however the previous coordinate value remained and became the fifth parameter which represents bit flags. Simply removed the fifth parameter.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Support for wxXML_PI_NODE introduced in r67346 broke SetRoot() and, because of
this, saving XML documents.
Correct this and add a unit test for this method.
Closes#13135.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Forgot to define this function in !HAS_AUTOCOMPLETE case. This fixes linking
problems with old compilers/headers such as VC6 with its original SDK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow overriding either the iterator-like methods of the base class or the
single and possibly more convenient, albeit slightly less efficient, method of
the derived wxTextCompleterSimple class.
This makes it possible to completely delegate to wxTextCompleter from wxMSW
IEnumString implementation and actually makes the code there easier, even if
it it still not quite trivial because of multi-threading concerns.
It also would make it possible to show the completions progressively, as they
are retrieved, in a future generic implementation of auto-completion (MSW
native implementation doesn't do this unfortunately and waits until all of the
completions become available before showing them).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The native IAutoComplete implementation takes care to retrieve the completions
from a background thread to prevent the UI from freezing while they're being
generated, but we worked against it by always generating all the completions
from the main thread and just enumerating them from the background one.
Change this now and call wxTextCompleter::GetCompletions() method from the
background thread itself to never block the main one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This option appends the first candidate completion value to the text control
itself making it more user-friendly as it reduces the amount of typing needed
to enter it.
See #11465.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This event is sent by wxMSW after the default handling of WM_CHAR has taken
place. It can be used to define an event handler triggered by key presses and
having access to the new value of the control, updated to take the last key
press into account.
This event will be used by auto-completion implementation for wxMSW only for
now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxTextCompleter class which allows to return the possible completions
dynamically and wxTextCompleter::AutoComplete() overload using it. So far this
is only implemented for wxMSW.
Also fix calling wxTextEntry::AutoComplete(wxArrayString) multiple times under
MSW, this didn't correctly update the list of shown completions before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Separate !HAS_AUTOCOMPLETE stub versions from the real one as the code was
too difficult to read otherwise and would become even more so after the
addition of the upcoming custom auto-completer support.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just make the public AutoComplete() non-virtual and add
virtual DoAutoCompleteXXX() methods to make it easier to add new public
AutoComplete() overloads in the upcoming commits.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Replaced C++ comments (occurring outside of __cplusplus blocks) in files that contain the warning "THIS IS A C FILE" with C comments.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Adding items to wxSortedArrayString should always keep them sorted but while
Add() did this, push_back() didn't breaking the class invariant.
Redefine push_back() in _WX_DEFINE_SORTED_TYPEARRAY_2 macro to fix this and
add a unit test checking that wxSortedArrayString::push_back() does work now.
Closes#13134.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxAuiTabArt::SetColour() and SetActiveColour() methods and provide trivial
default implementation of them in wxAuiDefaultTabArt to allow customizing the
tab colours.
Closes#11411.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775