Version: 3.0.4
wxRibbonMSWArtProvider Class Reference

#include <wx/ribbon/art.h>

+ Inheritance diagram for wxRibbonMSWArtProvider:

Public Member Functions

 wxRibbonMSWArtProvider (bool set_colour_scheme=true)
 
virtual ~wxRibbonMSWArtProvider ()
 
wxRibbonArtProviderClone () const
 Create a new art provider which is a clone of this one. More...
 
void SetFlags (long flags)
 Set the style flags. More...
 
long GetFlags () const
 Get the previously set style flags. More...
 
int GetMetric (int id) const
 Get the value of a certain integer setting. More...
 
void SetMetric (int id, int new_val)
 Set the value of a certain integer setting to the value new_val. More...
 
void SetFont (int id, const wxFont &font)
 Set the value of a certain font setting to the value font. More...
 
wxFont GetFont (int id) const
 Get the value of a certain font setting. More...
 
wxColour GetColour (int id) const
 Get the value of a certain colour setting. More...
 
void SetColour (int id, const wxColour &colour)
 Set the value of a certain colour setting to the value colour. More...
 
void GetColourScheme (wxColour *primary, wxColour *secondary, wxColour *tertiary) const
 Get the current colour scheme. More...
 
void SetColourScheme (const wxColour &primary, const wxColour &secondary, const wxColour &tertiary)
 Set all applicable colour settings from a few base colours. More...
 
int GetTabCtrlHeight (wxDC &dc, wxWindow *wnd, const wxRibbonPageTabInfoArray &pages)
 Calculate the height (in pixels) of the tab region of a ribbon bar. More...
 
void DrawTabCtrlBackground (wxDC &dc, wxWindow *wnd, const wxRect &rect)
 Draw the background of the tab region of a ribbon bar. More...
 
void DrawTab (wxDC &dc, wxWindow *wnd, const wxRibbonPageTabInfo &tab)
 Draw a single tab in the tab region of a ribbon bar. More...
 
void DrawTabSeparator (wxDC &dc, wxWindow *wnd, const wxRect &rect, double visibility)
 Draw a separator between two tabs in a ribbon bar. More...
 
void DrawPageBackground (wxDC &dc, wxWindow *wnd, const wxRect &rect)
 Draw the background of a ribbon page. More...
 
void DrawScrollButton (wxDC &dc, wxWindow *wnd, const wxRect &rect, long style)
 Draw a ribbon-style scroll button. More...
 
void DrawPanelBackground (wxDC &dc, wxRibbonPanel *wnd, const wxRect &rect)
 Draw the background and chrome for a ribbon panel. More...
 
void DrawGalleryBackground (wxDC &dc, wxRibbonGallery *wnd, const wxRect &rect)
 Draw the background and chrome for a wxRibbonGallery control. More...
 
void DrawGalleryItemBackground (wxDC &dc, wxRibbonGallery *wnd, const wxRect &rect, wxRibbonGalleryItem *item)
 Draw the background of a single item in a wxRibbonGallery control. More...
 
void DrawMinimisedPanel (wxDC &dc, wxRibbonPanel *wnd, const wxRect &rect, wxBitmap &bitmap)
 Draw a minimised ribbon panel. More...
 
void DrawButtonBarBackground (wxDC &dc, wxWindow *wnd, const wxRect &rect)
 Draw the background for a wxRibbonButtonBar control. More...
 
void DrawButtonBarButton (wxDC &dc, wxWindow *wnd, const wxRect &rect, wxRibbonButtonKind kind, long state, const wxString &label, const wxBitmap &bitmap_large, const wxBitmap &bitmap_small)
 Draw a single button for a wxRibbonButtonBar control. More...
 
void DrawToolBarBackground (wxDC &dc, wxWindow *wnd, const wxRect &rect)
 Draw the background for a wxRibbonToolBar control. More...
 
void DrawToolGroupBackground (wxDC &dc, wxWindow *wnd, const wxRect &rect)
 Draw the background for a group of tools on a wxRibbonToolBar control. More...
 
void DrawTool (wxDC &dc, wxWindow *wnd, const wxRect &rect, const wxBitmap &bitmap, wxRibbonButtonKind kind, long state)
 Draw a single tool (for a wxRibbonToolBar control). More...
 
void DrawToggleButton (wxDC &dc, wxRibbonBar *wnd, const wxRect &rect, wxRibbonDisplayMode mode)
 Draw toggle button on wxRibbonBar. More...
 
void DrawHelpButton (wxDC &dc, wxRibbonBar *wnd, const wxRect &rect)
 Draw help button on wxRibbonBar. More...
 
void GetBarTabWidth (wxDC &dc, wxWindow *wnd, const wxString &label, const wxBitmap &bitmap, int *ideal, int *small_begin_need_separator, int *small_must_have_separator, int *minimum)
 Calculate the ideal and minimum width (in pixels) of a tab in a ribbon bar. More...
 
wxSize GetScrollButtonMinimumSize (wxDC &dc, wxWindow *wnd, long style)
 Calculate the minimum size (in pixels) of a scroll button. More...
 
wxSize GetPanelSize (wxDC &dc, const wxRibbonPanel *wnd, wxSize client_size, wxPoint *client_offset)
 Calculate the size of a panel for a given client size. More...
 
wxSize GetPanelClientSize (wxDC &dc, const wxRibbonPanel *wnd, wxSize size, wxPoint *client_offset)
 Calculate the client size of a panel for a given overall size. More...
 
wxRect GetPanelExtButtonArea (wxDC &dc, const wxRibbonPanel *wnd, wxRect rect)
 Calculate the position and size of the panel extension button. More...
 
wxSize GetGallerySize (wxDC &dc, const wxRibbonGallery *wnd, wxSize client_size)
 Calculate the size of a wxRibbonGallery control for a given client size. More...
 
wxSize GetGalleryClientSize (wxDC &dc, const wxRibbonGallery *wnd, wxSize size, wxPoint *client_offset, wxRect *scroll_up_button, wxRect *scroll_down_button, wxRect *extension_button)
 Calculate the client size of a wxRibbonGallery control for a given size. More...
 
wxRect GetPageBackgroundRedrawArea (wxDC &dc, const wxRibbonPage *wnd, wxSize page_old_size, wxSize page_new_size)
 Calculate the portion of a page background which needs to be redrawn when a page is resized. More...
 
bool GetButtonBarButtonSize (wxDC &dc, wxWindow *wnd, wxRibbonButtonKind kind, wxRibbonButtonBarButtonState size, const wxString &label, wxSize bitmap_size_large, wxSize bitmap_size_small, wxSize *button_size, wxRect *normal_region, wxRect *dropdown_region)
 Calculate the size of a button within a wxRibbonButtonBar. More...
 
wxSize GetMinimisedPanelMinimumSize (wxDC &dc, const wxRibbonPanel *wnd, wxSize *desired_bitmap_size, wxDirection *expanded_panel_direction)
 Calculate the size of a minimised ribbon panel. More...
 
wxSize GetToolSize (wxDC &dc, wxWindow *wnd, wxSize bitmap_size, wxRibbonButtonKind kind, bool is_first, bool is_last, wxRect *dropdown_region)
 Calculate the size of a tool within a wxRibbonToolBar. More...
 
wxRect GetBarToggleButtonArea (const wxRect &rect)
 Calculate the position and size of the ribbon's toggle button. More...
 
wxRect GetRibbonHelpButtonArea (const wxRect &rect)
 Calculate the position and size of the ribbon's help button. More...
 
- Public Member Functions inherited from wxRibbonArtProvider
 wxRibbonArtProvider ()
 Constructor. More...
 
virtual ~wxRibbonArtProvider ()
 Destructor. More...
 
wxColour GetColor (int id) const
 
void SetColor (int id, const wxColour &color)
 

Constructor & Destructor Documentation

wxRibbonMSWArtProvider::wxRibbonMSWArtProvider ( bool  set_colour_scheme = true)
virtual wxRibbonMSWArtProvider::~wxRibbonMSWArtProvider ( )
virtual

Member Function Documentation

wxRibbonArtProvider* wxRibbonMSWArtProvider::Clone ( ) const
virtual

Create a new art provider which is a clone of this one.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawButtonBarBackground ( wxDC dc,
wxWindow wnd,
const wxRect rect 
)
virtual

Draw the background for a wxRibbonButtonBar control.

Parameters
dcThe device context to draw onto.
wndThe window which is being drawn onto (which will typically be the button bar itself, though this is not guaranteed).
rectThe rectangle within which to draw.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawButtonBarButton ( wxDC dc,
wxWindow wnd,
const wxRect rect,
wxRibbonButtonKind  kind,
long  state,
const wxString label,
const wxBitmap bitmap_large,
const wxBitmap bitmap_small 
)
virtual

Draw a single button for a wxRibbonButtonBar control.

Parameters
dcThe device context to draw onto.
wndThe window which is being drawn onto.
rectThe 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().
kindThe kind of button to draw (normal, dropdown or hybrid).
stateCombination of a size flag and state flags from the wxRibbonButtonBarButtonState enumeration.
labelThe label of the button.
bitmap_largeThe large bitmap of the button (or the large disabled bitmap when wxRIBBON_BUTTONBAR_BUTTON_DISABLED is set in state).
bitmap_smallThe small bitmap of the button (or the small disabled bitmap when wxRIBBON_BUTTONBAR_BUTTON_DISABLED is set in state).

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawGalleryBackground ( wxDC dc,
wxRibbonGallery wnd,
const wxRect rect 
)
virtual

Draw the background and chrome for a wxRibbonGallery 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.

Parameters
dcThe device context to draw onto.
wndThe 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 wxRibbonGallery::IsHovered(), wxRibbonGallery::GetExtensionButtonState(), wxRibbonGallery::GetUpButtonState(), and wxRibbonGallery::GetDownButtonState().
rectThe rectangle within which to draw. This rectangle is the entire area of the gallery control, not just the client rectangle.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawGalleryItemBackground ( wxDC dc,
wxRibbonGallery wnd,
const wxRect rect,
wxRibbonGalleryItem *  item 
)
virtual

Draw the background of a single item in a wxRibbonGallery 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.

Parameters
dcThe device context to draw onto.
wndThe window which is being drawn onto, which is always the gallery which contains the item being drawn.
rectThe 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 (wxRIBBON_ART_GALLERY_BITMAP_PADDING_LEFT_SIZE, wxRIBBON_ART_GALLERY_BITMAP_PADDING_RIGHT_SIZE, wxRIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE, and wxRIBBON_ART_GALLERY_BITMAP_PADDING_BOTTOM_SIZE). The drawing rectangle will be entirely within a rectangle on the same device context previously painted with DrawGalleryBackground().
itemThe item whose background is being painted. Typically the background will vary if the item is hovered, active, or selected; wxRibbonGallery::GetSelection(), wxRibbonGallery::GetActiveItem(), and wxRibbonGallery::GetHoveredItem() can be called to test if the given item is in one of these states.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawHelpButton ( wxDC dc,
wxRibbonBar wnd,
const wxRect rect 
)
virtual

Draw help button on wxRibbonBar.

This should draw a help button at top right corner of ribbon bar.

Parameters
dcThe device context to draw onto.
wndThe 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.
rectThe rectangle within which to draw.
Since
2.9.5

Implements wxRibbonArtProvider.

void wxRibbonMSWArtProvider::DrawMinimisedPanel ( wxDC dc,
wxRibbonPanel wnd,
const wxRect rect,
wxBitmap bitmap 
)
virtual

Draw a minimised ribbon panel.

Parameters
dcThe device context to draw onto.
wndThe 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.
rectThe rectangle within which to draw. The size of the rectangle will be at least the size returned by GetMinimisedPanelMinimumSize().
bitmapA copy of the panel's minimised bitmap rescaled to the size returned by GetMinimisedPanelMinimumSize().

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawPageBackground ( wxDC dc,
wxWindow wnd,
const wxRect rect 
)
virtual

Draw the background of a ribbon page.

Parameters
dcThe device context to draw onto.
wndThe window which is being drawn onto (which is commonly the wxRibbonPage whose background is being drawn, but doesn't have to be).
rectThe rectangle within which to draw.
See also
GetPageBackgroundRedrawArea

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawPanelBackground ( wxDC dc,
wxRibbonPanel wnd,
const wxRect rect 
)
virtual

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.

Parameters
dcThe device context to draw onto.
wndThe 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.
rectThe rectangle within which to draw.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawScrollButton ( wxDC dc,
wxWindow wnd,
const wxRect rect,
long  style 
)
virtual

Draw a ribbon-style scroll button.

Parameters
dcThe device context to draw onto.
wndThe window which is being drawn onto.
rectThe 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()).
styleA combination of flags from wxRibbonScrollButtonStyle, including a direction, a for flag, and one or more states.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawTab ( wxDC dc,
wxWindow wnd,
const wxRibbonPageTabInfo tab 
)
virtual

Draw a single tab in the tab region of a ribbon bar.

Parameters
dcThe device context to draw onto.
wndThe window which is being drawn onto (not the wxRibbonPage associated with the tab being drawn).
tabThe 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().

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawTabCtrlBackground ( wxDC dc,
wxWindow wnd,
const wxRect rect 
)
virtual

