wx.ribbon.RibbonArtProvider is responsible for drawing all the components of the ribbon interface.
This allows a ribbon bar to have a pluggable look-and-feel, while retaining the same underlying behaviour. As a single art provider is used for all ribbon components, a ribbon bar usually has a consistent (though unique) appearance.
By default, a wx.ribbon.RibbonBar uses an instance of this class called RibbonDefaultArtProvider
, which resolves to wx.ribbon.RibbonAUIArtProvider, wx.ribbon.RibbonMSWArtProvider, or RibbonOSXArtProvider
- 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. Call wx.ribbon.RibbonBar.SetArtProvider
to change the art provider being used.
See also
wx.ribbon.RibbonMSWArtProvider
Constructor. |
|
Create a new art provider which is a clone of this one. |
|
Draw the background for a wx.ribbon.RibbonButtonBar control. |
|
Draw a single button for a wx.ribbon.RibbonButtonBar control. |
|
Draw the background and chrome for a wx.ribbon.RibbonGallery control. |
|
Draw the background of a single item in a wx.ribbon.RibbonGallery control. |
|
Draw help button on wx.ribbon.RibbonBar. |
|
Draw a minimised ribbon panel. |
|
Draw the background of a ribbon page. |
|
Draw the background and chrome for a ribbon panel. |
|
Draw a ribbon-style scroll button. |
|
Draw a single tab in the tab region of a ribbon bar. |
|
Draw the background of the tab region of a ribbon bar. |
|
Draw a separator between two tabs in a ribbon bar. |
|
Draw toggle button on wx.ribbon.RibbonBar. |
|
Draw a single tool (for a wx.ribbon.RibbonToolBar control). |
|
Draw the background for a wx.ribbon.RibbonToolBar control. |
|
Draw the background for a group of tools on a wx.ribbon.RibbonToolBar control. |
|
Calculate the ideal and minimum width (in pixels) of a tab in a ribbon bar. |
|
Calculate the position and size of the ribbon’s toggle button. |
|
Calculate the size of a button within a wx.ribbon.RibbonButtonBar. |
|
Gets the width of the string if it is used as a wx.ribbon.RibbonButtonBar button label. |
|
Get the value of a certain colour setting. |
|
Get the current colour scheme. |
|
Get the previously set style flags. |
|
Get the value of a certain font setting. |
|
Calculate the client size of a wx.ribbon.RibbonGallery control for a given size. |
|
Calculate the size of a wx.ribbon.RibbonGallery control for a given client size. |
|
Get the value of a certain integer setting. |
|
Calculate the size of a minimised ribbon panel. |
|
Calculate the portion of a page background which needs to be redrawn when a page is resized. |
|
Calculate the client size of a panel for a given overall size. |
|
Calculate the position and size of the panel extension button. |
|
Calculate the size of a panel for a given client size. |
|
Calculate the position and size of the ribbon’s help button. |
|
Calculate the minimum size (in pixels) of a scroll button. |
|
Calculate the height (in pixels) of the tab region of a ribbon bar. |
|
Calculate the size of a tool within a wx.ribbon.RibbonToolBar. |
|
Set the value of a certain colour setting to the value colour. |
|
Set all applicable colour settings from a few base colours. |
|
Set the style flags. |
|
Set the value of a certain font setting to the value font. |
|
Set the value of a certain integer setting to the value new_val. |
wx.ribbon.
RibbonArtProvider
(object)¶Possible constructors:
RibbonArtProvider()
RibbonArtProvider is responsible for drawing all the components of the ribbon interface.
__init__
(self)¶Constructor.
Clone
(self)¶Create a new art provider which is a clone of this one.
DrawButtonBarBackground
(self, dc, wnd, rect)¶Draw the background for a wx.ribbon.RibbonButtonBar control.
DrawButtonBarButton
(self, dc, wnd, rect, kind, state, label, bitmap_large, bitmap_small)¶Draw a single button for a wx.ribbon.RibbonButtonBar control.
dc (wx.DC) – The device context to draw onto.
wnd (wx.Window) – The window which is being drawn onto.
rect (wx.Rect) – The rectangle within which to draw. The size of this rectangle will be a size previously returned by GetButtonBarButtonSize
, and the rectangle will be entirely within a rectangle on the same device context previously painted with DrawButtonBarBackground
.
kind (RibbonButtonKind) – The kind of button to draw (normal, dropdown or hybrid).
state (long) – Combination of a size flag and state flags from the RibbonButtonBarButtonState enumeration.
label (string) – The label of the button.
bitmap_large (wx.Bitmap) – The large bitmap of the button (or the large disabled bitmap when wx.ribbon.RIBBON_BUTTONBAR_BUTTON_DISABLED
is set in state).
bitmap_small (wx.Bitmap) – The small bitmap of the button (or the small disabled bitmap when wx.ribbon.RIBBON_BUTTONBAR_BUTTON_DISABLED
is set in state).
DrawGalleryBackground
(self, dc, wnd, rect)¶Draw the background and chrome for a wx.ribbon.RibbonGallery control.
This should draw the border, background, scroll buttons, extension button, and any other UI elements which are not attached to a specific gallery item.
dc (wx.DC) – The device context to draw onto.
wnd (wx.ribbon.RibbonGallery) – The window which is being drawn onto, which is always the gallery whose background and chrome is being drawn. Attributes used during drawing like the gallery hover state and individual button states can be queried from this parameter by wx.ribbon.RibbonGallery.IsHovered
, wx.ribbon.RibbonGallery.GetExtensionButtonState
, wx.ribbon.RibbonGallery.GetUpButtonState
, and wx.ribbon.RibbonGallery.GetDownButtonState
.
rect (wx.Rect) – The rectangle within which to draw. This rectangle is the entire area of the gallery control, not just the client rectangle.
DrawGalleryItemBackground
(self, dc, wnd, rect, item)¶Draw the background of a single item in a wx.ribbon.RibbonGallery control.
This is painted on top of a gallery background, and behind the items bitmap. Unlike DrawButtonBarButton
and DrawTool
, it is not expected to draw the item bitmap - that is done by the gallery control itself.
dc (wx.DC) – The device context to draw onto.
wnd (wx.ribbon.RibbonGallery) – The window which is being drawn onto, which is always the gallery which contains the item being drawn.
rect (wx.Rect) – The rectangle within which to draw. The size of this rectangle will be the size of the item’s bitmap, expanded by gallery item padding values (wx``wx.ribbon.RIBBON_ART_GALLERY_BITMAP_PADDING_LEFT_SIZE``, wx.ribbon.RIBBON_ART_GALLERY_BITMAP_PADDING_RIGHT_SIZE
, wx.ribbon.RIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE
, and wx.ribbon.RIBBON_ART_GALLERY_BITMAP_PADDING_BOTTOM_SIZE
). The drawing rectangle will be entirely within a rectangle on the same device context previously painted with DrawGalleryBackground
.
item (RibbonGalleryItem) – The item whose background is being painted. Typically the background will vary if the item is hovered, active, or selected; wx.ribbon.RibbonGallery.GetSelection
, wx.ribbon.RibbonGallery.GetActiveItem
, and wx.ribbon.RibbonGallery.GetHoveredItem
can be called to test if the given item is in one of these states.
DrawHelpButton
(self, dc, wnd, rect)¶Draw help button on wx.ribbon.RibbonBar.
This should draw a help button at top right corner of ribbon bar.
dc (wx.DC) – The device context to draw onto.
wnd (wx.ribbon.RibbonBar) – 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.
rect (wx.Rect) – The rectangle within which to draw.
New in version 2.9.5.
DrawMinimisedPanel
(self, dc, wnd, rect, bitmap)¶Draw a minimised ribbon panel.
dc (wx.DC) – The device context to draw onto.
wnd (wx.ribbon.RibbonPanel) – The window which is being drawn onto, which is always the panel which is minimised. The panel label can be obtained from this window. The minimised icon obtained from querying the window may not be the size requested by GetMinimisedPanelMinimumSize
- the bitmap argument contains the icon in the requested size.
rect (wx.Rect) – The rectangle within which to draw. The size of the rectangle will be at least the size returned by GetMinimisedPanelMinimumSize
.
bitmap (wx.Bitmap) – A copy of the panel’s minimised bitmap rescaled to the size returned by GetMinimisedPanelMinimumSize
.
DrawPageBackground
(self, dc, wnd, rect)¶Draw the background of a ribbon page.
dc (wx.DC) – The device context to draw onto.
wnd (wx.Window) – The window which is being drawn onto (which is commonly the wx.ribbon.RibbonPage whose background is being drawn, but doesn’t have to be).
rect (wx.Rect) – The rectangle within which to draw.
See also
DrawPanelBackground
(self, dc, wnd, rect)¶Draw the background and chrome for a ribbon panel.
This should draw the border, background, label, and any other items of a panel which are outside the client area of a panel.
Note that when a panel is minimised, this function is not called - only DrawMinimisedPanel
is called, so a background should be explicitly painted by that if required.
dc (wx.DC) – The device context to draw onto.
wnd (wx.ribbon.RibbonPanel) – 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.
rect (wx.Rect) – The rectangle within which to draw.
DrawScrollButton
(self, dc, wnd, rect, style)¶Draw a ribbon-style scroll button.
dc (wx.DC) – The device context to draw onto.
wnd (wx.Window) – The window which is being drawn onto.
rect (wx.Rect) – The rectangle within which to draw. The size of this rectangle will be at least the size returned by GetScrollButtonMinimumSize
for a scroll button with the same style. For tab scroll buttons, this rectangle will be entirely within a rectangle on the same device context previously painted with DrawTabCtrlBackground
, but this is not guaranteed for other types of button (for example, page scroll buttons will not be painted on an area previously painted with DrawPageBackground
).
style (long) – A combination of flags from wx.ribbon.RibbonScrollButtonStyle, including a direction, a for flag, and one or more states.
DrawTab
(self, dc, wnd, tab)¶Draw a single tab in the tab region of a ribbon bar.
dc (wx.DC) – The device context to draw onto.
wnd (wx.Window) – The window which is being drawn onto (not the wx.ribbon.RibbonPage associated with the tab being drawn).
tab (wx.ribbon.RibbonPageTabInfo) – The rectangle within which to draw, and also the tab label, icon, and state (active and/or hovered). The drawing rectangle will be entirely within a rectangle on the same device context previously painted with DrawTabCtrlBackground
. The rectangle’s width will be at least the minimum value returned by GetBarTabWidth
, and height will be the value returned by GetTabCtrlHeight
.
DrawTabCtrlBackground
(self, dc, wnd, rect)¶Draw the background of the tab region of a ribbon bar.
DrawTabSeparator
(self, dc, wnd, rect, visibility)¶Draw a separator between two tabs in a ribbon bar.
dc (wx.DC) – The device context to draw onto.
wnd (wx.Window) – The window which is being drawn onto.
rect (wx.Rect) – The rectangle within which to draw, which will be entirely within a rectangle on the same device context previously painted with DrawTabCtrlBackground
.
visibility (float) – The opacity with which to draw the separator. Values are in the range [0
, 1]
, with 0 being totally transparent, and 1 being totally opaque.
DrawToggleButton
(self, dc, wnd, rect, mode)¶Draw toggle button on wx.ribbon.RibbonBar.
This should draw a small toggle button at top right corner of ribbon bar.
dc (wx.DC) – The device context to draw onto.
wnd (wx.ribbon.RibbonBar) – 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.
rect (wx.Rect) – The rectangle within which to draw.
mode (RibbonDisplayMode) – The RibbonDisplayMode which should be applied to display button
New in version 2.9.5.
DrawTool
(self, dc, wnd, rect, bitmap, kind, state)¶Draw a single tool (for a wx.ribbon.RibbonToolBar control).
dc (wx.DC) – The device context to draw onto.
wnd (wx.Window) – The window which is being drawn onto. In most cases this will be a wx.ribbon.RibbonToolBar, but it doesn’t have to be.
rect (wx.Rect) – The rectangle within which to draw. The size of this rectangle will at least the size returned by GetToolSize
, and the height of it will be equal for all tools within the same group. The rectangle will be entirely within a rectangle on the same device context previously painted with DrawToolGroupBackground
.
bitmap (wx.Bitmap) – The bitmap to use as the tool’s foreground. If the tool is a hybrid or dropdown tool, then the foreground should also contain a standard dropdown button.
kind (RibbonButtonKind) – The kind of tool to draw (normal, dropdown, or hybrid).
state (long) – A combination of RibbonToolBarToolState flags giving the state of the tool and it’s relative position within a tool group.
DrawToolBarBackground
(self, dc, wnd, rect)¶Draw the background for a wx.ribbon.RibbonToolBar control.
dc (wx.DC) – The device context to draw onto.
wnd (wx.Window) – The which is being drawn onto. In most cases this will be a wx.ribbon.RibbonToolBar, but it doesn’t have to be.
rect (wx.Rect) – The rectangle within which to draw. Some of this rectangle will later be drawn over using DrawToolGroupBackground
and DrawTool
, but not all of it will (unless there is only a single group of tools).
DrawToolGroupBackground
(self, dc, wnd, rect)¶Draw the background for a group of tools on a wx.ribbon.RibbonToolBar control.
dc (wx.DC) – The device context to draw onto.
wnd (wx.Window) – The window which is being drawn onto. In most cases this will be a wx.ribbon.RibbonToolBar, but it doesn’t have to be.
rect (wx.Rect) – The rectangle within which to draw. This rectangle is a union of the individual tools’ rectangles. As there are no gaps between tools, this rectangle will be painted over exactly once by calls to DrawTool
. The group background could therefore be painted by DrawTool
, though it can be conceptually easier and more efficient to draw it all at once here. The rectangle will be entirely within a rectangle on the same device context previously painted with DrawToolBarBackground
.
GetBarTabWidth
(self, dc, wnd, label, bitmap, ideal, small_begin_need_separator, small_must_have_separator, minimum)¶Calculate the ideal and minimum width (in pixels) of a tab in a ribbon bar.
dc (wx.DC) – A device context to use when one is required for size calculations.
wnd (wx.Window) – The window onto which the tab will eventually be drawn.
label (string) – The tab’s label (or “” if it has none).
bitmap (wx.Bitmap) – The tab’s icon (or NullBitmap if it has none).
ideal (int) – The ideal width (in pixels) of the tab.
small_begin_need_separator (int) – A size less than the ideal size, at which a tab separator should begin to be drawn (i.e. drawn, but still fairly transparent).
small_must_have_separator (int) – A size less than the small_begin_need_separator size, at which a tab separator must be drawn (i.e. drawn at full opacity).
minimum (int) – A size less than the small_must_have_separator size, and greater than or equal to zero, which is the minimum pixel width for the tab.
GetBarToggleButtonArea
(self, rect)¶Calculate the position and size of the ribbon’s toggle button.
rect (wx.Rect) – The ribbon bar rectangle from which calculate toggle button rectangle.
Rect
New in version 2.9.5.
GetButtonBarButtonSize
(self, dc, wnd, kind, size, label, text_min_width, bitmap_size_large, bitmap_size_small, button_size, normal_region, dropdown_region)¶Calculate the size of a button within a wx.ribbon.RibbonButtonBar.
dc (wx.DC) – A device context to use when one is required for size calculations.
wnd (wx.Window) – The window onto which the button will eventually be drawn (which is normally a wx.ribbon.RibbonButtonBar, though this is not guaranteed).
kind (RibbonButtonKind) – The kind of button.
size (RibbonButtonBarButtonState) – The size-class to calculate the size for. Buttons on a button bar can have three distinct sizes: wx.ribbon.RIBBON_BUTTONBAR_BUTTON_SMALL
, wx.ribbon.RIBBON_BUTTONBAR_BUTTON_MEDIUM
, and wx.ribbon.RIBBON_BUTTONBAR_BUTTON_LARGE
. If the requested size-class is not applicable, then False
should be returned.
label (string) – The label of the button.
text_min_width (int) – The minimum width of the button label. Set this to 0 if it is not used.
bitmap_size_large (wx.Size) – The size of all “large” bitmaps on the button bar.
bitmap_size_small (wx.Size) – The size of all “small” bitmaps on the button bar.
button_size (wx.Size) – The size, in pixels, of the button.
normal_region (wx.Rect) – The region of the button which constitutes the normal button.
dropdown_region (wx.Rect) – The region of the button which constitutes the dropdown button.
bool
True
if a size exists for the button, False
otherwise.
GetButtonBarButtonTextWidth
(self, dc, label, kind, size)¶Gets the width of the string if it is used as a wx.ribbon.RibbonButtonBar button label.
dc (wx.DC) – A device context to use when one is required for size calculations.
label (string) – The string whose width shall be calculated.
kind (RibbonButtonKind) – The kind of button.
size (RibbonButtonBarButtonState) – The size-class to calculate the size for. Buttons on a button bar can have three distinct sizes: wx.ribbon.RIBBON_BUTTONBAR_BUTTON_SMALL
, wx.ribbon.RIBBON_BUTTONBAR_BUTTON_MEDIUM
, and wx.ribbon.RIBBON_BUTTONBAR_BUTTON_LARGE
. If the requested size-class is not applicable, then None
should be returned.
wx.Coord
Width of the given label text in pixel.
New in version 4.1/wxWidgets-3.1.2.
Note
This function only works with single-line strings.
GetColor
(self, id)¶id (int) –
Colour
GetColour
(self, id)¶Get the value of a certain colour setting.
id can be one of the colour values of wx.ribbon.RibbonArtSetting.
id (int) –
Colour
GetColourScheme
(self)¶Get the current colour scheme.
Returns three colours such that if SetColourScheme
were called with them, the colour scheme would be restored to what it was when SetColourScheme
was last called. In practice, this usually means that the returned values are the three colours given in the last call to SetColourScheme
, however if SetColourScheme
performs an idempotent operation upon the colours it is given (like clamping a component of the colour), then the returned values may not be the three colours given in the last call to SetColourScheme
. If SetColourScheme
has not been called, then the returned values should result in a colour scheme similar to, if not identical to, the 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 dependent upon the last values given to SetColourScheme
, as described above.
tuple
Note
The Python version of this method returns the three scheme colours as a tuple of wx.Colour
objects.
( primary, secondary, tertiary )
GetFlags
(self)¶Get the previously set style flags.
long
GetFont
(self, id)¶Get the value of a certain font setting.
id can be one of the font values of wx.ribbon.RibbonArtSetting.
id (int) –
Font
GetGalleryClientSize
(self, dc, wnd, size, client_offset, scroll_up_button, scroll_down_button, extension_button)¶Calculate the client size of a wx.ribbon.RibbonGallery control for a given size.
This should act as the inverse to GetGallerySize
, and decrement the given size by enough to fit the gallery border, buttons, and other chrome.
dc (wx.DC) – A device context to use if one is required for size calculations.
wnd (wx.ribbon.RibbonGallery) – The gallery in question.
size (wx.Size) – The overall size to calculate the client size for.
client_offset (wx.Point) – The position within the given size at which the returned client size begins.
scroll_up_button (wx.Rect) – The rectangle within the given size which the scroll up button occupies.
scroll_down_button (wx.Rect) – The rectangle within the given size which the scroll down button occupies.
extension_button (wx.Rect) – The rectangle within the given size which the extension button occupies.
Size
GetGallerySize
(self, dc, wnd, client_size)¶Calculate the size of a wx.ribbon.RibbonGallery control for a given client size.
This should increment the given size by enough to fit the gallery border, buttons, and any other chrome.
dc (wx.DC) – A device context to use if one is required for size calculations.
wnd (wx.ribbon.RibbonGallery) – The gallery in question.
client_size (wx.Size) – The client size.
Size
See also
GetMetric
(self, id)¶Get the value of a certain integer setting.
id can be one of the size values of wx.ribbon.RibbonArtSetting.
id (int) –
int
GetMinimisedPanelMinimumSize
(self, dc, wnd, desired_bitmap_size, expanded_panel_direction)¶Calculate the size of a minimised ribbon panel.
dc (wx.DC) – A device context to use when one is required for size calculations.
wnd (wx.ribbon.RibbonPanel) – The ribbon panel in question. Attributes like the panel label can be queried from this.
desired_bitmap_size (wx.Size) – Optional parameter which is filled with the size of the bitmap suitable for a minimised ribbon panel.
expanded_panel_direction (Direction) – Optional parameter which is filled with the direction of the minimised panel ( EAST
or SOUTH
depending on the style).
Size
GetPageBackgroundRedrawArea
(self, dc, wnd, page_old_size, page_new_size)¶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 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.
dc (wx.DC) – A device context to use when one is required for size calculations.
wnd (wx.ribbon.RibbonPage) – The page which is being resized.
page_old_size (wx.Size) – The size of the page prior to the resize (which has already been painted).
page_new_size (wx.Size) – The size of the page after the resize.
Rect
GetPanelClientSize
(self, dc, wnd, size, client_offset)¶Calculate the client size of a panel for a given overall size.
This should act as the inverse to GetPanelSize
, and decrement the given size by enough to fit the panel label and other chrome.
dc (wx.DC) – A device context to use if one is required for size calculations.
wnd (wx.ribbon.RibbonPanel) – The ribbon panel in question.
size (wx.Size) – The overall size to calculate client size for.
client_offset (wx.Point) – The offset where the returned client size begins within the given size (may be None
).
Size
See also
GetPanelExtButtonArea
(self, dc, wnd, rect)¶Calculate the position and size of the panel extension button.
dc (wx.DC) – A device context to use if one is required for size calculations.
wnd (wx.ribbon.RibbonPanel) – The ribbon panel in question.
rect (wx.Rect) – The panel rectangle from which calculate extension button rectangle.
Rect
New in version 2.9.4.
GetPanelSize
(self, dc, wnd, client_size, client_offset)¶Calculate the size of a panel for a given client size.
This should increment the given size by enough to fit the panel label and other chrome.
dc (wx.DC) – A device context to use if one is required for size calculations.
wnd (wx.ribbon.RibbonPanel) – The ribbon panel in question.
client_size (wx.Size) – The client size.
client_offset (wx.Point) – The offset where the client rectangle begins within the panel (may be None
).
Size
See also
GetRibbonHelpButtonArea
(self, rect)¶Calculate the position and size of the ribbon’s help button.
rect (wx.Rect) – The ribbon bar rectangle from which calculate help button rectangle.
Rect
New in version 2.9.5.
GetScrollButtonMinimumSize
(self, dc, wnd, style)¶Calculate the minimum size (in pixels) of a scroll button.
dc (wx.DC) – A device context to use when one is required for size calculations.
wnd (wx.Window) – The window onto which the scroll button will eventually be drawn.
style (long) – A combination of flags from wx.ribbon.RibbonScrollButtonStyle, including a direction, and a for flag (state flags may be given too, but should be ignored, as a button should retain a constant size, regardless of its state).
Size
GetTabCtrlHeight
(self, dc, wnd, pages)¶Calculate the height (in pixels) of the tab region of a ribbon bar.
Note that as the tab region can contain scroll buttons, the height should be greater than or equal to the minimum height for a tab scroll button.
GetToolSize
(self, dc, wnd, bitmap_size, kind, is_first, is_last, dropdown_region)¶Calculate the size of a tool within a wx.ribbon.RibbonToolBar.
dc (wx.DC) – A device context to use when one is required for size calculations.
wnd (wx.Window) – The window onto which the tool will eventually be drawn.
bitmap_size (wx.Size) – The size of the tool’s foreground bitmap.
kind (RibbonButtonKind) – The kind of tool (normal, dropdown, or hybrid).
is_first (bool) – True
if the tool is the first within its group. False
otherwise.
is_last (bool) – True
if the tool is the last within its group. False
otherwise.
dropdown_region (wx.Rect) – For dropdown and hybrid tools, the region within the returned size which counts as the dropdown part.
Size
SetColour
(self, id, colour)¶Set the value of a certain colour setting to the value colour.
id can be one of the colour values of wx.ribbon.RibbonArtSetting, though not all colour settings will have an effect on every art provider.
id (int) –
colour (wx.Colour) –
See also
SetColourScheme
(self, primary, secondary, tertiary)¶Set all applicable colour settings from a few base colours.
Uses any or all of the three given colours to create a colour scheme, and then sets all colour settings which are relevant to the art provider using that scheme. Note that some art providers may not use the tertiary colour for anything, and some may not use the secondary colour either.
SetFlags
(self, flags)¶Set the style flags.
Normally called automatically by wx.ribbon.RibbonBar.SetArtProvider
with the ribbon bar’s style flags, so that the art provider has the same flags as the bar which it is serving.
flags (long) –
SetFont
(self, id, font)¶Set the value of a certain font setting to the value font.
id can be one of the font values of wx.ribbon.RibbonArtSetting.
id (int) –
font (wx.Font) –
SetMetric
(self, id, new_val)¶Set the value of a certain integer setting to the value new_val.
id can be one of the size values of wx.ribbon.RibbonArtSetting.
id (int) –
new_val (int) –