From 55f80941bfb3dbe8f867a8a31c32f27ee11cd485 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Fri, 4 Sep 2020 18:22:14 +0100 Subject: [PATCH 1/4] Mention that wxFD_OVERWRITE_PROMPT is always enabled on OSX This style is ignored on OSX because there is no way to disable the overwrite prompt from showing. Fixes #13541 --- interface/wx/filedlg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/wx/filedlg.h b/interface/wx/filedlg.h index abb4a20556..3be2c15429 100644 --- a/interface/wx/filedlg.h +++ b/interface/wx/filedlg.h @@ -133,6 +133,7 @@ const char wxFileSelectorDefaultWildcardStr[]; @style{wxFD_OVERWRITE_PROMPT} For save dialog only: prompt for a confirmation if a file will be overwritten. + This style is always enabled on wxOSX and cannot be disabled. @style{wxFD_NO_FOLLOW} Directs the dialog to return the path and file name of the selected shortcut file, not its target as it does by default. Currently this From b4a50b1ea7b41e2d72b47ce7093266a0d573320b Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Fri, 4 Sep 2020 18:23:29 +0100 Subject: [PATCH 2/4] Document return types in wxAuiToolBarItem better These functions return only specific flags inside an integer, so in order to use the functions we need to know the flags. Fixes #14972 --- interface/wx/aui/auibar.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/interface/wx/aui/auibar.h b/interface/wx/aui/auibar.h index 5d2e640272..b1c07828b5 100644 --- a/interface/wx/aui/auibar.h +++ b/interface/wx/aui/auibar.h @@ -259,15 +259,22 @@ public: /** Returns the toolbar item kind. + + @return one of @c wxITEM_NORMAL, @c wxITEM_CHECK or @c wxITEM_RADIO, + @c wxITEM_SEPARATOR, @c wxITEM_CONTROL, @c wxITEM_SPACER, @c wxITEM_LABEL, */ int GetKind() const; /** + Set the current state of the toolbar item. + @param new_state is an or'd combination of flags from wxAuiPaneButtonState */ void SetState(int new_state); /** + Gets the current state of the toolbar item. + @return an or'd combination of flags from wxAuiPaneButtonState representing the current state */ int GetState() const; From 5e73cf36127a86c81bf7645ba8f3ce85cb4f3202 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Mon, 14 Sep 2020 21:33:27 +0100 Subject: [PATCH 3/4] Document styles for the AUI toolbar --- interface/wx/aui/auibar.h | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/interface/wx/aui/auibar.h b/interface/wx/aui/auibar.h index b1c07828b5..917bc9e90c 100644 --- a/interface/wx/aui/auibar.h +++ b/interface/wx/aui/auibar.h @@ -617,26 +617,34 @@ public: @beginStyleTable @style{wxAUI_TB_TEXT} + Display the label strings on the toolbar buttons. @style{wxAUI_TB_NO_TOOLTIPS} + Do not show tooltips for the toolbar items. @style{wxAUI_TB_NO_AUTORESIZE} + Do not automatically resize the toolbar when new tools are added. @style{wxAUI_TB_GRIPPER} + Show the toolbar's gripper control. If the toolbar is added to + an AUI pane that contains a gripper, this style will be automatically + set. @style{wxAUI_TB_OVERFLOW} + Show an overflow menu containing toolbar items that can't fit on the + toolbar if it is too small. @style{wxAUI_TB_VERTICAL} - using this style forces the toolbar to be vertical and + Using this style forces the toolbar to be vertical and be only dockable to the left or right sides of the window whereas by default it can be horizontal or vertical and - be docked anywhere + be docked anywhere. @style{wxAUI_TB_HORZ_LAYOUT} @style{wxAUI_TB_HORIZONTAL} - analogous to wxAUI_TB_VERTICAL, but forces the toolbar - to be horizontal + Analogous to wxAUI_TB_VERTICAL, but forces the toolbar + to be horizontal. @style{wxAUI_TB_PLAIN_BACKGROUND} Draw a plain background (based on parent) instead of the default gradient background. @style{wxAUI_TB_HORZ_TEXT} Equivalent to wxAUI_TB_HORZ_LAYOUT | wxAUI_TB_TEXT @style{wxAUI_TB_DEFAULT_STYLE} - The default is to have no styles + The default is to have no styles. @endStyleTable @beginEventEmissionTable{wxAuiToolBarEvent} @@ -861,6 +869,18 @@ public: wxString GetToolLongHelp(int toolId) const; void SetToolLongHelp(int toolId, const wxString& help_string); + /** + Add toolbar items that are always displayed in the overflow menu. + + If there are custom items set, then the overflow menu will be + displayed even if there are no items from the main toolbar that + overflow. + + @param prepend are the items to show before any overflow items + @param append are the items to show after any overflow items + + @note The toolbar must have the @c wxAUI_TB_OVERFLOW style. + */ void SetCustomOverflowItems(const wxAuiToolBarItemArray& prepend, const wxAuiToolBarItemArray& append); From d33a393ed88d8851c25d387fdf034d41062aef5f Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Mon, 14 Sep 2020 21:39:53 +0100 Subject: [PATCH 4/4] Docs: Remove wxTB_FLAT from the default style This style was removed from the default previously, so this was just a remnant in the documentation. Fixes #17542 --- interface/wx/toolbar.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/interface/wx/toolbar.h b/interface/wx/toolbar.h index 4b28064807..84506d9589 100644 --- a/interface/wx/toolbar.h +++ b/interface/wx/toolbar.h @@ -221,8 +221,7 @@ public: @style{wxTB_RIGHT} Align the toolbar at the right side of parent window. @style{wxTB_DEFAULT_STYLE} - Combination of @c wxTB_HORIZONTAL and @c wxTB_FLAT. This style is new - since wxWidgets 2.9.5. + The @c wxTB_HORIZONTAL style. This style is new since wxWidgets 2.9.5. @endStyleTable See also @ref overview_windowstyles. Note that the wxMSW native toolbar