Draw the background of the tab region of a ribbon bar.

Parameters
dcThe device context to draw onto.
wndThe window which is being drawn onto.
rectThe rectangle within which to draw.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawTabSeparator ( wxDC dc,
wxWindow wnd,
const wxRect rect,
double  visibility 
)
virtual

Draw a separator between two tabs in a ribbon bar.

Parameters
dcThe device context to draw onto.
wndThe window which is being drawn onto.
rectThe rectangle within which to draw, which will be entirely within a rectangle on the same device context previously painted with DrawTabCtrlBackground().
visibilityThe opacity with which to draw the separator. Values are in the range [0, 1], with 0 being totally transparent, and 1 being totally opaque.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawToggleButton ( wxDC dc,
wxRibbonBar wnd,
const wxRect rect,
wxRibbonDisplayMode  mode 
)
virtual

Draw toggle button on wxRibbonBar.

This should draw a small toggle button at top right corner of ribbon bar.

Parameters
dcThe device context to draw onto.
wndThe 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.
rectThe rectangle within which to draw.
modeThe wxRibbonDisplayMode which should be applied to display button
Since
2.9.5

Implements wxRibbonArtProvider.

void wxRibbonMSWArtProvider::DrawTool ( wxDC dc,
wxWindow wnd,
const wxRect rect,
const wxBitmap bitmap,
wxRibbonButtonKind  kind,
long  state 
)
virtual

Draw a single tool (for a wxRibbonToolBar control).

Parameters
dcThe device context to draw onto.
wndThe window which is being drawn onto. In most cases this will be a wxRibbonToolBar, but it doesn't have to be.
rectThe 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().
bitmapThe 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.
kindThe kind of tool to draw (normal, dropdown, or hybrid).
stateA combination of wxRibbonToolBarToolState flags giving the state of the tool and it's relative position within a tool group.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawToolBarBackground ( wxDC dc,
wxWindow wnd,
const wxRect rect 
)
virtual

Draw the background for a wxRibbonToolBar control.

Parameters
dcThe device context to draw onto.
wndThe which is being drawn onto. In most cases this will be a wxRibbonToolBar, but it doesn't have to be.
rectThe 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).

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::DrawToolGroupBackground ( wxDC dc,
wxWindow wnd,
const wxRect rect 
)
virtual

Draw the background for a group of tools on a wxRibbonToolBar control.

Parameters
dcThe device context to draw onto.
wndThe window which is being drawn onto. In most cases this will be a wxRibbonToolBar, but it doesn't have to be.
rectThe 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().

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::GetBarTabWidth ( wxDC dc,
wxWindow wnd,
const wxString label,
const wxBitmap bitmap,
int *  ideal,
int *  small_begin_need_separator,
int *  small_must_have_separator,
int *  minimum 
)
virtual

Calculate the ideal and minimum width (in pixels) of a tab in a ribbon bar.

Parameters
dcA device context to use when one is required for size calculations.
wndThe window onto which the tab will eventually be drawn.
labelThe tab's label (or wxEmptyString if it has none).
bitmapThe tab's icon (or wxNullBitmap if it has none).
[out]idealThe ideal width (in pixels) of the tab.
[out]small_begin_need_separatorA size less than the ideal size, at which a tab separator should begin to be drawn (i.e. drawn, but still fairly transparent).
[out]small_must_have_separatorA size less than the small_begin_need_separator size, at which a tab separator must be drawn (i.e. drawn at full opacity).
[out]minimumA 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.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

wxRect wxRibbonMSWArtProvider::GetBarToggleButtonArea ( const wxRect rect)
virtual

Calculate the position and size of the ribbon's toggle button.

Parameters
rectThe ribbon bar rectangle from which calculate toggle button rectangle.
Since
2.9.5

Implements wxRibbonArtProvider.

bool wxRibbonMSWArtProvider::GetButtonBarButtonSize ( wxDC dc,
wxWindow wnd,
wxRibbonButtonKind  kind,
wxRibbonButtonBarButtonState  size,
const wxString label,
wxSize  bitmap_size_large,
wxSize  bitmap_size_small,
wxSize button_size,
wxRect normal_region,
wxRect dropdown_region 
)
virtual

Calculate the size of a button within a wxRibbonButtonBar.

