From e93f6dbc0b17ac01dc0d3744b605f929b8f85cc9 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 21 Jun 2016 14:07:56 -0700 Subject: [PATCH] Fix typos and missing items in the ribbon interface definitions --- include/wx/ribbon/gallery.h | 3 +++ interface/wx/ribbon/art.h | 6 ++--- interface/wx/ribbon/bar.h | 45 +++++++++++++++++++++++++++++++++ interface/wx/ribbon/buttonbar.h | 4 +++ interface/wx/ribbon/gallery.h | 6 +++++ interface/wx/ribbon/panel.h | 12 +++++++++ interface/wx/ribbon/toolbar.h | 18 +++++++++++++ 7 files changed, 91 insertions(+), 3 deletions(-) diff --git a/include/wx/ribbon/gallery.h b/include/wx/ribbon/gallery.h index 665c69420d..7f4562625d 100644 --- a/include/wx/ribbon/gallery.h +++ b/include/wx/ribbon/gallery.h @@ -179,10 +179,13 @@ typedef void (wxEvtHandler::*wxRibbonGalleryEventFunction)(wxRibbonGalleryEvent& // wxpython/swig event work %constant wxEventType wxEVT_RIBBONGALLERY_HOVER_CHANGED; %constant wxEventType wxEVT_RIBBONGALLERY_SELECTED; +%constant wxEventType wxEVT_RIBBONGALLERY_CLICKED; + %pythoncode { EVT_RIBBONGALLERY_HOVER_CHANGED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_HOVER_CHANGED, 1 ) EVT_RIBBONGALLERY_SELECTED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_SELECTED, 1 ) + EVT_RIBBONGALLERY_CLICKED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_CLICKED, 1 ) } #endif // SWIG diff --git a/interface/wx/ribbon/art.h b/interface/wx/ribbon/art.h index 40a4768297..2bd68d44d5 100644 --- a/interface/wx/ribbon/art.h +++ b/interface/wx/ribbon/art.h @@ -274,7 +274,7 @@ public: @see SetColourScheme() */ - virtual void SetColour(int id, const wxColor& colour) = 0; + virtual void SetColour(int id, const wxColour& colour) = 0; /** @see wxRibbonArtProvider::GetColour() @@ -582,7 +582,7 @@ public: wxDC& dc, wxWindow* wnd, const wxRect& rect, - wxRibbonButtonBarButtonKind kind, + wxRibbonButtonKind kind, long state, const wxString& label, const wxBitmap& bitmap_large, @@ -946,7 +946,7 @@ public: virtual bool GetButtonBarButtonSize( wxDC& dc, wxWindow* wnd, - wxRibbonButtonBarButtonKind kind, + wxRibbonButtonKind kind, wxRibbonButtonBarButtonState size, const wxString& label, wxSize bitmap_size_large, diff --git a/interface/wx/ribbon/bar.h b/interface/wx/ribbon/bar.h index c729347ab1..15f06bdab0 100644 --- a/interface/wx/ribbon/bar.h +++ b/interface/wx/ribbon/bar.h @@ -6,6 +6,22 @@ /////////////////////////////////////////////////////////////////////////////// +enum wxRibbonBarOption +{ + wxRIBBON_BAR_SHOW_PAGE_LABELS, + wxRIBBON_BAR_SHOW_PAGE_ICONS, + wxRIBBON_BAR_FLOW_HORIZONTAL, + wxRIBBON_BAR_FLOW_VERTICAL, + wxRIBBON_BAR_SHOW_PANEL_EXT_BUTTONS, + wxRIBBON_BAR_SHOW_PANEL_MINIMISE_BUTTONS, + wxRIBBON_BAR_ALWAYS_SHOW_TABS, + wxRIBBON_BAR_SHOW_TOGGLE_BUTTON, + wxRIBBON_BAR_SHOW_HELP_BUTTON, + wxRIBBON_BAR_DEFAULT_STYLE, + wxRIBBON_BAR_FOLDBAR_STYLE +}; + + /** The possible display modes of the panel area of a wxRibbonBar widget. @@ -68,6 +84,35 @@ public: void SetPage(wxRibbonPage* page); }; + +wxEventType wxEVT_RIBBONBAR_PAGE_CHANGED; +wxEventType wxEVT_RIBBONBAR_PAGE_CHANGING; +wxEventType wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN; +wxEventType wxEVT_RIBBONBAR_TAB_MIDDLE_UP; +wxEventType wxEVT_RIBBONBAR_TAB_RIGHT_DOWN; +wxEventType wxEVT_RIBBONBAR_TAB_RIGHT_UP; +wxEventType wxEVT_RIBBONBAR_TAB_LEFT_DCLICK; +wxEventType wxEVT_RIBBONBAR_TOGGLED; +wxEventType wxEVT_RIBBONBAR_HELP_CLICK; + + +class wxRibbonPageTabInfo +{ +public: + wxRect rect; + wxRibbonPage *page; + int ideal_width; + int small_begin_need_separator_width; + int small_must_have_separator_width; + int minimum_width; + bool active; + bool hovered; + bool highlight; + bool shown; +}; + + + /** @class wxRibbonBar diff --git a/interface/wx/ribbon/buttonbar.h b/interface/wx/ribbon/buttonbar.h index 27c396d7ac..7d6c754032 100644 --- a/interface/wx/ribbon/buttonbar.h +++ b/interface/wx/ribbon/buttonbar.h @@ -559,3 +559,7 @@ public: */ bool PopupMenu(wxMenu* menu); }; + + +wxEventType wxEVT_RIBBONBUTTONBAR_CLICKED; +wxEventType wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED; diff --git a/interface/wx/ribbon/gallery.h b/interface/wx/ribbon/gallery.h index e1525ee206..2b34f83a64 100644 --- a/interface/wx/ribbon/gallery.h +++ b/interface/wx/ribbon/gallery.h @@ -297,3 +297,9 @@ public: */ void SetGalleryItem(wxRibbonGalleryItem* item); }; + + +wxEventType wxEVT_RIBBONGALLERY_HOVER_CHANGED; +wxEventType wxEVT_RIBBONGALLERY_SELECTED; +wxEventType wxEVT_RIBBONGALLERY_CLICKED; + diff --git a/interface/wx/ribbon/panel.h b/interface/wx/ribbon/panel.h index a7cae829f4..a4a0e6ee22 100644 --- a/interface/wx/ribbon/panel.h +++ b/interface/wx/ribbon/panel.h @@ -5,6 +5,18 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// + +enum wxRibbonPanelOption +{ + wxRIBBON_PANEL_NO_AUTO_MINIMISE, + wxRIBBON_PANEL_EXT_BUTTON, + wxRIBBON_PANEL_MINIMISE_BUTTON, + wxRIBBON_PANEL_STRETCH, + wxRIBBON_PANEL_FLEXIBLE, + wxRIBBON_PANEL_DEFAULT_STYLE +}; + + /** @class wxRibbonPanelEvent diff --git a/interface/wx/ribbon/toolbar.h b/interface/wx/ribbon/toolbar.h index c73f96380c..62e0ad0d46 100644 --- a/interface/wx/ribbon/toolbar.h +++ b/interface/wx/ribbon/toolbar.h @@ -5,6 +5,7 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// + /** @class wxRibbonToolBar @@ -492,3 +493,20 @@ public: */ virtual void ToggleTool(int tool_id, bool checked); }; + + +class wxRibbonToolBarEvent : public wxCommandEvent +{ +public: + wxRibbonToolBarEvent(wxEventType command_type = wxEVT_NULL, + int win_id = 0, + wxRibbonToolBar* bar = NULL); + + wxRibbonToolBar* GetBar(); + void SetBar(wxRibbonToolBar* bar); + bool PopupMenu(wxMenu* menu); +}; + + +wxEventType wxEVT_RIBBONTOOLBAR_CLICKED; +wxEventType wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED;