Let wxAuiNotebook render the border itself, instead of doing it in dock art
class. This allows the notebook to do it correctly for the current theme.
Closes#14710.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Start processing key events from the currently focused window, this ensures
that its key event handlers are tried before the top level window
accelerators.
This is consistent with wxMSW and allows a window to locally override the
global accelerators which really makes sense.
Closes#14553.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Mostly copy wxGenericTreeCtrl incremental search implementation to
wxGenericListCtrl (unfortunately there is no simple way to reuse this code
currently), including the recently added EnableBellOnNoMatch() method.
Update the sample to test it, the key event handling in it had to be modified
to allow it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For consistency with Windows, allow to optionally generate a beep when
incremental search in the tree control doesn't find anything.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Go to the next item starting with the given character if the same one is
pressed multiple times. This is more useful than searching for an item
starting with multiple occurrences of this character (which usually won't
exist) and is more consistent with how Windows handles this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Clicking on the control to give it focus must not start editing the label of
an item in it, this is bad UI as you need to carefully select where do you
click to avoid starting to edit the label and nobody else does it like this
(probably because of the former reason).
As a side note, it would be really great to abstract the item handling in a
class that could be reused by all these controls instead of having to update 3
slightly different versions of the same code every time.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Just skip the event to allow the system to set the focus to the control
itself. This is more consistent with the other controls and should result in
correct behaviour everywhere automatically.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only set focus if the left button was pressed for consistency with just about
everything else. Also, just skip the event instead of setting the focus
explicitly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use just wxTRANSPARENT and wxSOLID instead of wxBRUSHSTYLE_TRANSPARENT and
wxBRUSHSTYLE_SOLID when changing the background mode.
See #14599.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a call to wxLog::FlushActive() to the shutdown code as calling just
wxLog::SetActiveTarget(NULL) is not enough, it flushes the current log target
only but not the ones used by other threads.
Closes#14595.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Draw a box using gtk_paint_box() for the tabs, without border for the active
one to avoid an extra line across the gap, and with the border for the others.
Closes#14728.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxGenericCollapsiblePane::DoGetBestSize() is dynamic, returning
different values for collapsed and open states. Therefore the control
must invalidate best sizes cache every time its state changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explain that by default both styles are assumed but that using just one of
them disables the scrolling in the other direction.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow creating a disabled version of the colour without having to manually
break it into RGB components and then recreating it from them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Correct the test for negative spans less than a month and use the correct
month for computing the number of days in it.
Also add unit tests for problematic cases.
Closes#14704.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make sure we exit the loop when reading the file in chunks in
wxFile::ReadAll() and add a unit test for it to ensure that it's really
correct.
Closes#14725.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method was added back in r40686 but was never actually used anywhere. Do
use it in wxDialogBase::OnCharHook() now instead of hard-coding the check for
WXK_ESCAPE, this should allow using Cmd+. to work like Escape under Mac which
was apparently the intention of the code in src/osx/dialog_osx.cpp.
Also fix IsEscapeKey() itself to ignore any modifiers as at least under MSW
Esc always closes the dialog, even if Shift or Alt is pressed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We need to ensure that all windows are realized before querying their
positions on screen, so add an extra wxYield().
Also adjust the tests slightly as the windows are now all created in the
beginning of the function.
Finally, use Destroy() instead of wxDELETE() for windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxAuiMDIParentFrame::GetActiveChild() may be called before the client window
is created, don't crash in this case but just return NULL.
Closes#14684.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72601 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method returns the difference between the dates as wxDateSpan, unlike the
existing Subtract() and overloaded operator-() that return wxTimeSpan.
Closes#14704.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wx{SOLID,TRANSPARENT} instead of wxBRUSHSTYLE_{SOLID,TRANSPARENT}. This
makes more sense as we're setting background mode, not brush style, here and
also fixed compilation when not using PCH.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use binary mode to preserve the original file EOLs when loading it and also to
save it with the same EOLs later.
Add very primitive EOL auto-detection to LoadFile().
Also add SaveFile()/LoadFile() which were missing in !wxUSE_TEXTCTRL case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use swap() to move the newly created string into its destination instead of
copying it there. This can be relatively important as the string represents an
entire file contents here and so could be quite long.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make it possible to use wxFFile and wxFile interchangeably for simply reading
the entire contents of the file as a string.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The version inherited from the base class does work already but calling
Scintilla SetText() directly should be more efficient than selecting
everything and then calling ReplaceSelection() as the base class version does,
less code is executed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
WriteText() must replace the selection, not just insert the new text,
otherwise SetValue() implementation inherited from the base class doesn't work
as it doesn't clear the old contents of the control before adding new text to
it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no need to clear the control contents before loading a file into it
because LoadFile() is supposed to do this on its own (although currently it
doesn't, which will be fixed soon).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't show "About" dialog on startup, this has nothing to do with the purpose
of this sample and is just annoying.
Also, don't select the entire file after opening it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow to specify whether the socket should block until all the data is read or
written or, on the contrary, avoid blocking only when reading or writing
instead of always using the same behaviour in both directions.
Also add separate counters for the bytes read/written instead of using the
same one for both.
These changes make it possible to use the same socket for reading/writing in
different threads.
Closes#14506.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
A model may be dissociated from a still existing control, don't crash if it
happens (notice that we still would crash in the native GTK version right now,
so this still remains to be fixed there).
See #14616.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775