Parameters
dcA device context to use when one is required for size calculations.
wndThe window onto which the button will eventually be drawn (which is normally a wxRibbonButtonBar, though this is not guaranteed).
kindThe kind of button.
sizeThe size-class to calculate the size for. Buttons on a button bar can have three distinct sizes: wxRIBBON_BUTTONBAR_BUTTON_SMALL, wxRIBBON_BUTTONBAR_BUTTON_MEDIUM, and wxRIBBON_BUTTONBAR_BUTTON_LARGE. If the requested size-class is not applicable, then false should be returned.
labelThe label of the button.
bitmap_size_largeThe size of all "large" bitmaps on the button bar.
bitmap_size_smallThe size of all "small" bitmaps on the button bar.
[out]button_sizeThe size, in pixels, of the button.
[out]normal_regionThe region of the button which constitutes the normal button.
[out]dropdown_regionThe region of the button which constitutes the dropdown button.
Returns
true if a size exists for the button, false otherwise.

Implements wxRibbonArtProvider.

wxColour wxRibbonMSWArtProvider::GetColour ( int  id) const
virtual

Get the value of a certain colour setting.

id can be one of the colour values of wxRibbonArtSetting.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::GetColourScheme ( wxColour primary,
wxColour secondary,
wxColour tertiary 
) const
virtual

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.

Parameters
[out]primaryPointer to a location to store the primary colour, or NULL.
[out]secondaryPointer to a location to store the secondary colour, or NULL.
[out]tertiaryPointer to a location to store the tertiary colour, or NULL.

Implements wxRibbonArtProvider.

long wxRibbonMSWArtProvider::GetFlags ( ) const
virtual

Get the previously set style flags.

Implements wxRibbonArtProvider.

wxFont wxRibbonMSWArtProvider::GetFont ( int  id) const
virtual

Get the value of a certain font setting.

id can be one of the font values of wxRibbonArtSetting.

Implements wxRibbonArtProvider.

wxSize wxRibbonMSWArtProvider::GetGalleryClientSize ( wxDC dc,
const wxRibbonGallery wnd,
wxSize  size,
wxPoint client_offset,
wxRect scroll_up_button,
wxRect scroll_down_button,
wxRect extension_button 
)
virtual

Calculate the client size of a wxRibbonGallery 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.

Parameters
dcA device context to use if one is required for size calculations.
wndThe gallery in question.
sizeThe overall size to calculate the client size for.
[out]client_offsetThe position within the given size at which the returned client size begins.
[out]scroll_up_buttonThe rectangle within the given size which the scroll up button occupies.
[out]scroll_down_buttonThe rectangle within the given size which the scroll down button occupies.
[out]extension_buttonThe rectangle within the given size which the extension button occupies.

Implements wxRibbonArtProvider.

wxSize wxRibbonMSWArtProvider::GetGallerySize ( wxDC dc,
const wxRibbonGallery wnd,
wxSize  client_size 
)
virtual

Calculate the size of a wxRibbonGallery control for a given client size.

This should increment the given size by enough to fit the gallery border, buttons, and any other chrome.

Parameters
dcA device context to use if one is required for size calculations.
wndThe gallery in question.
client_sizeThe client size.
See also
GetGalleryClientSize()

Implements wxRibbonArtProvider.

int wxRibbonMSWArtProvider::GetMetric ( int  id) const
virtual

Get the value of a certain integer setting.

id can be one of the size values of wxRibbonArtSetting.

Implements wxRibbonArtProvider.

wxSize wxRibbonMSWArtProvider::GetMinimisedPanelMinimumSize ( wxDC dc,
const wxRibbonPanel wnd,
wxSize desired_bitmap_size,
wxDirection expanded_panel_direction 
)
virtual

Calculate the size of a minimised ribbon panel.

Parameters
dcA device context to use when one is required for size calculations.
wndThe ribbon panel in question. Attributes like the panel label can be queried from this.
[out]desired_bitmap_sizeOptional parameter which is filled with the size of the bitmap suitable for a minimised ribbon panel.
[out]expanded_panel_directionOptional parameter which is filled with the direction of the minimised panel (wxEAST or wxSOUTH depending on the style).

Implements wxRibbonArtProvider.

wxRect wxRibbonMSWArtProvider::GetPageBackgroundRedrawArea ( wxDC dc,
const wxRibbonPage wnd,
wxSize  page_old_size,
wxSize  page_new_size 
)
virtual

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.

Parameters
dcA device context to use when one is required for size calculations.
wndThe page which is being resized.
page_old_sizeThe size of the page prior to the resize (which has already been painted).
page_new_sizeThe size of the page after the resize.

Implements wxRibbonArtProvider.

