X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c3ead1d1513a5eb79091a604f4e42b45d1bdf5d..92c0fc34c104c8d7c12d6a3b78ea232690fc23f4:/interface/wx/ribbon/art.h?ds=sidebyside diff --git a/interface/wx/ribbon/art.h b/interface/wx/ribbon/art.h index bfaa5a1597..40a4768297 100644 --- a/interface/wx/ribbon/art.h +++ b/interface/wx/ribbon/art.h @@ -2,7 +2,6 @@ // Name: ribbon/art.h // Purpose: interface of wxRibbonArtProvider // Author: Peter Cawley -// RCS-ID: $Id$ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -35,6 +34,8 @@ enum wxRibbonArtSetting wxRIBBON_ART_BUTTON_BAR_LABEL_FONT, wxRIBBON_ART_TAB_LABEL_FONT, wxRIBBON_ART_BUTTON_BAR_LABEL_COLOUR, + /// @since 2.9.5 + wxRIBBON_ART_BUTTON_BAR_LABEL_DISABLED_COLOUR, wxRIBBON_ART_BUTTON_BAR_HOVER_BORDER_COLOUR, wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR, @@ -174,6 +175,12 @@ enum wxRibbonButtonKind menu, and one which causes a generic action. */ wxRIBBON_BUTTON_HYBRID = wxRIBBON_BUTTON_NORMAL | wxRIBBON_BUTTON_DROPDOWN, + + /** + Normal button or tool with a clickable area which toggles the button + between a pressed and unpressed state. + */ + wxRIBBON_BUTTON_TOGGLE = 1 << 2 }; /** @@ -186,8 +193,8 @@ enum wxRibbonButtonKind appearance. By default, a wxRibbonBar uses an instance of this class called - wxRibbonDefaultArtProvider, which resolves to wxRibbonAUIArtProvider, - wxRibbonMSWArtProvider, or wxRibbonOSXArtProvider - whichever is most appropriate + @c wxRibbonDefaultArtProvider, which resolves to @c wxRibbonAUIArtProvider, + @c wxRibbonMSWArtProvider, or @c wxRibbonOSXArtProvider - whichever is most appropriate to the current platform. These art providers are all slightly configurable with regard to colours and fonts, but for larger modifications, you can derive from one of these classes, or write a completely new art provider class. @@ -263,19 +270,19 @@ public: /** Set the value of a certain colour setting to the value @e colour. @a id can be one of the colour values of @ref wxRibbonArtSetting, though - not all colour settings will have an affect on every art provider. + not all colour settings will have an effect on every art provider. - \see SetColourScheme() + @see SetColourScheme() */ virtual void SetColour(int id, const wxColor& colour) = 0; /** - \see wxRibbonArtProvider::GetColour() + @see wxRibbonArtProvider::GetColour() */ wxColour GetColor(int id) const; /** - \see wxRibbonArtProvider::SetColour() + @see wxRibbonArtProvider::SetColour() */ void SetColor(int id, const wxColour& color); @@ -295,14 +302,14 @@ public: default colours of the art provider. Note that if SetColour() is called, then GetColourScheme() does not try and return a colour scheme similar to colours being used - it's return - values are dependant upon the last values given to SetColourScheme(), + values are dependent upon the last values given to SetColourScheme(), as described above. - \param[out] primary + @param[out] primary Pointer to a location to store the primary colour, or NULL. - \param[out] secondary + @param[out] secondary Pointer to a location to store the secondary colour, or NULL. - \param[out] tertiary + @param[out] tertiary Pointer to a location to store the tertiary colour, or NULL. */ virtual void GetColourScheme(wxColour* primary, @@ -318,8 +325,8 @@ public: Note that some art providers may not use the tertiary colour for anything, and some may not use the secondary colour either. - \see SetColour() - \see GetColourScheme() + @see SetColour() + @see GetColourScheme() */ virtual void SetColourScheme(const wxColour& primary, const wxColour& secondary, @@ -449,7 +456,7 @@ public: /** Draw the background and chrome for a wxRibbonGallery control. This - should draw the border, brackground, scroll buttons, extension button, + should draw the border, background, scroll buttons, extension button, and any other UI elements which are not attached to a specific gallery item. @@ -655,6 +662,47 @@ public: wxRibbonButtonKind kind, long state) = 0; + /** + Draw toggle button on wxRibbonBar. This should draw a small toggle button + at top right corner of ribbon bar. + + @param dc + The device context to draw onto. + @param wnd + The window which is being drawn onto, which is always the panel + whose background and chrome is being drawn. The panel label and + other panel attributes can be obtained by querying this. + @param rect + The rectangle within which to draw. + @param mode + The wxRibbonDisplayMode which should be applied to display button + + @since 2.9.5 + */ + virtual void DrawToggleButton(wxDC& dc, + wxRibbonBar* wnd, + const wxRect& rect, + wxRibbonDisplayMode mode) = 0; + + /** + Draw help button on wxRibbonBar. This should draw a help button + at top right corner of ribbon bar. + + @param dc + The device context to draw onto. + @param wnd + The window which is being drawn onto, which is always the panel + whose background and chrome is being drawn. The panel label and + other panel attributes can be obtained by querying this. + @param rect + The rectangle within which to draw. + + @since 2.9.5 + */ + virtual void DrawHelpButton(wxDC& dc, + wxRibbonBar* wnd, + const wxRect& rect) = 0; + /** Calculate the ideal and minimum width (in pixels) of a tab in a ribbon bar. @@ -770,7 +818,24 @@ public: const wxRibbonPanel* wnd, wxSize size, wxPoint* client_offset) = 0; - + + /** + Calculate the position and size of the panel extension button. + + @param dc + A device context to use if one is required for size calculations. + @param wnd + The ribbon panel in question. + @param rect + The panel rectangle from which calculate extension button rectangle. + + @since 2.9.4 + */ + virtual wxRect GetPanelExtButtonArea( + wxDC& dc, + const wxRibbonPanel* wnd, + wxRect rect) = 0; + /** Calculate the size of a wxRibbonGallery control for a given client size. This should increment the given size by enough to fit the gallery @@ -827,7 +892,7 @@ public: /** Calculate the portion of a page background which needs to be redrawn when a page is resized. To optimise the drawing of page backgrounds, as - small an area as possible should be returned. Of couse, if the way in + small an area as possible should be returned. Of course, if the way in which a background is drawn means that the entire background needs to be repainted on resize, then the entire new size should be returned. @@ -899,7 +964,11 @@ public: The ribbon panel in question. Attributes like the panel label can be queried from this. @param[out] desired_bitmap_size - + Optional parameter which is filled with the size of the bitmap + suitable for a minimised ribbon panel. + @param[out] expanded_panel_direction + Optional parameter which is filled with the direction of the + minimised panel (@c wxEAST or @c wxSOUTH depending on the style). */ virtual wxSize GetMinimisedPanelMinimumSize( wxDC& dc, @@ -934,4 +1003,24 @@ public: bool is_first, bool is_last, wxRect* dropdown_region) = 0; + + /** + Calculate the position and size of the ribbon's toggle button. + + @param rect + The ribbon bar rectangle from which calculate toggle button rectangle. + + @since 2.9.5 + */ + virtual wxRect GetBarToggleButtonArea(const wxRect& rect) = 0; + + /** + Calculate the position and size of the ribbon's help button. + + @param rect + The ribbon bar rectangle from which calculate help button rectangle. + + @since 2.9.5 + */ + virtual wxRect GetRibbonHelpButtonArea(const wxRect& rect) = 0; };