Commit Graph

214 Commits

Author SHA1 Message Date
Vadim Zeitlin
089eeea3ef Fix wxMSW build with wxUSE_UXTHEME==0
Make wxUxThemeIsActive() available even in this case to fix compilation
in some places and add the unavoidable preprocessor checks in other
ones.

Closes #18207.
2018-12-08 20:24:05 +01:00
Daniel Kulp
727a100a6a Handle wxEVT_SYS_COLOUR_CHANGED in wxAUI classes
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
2018-12-03 19:48:32 +01:00
Maarten Bent
a3eeb4d0be Revert wxAuiDefaultDockArt::DrawIcon API change
Mark the function as deprecated. It should not be part of the public API. It
cannot be overridden and manually calling it has no lasting effect because
DrawCaption calls it as well.

Closes https://github.com/wxWidgets/wxWidgets/pull/943
2018-09-22 14:44:00 +02:00
Maarten Bent
7a8e314736 Fix clicking on drop down button in wxAuiToolBar on wxMSW
The code handling the mouse events assumed the drop down button with was
10px, but wxAuiMSWToolBarArt uses a different width (14px). So clicking
on the left-most 4 pixels was not registered as a drop down click.

Allow the get (and set) the width of the drop down button of the
ToolBarArt.

Increase the detection area for drop down events, because the drop down
button is drawn 1 pixel larger than the actual size.

Rename some variables where dropdown was used instead of overflow.

Closes https://github.com/wxWidgets/wxWidgets/pull/939
2018-09-20 23:23:53 +02:00
Simon Rozman
770e0bcd16 Improve high DPI support in wxAui
Window initial/minimum/maximum sizes are now treated as logical pixels.

Furthermore, many margins and paddings are now converted using
wxWindow::FromDIP() to allow their growth in accord with screen DPI.
This places buttons on toolbars more apart on high DPI screens providing
space for easier touch operations.

Closes https://github.com/wxWidgets/wxWidgets/pull/933
2018-09-17 22:54:29 +02:00
Vadim Zeitlin
4710302aec Add wxOVERRIDE to all relevant wxAuiMDIChildFrame methods
Now that this class derives from wxMDIChildFrameBase, SetTitle() and
Activate() are inherited from it.
2018-05-13 02:49:07 +02:00
Vadim Zeitlin
be696ed8a4 Reuse base class icon-related functions in wxAuiMDIChildFrame
Don't define GetIcon(), GetIcons() and SetIcon() at all as the base
class already implements them and just keep SetIcons(), which can now be
marked as overridden as it's inherited from wxTopLevelWindow via
wxTDIChildFrame.
2018-05-13 02:46:33 +02:00
Vadim Zeitlin
f7b0ec38dd Remove useless wxAuiMDIClientWindow::SetSelection()
It just called the base class version, so it's better to not have it at
all.
2018-05-13 02:45:40 +02:00
Vadim Zeitlin
24e06054fc Remove wxAuiMDIChildFrame::DoShow()
This method is confusing as it's not used for implementing Show(), which
is the usual naming convention when both Foo() and DoFoo() members
exist, and gives no clear indication about what does it really do.

Just call wxWindow::Show() directly instead.

Also create the wxAuiMDIChildFrame window hidden from the beginning,
instead of creating it in a visible state and then hiding it.
2018-05-13 02:45:40 +02:00
Vadim Zeitlin
ceee16c01a Remove sizing hacks from wxAuiMDIChildFrame
There doesn't seem to be any reason for overriding DoSetSize() and
DoMoveWindow(), so just stop doing it.

Notice that this was already changed for wxGTK many years ago in
a94476deb9 and there is no reason to use
different code wxGTK and other ports.
2018-05-13 02:44:18 +02:00
Vadim Zeitlin
c1bcf16eb9 Derive wxAuiMDIChildFrame from wxFrame for consistency
Make it easier to use AUI-based MDI child frame class instead of
normal wxMDIChildFrame itself by inheriting it from the same base class.

This also allows to get rid of duplicate stubs in wxAuiMDIChildFrame.
2018-05-13 02:41:58 +02:00
Vadim Zeitlin
826ab19ac9 Add missing wxUSE_MDI check to wxAUI MDI header
The implementation file already checked for both wxUSE_AUI && wxUSE_MDI,
but wx/aui/tabmdi.h didn't check the value of the latter -- do it now.
2018-05-13 02:41:58 +02:00
hwiesmann
f9429b7db4 Make wxAuiManager::SavePaneInfo() parameter const
The pane is not modified by saving its details.
2017-11-05 23:45:21 +01:00
Maarten
977a826639 use more wxOVERRIDE (#329) 2016-09-25 13:21:28 -07:00
Vadim Zeitlin
2543c336b0 Revert "Fix invisible captions in high contrast mode"
This reverts commit 71dfb3b414 which fixed
appearance of the captions in high contrast mode but broke them for wxGTK.

Ideal would be to make this code work in wxGTK too or, in the worst, case only
use this code for wxMSW, but for now at least avoid breaking wxGTK appearance
by default.

See #16186.
2016-07-03 14:38:36 +02:00
Vadim Zeitlin
5e61689dbf Fix regression with MDI children accelerators
Since the changes of 8034e35391 (see #16870)
accelerators, including the standard ones such as Ctrl-F4 under MSW, didn't
work any longer inside the MDI children.

Fix this by extending IsTopNavigationDomain() to allow for checking whether
the given window should stop propagation of all keyboard events, as wxTLW
does, or only TAB navigation ones as wxMDIChildFrame and wxAuiFloatingFrame
do.
2016-02-28 01:24:20 +01:00
Paul Cornett
8585f3215a add missing wxOVERRIDE 2016-02-14 13:40:45 -08:00
Vadim Zeitlin
bfbdd37a1a Merge native MSW appearance for AUI toolbars
Closes https://github.com/wxWidgets/wxWidgets/pull/200
2016-02-13 12:31:49 +01:00
Tobias Taschner
49b82e72f2 Add native wxAuiToolbarArt for MSW.
Using UXTheme or generic fallback for executables without manifest.
2016-02-10 20:40:45 +01:00
Tobias Taschner
c8c9f56e0c Prepare platform dependent wxAuiDefaultToolBarArt. 2016-02-10 20:40:30 +01:00
Kinaou Herve
38cd4b4769 Don't make wxAuiFloatingFrame root of a top navigation domain
This allows the accelerators associated with it to propagate to the parent
frame, which is what we want to happen in practice.

Closes #16870.
2016-01-30 18:41:18 +01:00
Zane U. Ji
71dfb3b414 Fix invisible captions in high contrast mode
Don't use black text on dark background.

Closes #16186.
2016-01-30 18:27:10 +01:00
Vadim Zeitlin
de96b0dae7 Implement native wxAuiTabArt for MSW
This wxAuiTabArt implementation uses Windows uxtheme API to draw AUI tabs. A
fallback to generic tab art is implemented for the bottom tabs or if uxtheme
is not available (disabled by user or no manifest file).

Closes https://github.com/wxWidgets/wxWidgets/pull/105
2015-10-04 00:28:00 +02:00
Tobias Taschner
1a8bcd4d88 Add support for mouse hover state to wxAuiTabArt
This allows wxAuiNotebook to support drawing its tabs differently depending on
whether the mouse is hovering above them or not.

See https://github.com/wxWidgets/wxWidgets/pull/105
2015-10-04 00:27:22 +02:00
Paul Cornett
27a8d28029 more use of wxOVERRIDE 2015-09-06 17:20:42 -07:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
ce7fe42e84 Provide shorter synonyms for wxEVT_XXX constants.
Use the same short names as are used by the event table macros for the event
type constants themselves. This makes them much more comfortable to use, e.g.
Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED).

The old long names are still kept for backwards compatibility and shouldn't be
removed as it doesn't really cost anything to continue providing them, but all
new event types should only use the short versions.

Closes #10661.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-25 10:11:03 +00:00
Vadim Zeitlin
526502d1b9 Add wxAUI_TB_PLAIN_BACKGROUND wxAuiToolBar style.
This style allows to use a plain, solid colour, background instead of the
default gradient one.

Closes #10585.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-21 11:19:00 +00:00
Vadim Zeitlin
72ae0b5169 Disallow drop downs on AUI check buttons.
This doesn't make much sense and disallowing it makes check items consistent
with radio ones as previously you could set up a dropdown for the former but
not for the latter.

Also update the documentation of the relevant methods.

Closes #14795.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-10 12:40:47 +00:00
Vadim Zeitlin
873271f05e Use wxAUI_TB_DEFAULT_STYLE instead of 0 as default style value.
No real changes.

See #14794.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-06 23:54:25 +00:00
Vadim Zeitlin
a69b365fbb Get rid of wxAuiToolBar::m_style and just use base class m_windowStyle.
This fixes an assert exposed by the addition of wxAuiToolBar::Create() in
r72785: as m_style was not initialized before, calling GetWindowStyle() from
wxControl::Create() returned wrong flags.

Fix this by just removing m_style completely, there doesn't seem to be any
need for it nor for overriding GetWindowStyleFlag().

See #13520.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-29 14:50:42 +00:00
Vadim Zeitlin
46e6720278 Add wxAuiToolBar::Create().
Implement two-step creation of wxAuiToolBar to allow doing it from XRC.

See #13520.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 01:27:19 +00:00
Vadim Zeitlin
1e30d94eff Fix border size computation in wxAuiTabArt.
Space was reserved for the borders even when it wasn't filled, resulting in
visual artefacts. Fix this by virtualizing the function returning the
additional space needed for the borders and only overriding it to return non
zero in wxAuiGtkTabArt.

Closes #14710.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-22 21:46:46 +00:00
Vadim Zeitlin
9fa99f045e Improve wxAuiNotebook appearance when using some GTK themes.
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
2012-10-08 12:09:13 +00:00
Vadim Zeitlin
0d1dd76baa Merge "selected" and "active" child in wxAuiMDIParentFrame.
They are one and the same thing and so just make them really synonymous
instead of (unsuccessfully) trying to keep them synchronized.

Closes #14684.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-26 12:20:07 +00:00
Vadim Zeitlin
005b12d8be Make wxBookCtrlBase::GetPage() virtual to fix it for wxAuiNotebook.
wxAuiNotebook doesn't store its page in the base class m_pages array, so
calling GetPage() on it via a wxBookCtrl pointer resulted in a crash.

Make GetPage() virtual to allow overriding it at wxAuiNotebook level.

Closes #13768.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:27 +00:00
Paul Cornett
9dc44eff02 support for GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 20:39:06 +00:00
Vadim Zeitlin
dbec0fc8d8 Remove redundant wxAuiNotebook methods already present in wxBookCtrlBase.
wxAuiNotebook already inherits perfectly workable AdvanceSelection() and
GetCurrentPage() methods from wxBookCtrlBase, no need to reimplement them in
it.

See #14309.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 09:48:26 +00:00
Vadim Zeitlin
11527fc9f0 Added support for page tooltips to wxAuiNotebook.
Allow setting tooltips for the tabs of the individual pages of wxAuiNotebook.

Closes #14216.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-16 12:12:26 +00:00
Vadim Zeitlin
c52f18dfc8 Override DoThaw() in wxAuiNotebook correctly.
Don't "override" Thaw() in wxAuiNotebook as it's not virtual any more.
Override DoThaw() instead.

Also use wxBookCtrlBase instead of wxControl as the base class.

Closes #14179.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-02 18:26:03 +00:00
Paul Cornett
25d7cf54f0 build fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 19:15:54 +00:00
Vadim Zeitlin
069358b7cc Implement native tab art for wxAUI in wxGTK.
Use native wxAuiTabArt implementation in wxGTK, it better conforms to the
system style.

Closes #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:56:04 +00:00
Vadim Zeitlin
4758baf5eb Refactor wxAUI: extract wxAuiTabArt in a separate file.
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
2012-03-25 17:55:59 +00:00
Vadim Zeitlin
9827ce9208 Enable/disable "Window" menu items in AUI MDI correctly.
Add EVT_UPDATE_UI handlers for "Close", "Close All" as well as "Next" and
"Previous" menu commands.

Closes #14102.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-15 13:49:54 +00:00
Vadim Zeitlin
3a1ec1d5dc Add wxEVT_AUI_PANE_ACTIVATED event.
This event is sent when an AUI pane becomes active.

Closes #14026.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-04 20:31:34 +00:00
Vadim Zeitlin
fc5a609912 No changes, just make wxAUI SetActivePane() a member function.
Make a global function a member one as it uses member variables and it's
easier to use them directly instead of passing the object pointer to it all
the time.

See #14026.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-04 20:31:29 +00:00
Vadim Zeitlin
3b7e7e2497 Resolve ambiguity between two wxAuiNotebook overloads.
wxAuiNotebook-specific InsertPage() and the version inherited from
wxBookCtrlBase were ambiguous if used with default values for their 2 last
arguments. Resolve this by removing defaults from the inherited version.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 18:48:34 +00:00
Vadim Zeitlin
3ac17397c5 Perform wxAuiToolBar idle updates from UpdateWindowUI(), not OnIdle().
No real changes, just optimize the idle updates by doing it from (less often
called) UpdateWindowUI() instead of EVT_IDLE handler.

Closes #10075.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-30 16:51:10 +00:00