wxSize wxRibbonMSWArtProvider::GetPanelClientSize ( wxDC dc,
const wxRibbonPanel wnd,
wxSize  size,
wxPoint client_offset 
)
virtual

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.

Parameters
dcA device context to use if one is required for size calculations.
wndThe ribbon panel in question.
sizeThe overall size to calculate client size for.
[out]client_offsetThe offset where the returned client size begins within the given size (may be NULL).
See also
GetPanelSize()

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

wxRect wxRibbonMSWArtProvider::GetPanelExtButtonArea ( wxDC dc,
const wxRibbonPanel wnd,
wxRect  rect 
)
virtual

Calculate the position and size of the panel extension button.

Parameters
dcA device context to use if one is required for size calculations.
wndThe ribbon panel in question.
rectThe panel rectangle from which calculate extension button rectangle.
Since
2.9.4

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

wxSize wxRibbonMSWArtProvider::GetPanelSize ( wxDC dc,
const wxRibbonPanel wnd,
wxSize  client_size,
wxPoint client_offset 
)
virtual

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.

Parameters
dcA device context to use if one is required for size calculations.
wndThe ribbon panel in question.
client_sizeThe client size.
[out]client_offsetThe offset where the client rectangle begins within the panel (may be NULL).
See also
GetPanelClientSize()

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

wxRect wxRibbonMSWArtProvider::GetRibbonHelpButtonArea ( const wxRect rect)
virtual

Calculate the position and size of the ribbon's help button.

Parameters
rectThe ribbon bar rectangle from which calculate help button rectangle.
Since
2.9.5

Implements wxRibbonArtProvider.

wxSize wxRibbonMSWArtProvider::GetScrollButtonMinimumSize ( wxDC dc,
wxWindow wnd,
long  style 
)
virtual

Calculate the minimum size (in pixels) of a scroll button.

Parameters
dcA device context to use when one is required for size calculations.
wndThe window onto which the scroll button will eventually be drawn.
styleA combination of flags from wxRibbonScrollButtonStyle, 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).

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

int wxRibbonMSWArtProvider::GetTabCtrlHeight ( wxDC dc,
wxWindow wnd,
const wxRibbonPageTabInfoArray &  pages 
)
virtual

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.

Parameters
dcA device context to use when one is required for size calculations.
wndThe window onto which the tabs will eventually be drawn.
pagesThe tabs which will acquire the returned height.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

wxSize wxRibbonMSWArtProvider::GetToolSize ( wxDC dc,
wxWindow wnd,
wxSize  bitmap_size,
wxRibbonButtonKind  kind,
bool  is_first,
bool  is_last,
wxRect dropdown_region 
)
virtual

Calculate the size of a tool within a wxRibbonToolBar.

Parameters
dcA device context to use when one is required for size calculations.
wndThe window onto which the tool will eventually be drawn.
bitmap_sizeThe size of the tool's foreground bitmap.
kindThe kind of tool (normal, dropdown, or hybrid).
is_firsttrue if the tool is the first within its group. false otherwise.
is_lasttrue if the tool is the last within its group. false otherwise.
[out]dropdown_regionFor dropdown and hybrid tools, the region within the returned size which counts as the dropdown part.

Implements wxRibbonArtProvider.

void wxRibbonMSWArtProvider::SetColour ( int  id,
const wxColour colour 
)
virtual

Set the value of a certain colour setting to the value colour.

id can be one of the colour values of wxRibbonArtSetting, though not all colour settings will have an effect on every art provider.

See also
SetColourScheme()

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::SetColourScheme ( const wxColour primary,
const wxColour secondary,
const wxColour tertiary 
)
virtual

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.

See also
SetColour()
GetColourScheme()

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::SetFlags ( long  flags)
virtual

Set the style flags.

Normally called automatically by wxRibbonBar::SetArtProvider with the ribbon bar's style flags, so that the art provider has the same flags as the bar which it is serving.

Implements wxRibbonArtProvider.

void wxRibbonMSWArtProvider::SetFont ( int  id,
const wxFont font 
)
virtual

Set the value of a certain font setting to the value font.

id can be one of the font values of wxRibbonArtSetting.

Implements wxRibbonArtProvider.

Reimplemented in wxRibbonAUIArtProvider.

void wxRibbonMSWArtProvider::SetMetric ( int  id,
int  new_val 
)
virtual

Set the value of a certain integer setting to the value new_val.

id can be one of the size values of wxRibbonArtSetting.

Implements wxRibbonArtProvider.