Clicking on the page "x" close button switched to the page before doing
anything else which was unusual as other tabbed controls don't behave like
this.
Handle clicks on the close button specially and avoid switching to the page
which is about to be closed anyhow.
Closes#14150.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't override SetFocus() to set the focus to the main window, this isn't
enough as we can be given the focus by the underlying toolkit itself, without
our SetFocus() being called -- this happened in wxGTK when focus was changed
from the keyboard using TAB and in this case it didn't get to the main window
but remaining on the wxListCtrl itself meaning that keyboard input wasn't
processed at all.
Use wxNavigationEnabled<> now to ensure that OnSetFocus() and related methods
do the right thing instead now.
Also get rid of OnSetFocus() in wxListHeaderWindow, it's better to override
AcceptsFocus() to return false to avoid getting focus in the first place.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Enumerating the list of parameters in the method description is not especially
helpful, don't do it. Explain the functions relationship instead.
Also don't say that StretchBlit() is not implemented in wxGTK because it does
work there (using the generic implementation using wxDC scale).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
m_filename member was declared in wxTextAreaBase but set only in the
overridden wxTextCtrlBase methods. This meant that it wasn't updated correctly
in wxStyledTextCtrl which also derives from wxTextAreaBase and so saving
SaveFile() with empty file name didn't work there even when the control had
been originally loaded from a file.
Move the code updating m_filename to wxTextAreaBase itself to fix this. This
also simplifies the code as it's now not necessary to override
Do{Load,Save}File() in wxTextCtrlBase at all.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid wxGetTopLevelParent() which doesn't work for the strange TLWs which
override IsTopLevel() to return false, as wxMDIChildFrame does in wxMSW.
Using IsDescendant() works in any case and also is arguably more clear.
Closes#3063.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function checks if another window is a direct or indirect child of this
one, which can be needed in a number of situations.
See #3063.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Do not use the date when DST changes as the date part of wxDateTime object
used by wxTimePickerGeneric internally as this introduces problems with times
that can't be represented at all -- and so can't be entered into the control.
Use arbitrary date on which DST does not change to avoid this.
Closes#14137.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These methods, taking broken down time representation, avoid the problems
arising due to DST complications when using wxDateTime to represent the time
as special care needs to be taken in this case to avoid using the date part
corresponding to a DST change date at which time is discontinuous.
Document the problem with the old functions and use the new ones in the
sample.
See #14137.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just extract wxAuiTabArt into its own file. Also rename
wxAuiDefaultTabArt to wxAuiSimpleTabArt in preparation for having other tab
art classes as the default one.
See #14098.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/aui/tabmdi.cpp needs wxAuiDockArt declaration as it uses it, don't rely on
wx/aui/dockart.h being included from other wxAUI headers and include it from
here explicitly.
See #14098.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The wxComboBox header itself doesn't need <wx/textctrl.h> but there exists
code using wxComboBox with wxTextCtrl styles and events that doesn't include
<wx/textctrl.h> explicitly because it wasn't necessary in 2.8. So include it
from wx/combobox.h to avoid breaking this code after an upgrade to 2.9.
Closes#14132.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The pointer returned by wxDateTime::ParseXXX() methods could point into a
buffer of a temporary wxString created to wrap a char* or wchar_t* argument so
dereferencing it was illegal.
Fix this by defining separate overloads for char*/wchar_t* arguments returning
pointers into the original string.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method can be used to recover the pointer in char* buffer containing
multi-byte string representation corresponding to the given iterator which is
useful for implementing backwards-compatible functions that must be able to
return such pointers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxDateTime::ParseFormat() used todays date as fall back when parsing all
formats, including those involving times, which meant that its results
depended on whether DST was active at the time of the parsing which was
clearly wrong.
Fix this by using a fixed date on which DST is known not to be active as fall
back date.
This fixes unit test failures in DateTimeTestCase::TestTimeFormat() when it
was ran on a DST transition date.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
HideRow() was simply ignored as SetRowSize(row, 0) didn't do anything. Check
for the special value of 0 and allow it, just as it was done for the columns
since r57336.
See #14133.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The length here is the size of the buffer in bytes and is not necessarily the
string length in code points (notably not for non-ASCII strings in UTF-8
build).
Closes#14130.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The length of the string here is specified in bytes and is not the same as the
string length for non-ASCII UTF-8 strings, so don't cache it as the string
length.
Just invalidate the cached length instead as we simply don't know what the
real length of the string is going to be.
See #14130.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
A length greater than that of the source string could be passed to this ctor.
This worked correctly, i.e. created a string which was a copy of the source
one but cached a wrong length for it.
Avoid this by explicitly checking the length before caching it in
wxString::assign(str, len).
See #14130.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This variable can take only 2 values, use symbolic names for them instead of
difficult to understand 0 and 1.
See ##14105.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use POSIX function if available instead of only using Solaris-specific
thr_setconcurrency() which is not found in modern Linux systems any more.
Closes#2115.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't separate the function name and its arguments types in 2 different
columns in the assert dialog, this doesn't really work with const methods as
"const" can't be separated from the function like this. The old code just
didn't take "const" into account at all and mangled all the const methods by
showing ") cons" (no typo) at the end.
Just show everything in one column to avoid the problem and also simplify the
code.
Closes#14104.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes build with wxUSE_FONTMAP==0 as this dtor was only defined inside
"#if wxUSE_FONTMAP" section. Instead of fixing this, just get rid of this dtor
entirely as it was unnecessary anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775