AGW Logo

agw_title RibbonToolBar

hierarchy Inheritance Diagram

Inheritance diagram for: RibbonToolBar

Inheritance diagram of RibbonToolBar


supclasses Known Superclasses


appearance Control Appearance


RibbonToolBar

RibbonToolBar


method_summary Methods Summary

__init__Default class constructor.
AddDropdownToolAdd a dropdown tool to the tool bar (simple version).
AddHybridToolAdd a hybrid tool to the tool bar (simple version).
AddSeparatorAdd a separator to the tool bar.
AddSimpleToolAdd a tool to the tool bar (simple version).
AddToolAdd a tool to the tool bar.
AppendGroup
CommonInit
DoGetBestSize
DoGetNextLargerSize
DoGetNextSmallerSize
GetDefaultBorder
IsSizingContinuous
MakeDisabledBitmap
OnEraseBackground
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp
OnPaint
OnSize
Realize
SetRowsSet the number of rows to distribute tool groups over.

API Class API

class RibbonToolBar(RibbonControl)[source]


__init__(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name="RibbonToolbar")[source]

Default class constructor.

Parameters:
  • parent – Pointer to a parent window;
  • id – Window identifier. If wx.ID_ANY, will automatically create an identifier;
  • pos – Window position. wx.DefaultPosition indicates that wxPython should generate a default position for the window;
  • size – Window size. wx.DefaultSize indicates that wxPython should generate a default size for the window. If no suitable size can be found, the window will be sized to 20x20 pixels so that the window is visible but obviously not correctly sized;
  • style – Window style;
  • name – the window name.


AddDropdownTool(tool_id, bitmap, help_string='')[source]

Add a dropdown tool to the tool bar (simple version).

Parameters:
  • tool_id – ID of the new tool (used for event callbacks);
  • bitmap – Large bitmap of the new button. Must be the same size as all other large bitmaps used on the button bar;
  • help_string – The UI help string to associate with the new button.

See also

AddTool



AddHybridTool(tool_id, bitmap, help_string='')[source]

Add a hybrid tool to the tool bar (simple version).

Parameters:
  • tool_id – ID of the new tool (used for event callbacks);
  • bitmap – Large bitmap of the new button. Must be the same size as all other large bitmaps used on the button bar;
  • help_string – The UI help string to associate with the new button.

See also

AddTool



AddSeparator()[source]

Add a separator to the tool bar.

Separators are used to separate tools into groups. As such, a separator is not explicity drawn, but is visually seen as the gap between tool groups.



AddSimpleTool(tool_id, bitmap, help_string, kind=RIBBON_BUTTON_NORMAL)[source]

Add a tool to the tool bar (simple version).

Parameters:
  • tool_id – ID of the new tool (used for event callbacks);
  • bitmap – Large bitmap of the new button. Must be the same size as all other large bitmaps used on the button bar;
  • help_string – The UI help string to associate with the new button;
  • kind – The kind of button to add.


AddTool(tool_id, bitmap, bitmap_disabled=wx.NullBitmap, help_string="", kind=RIBBON_BUTTON_NORMAL, client_data=None)[source]

Add a tool to the tool bar.

Parameters:
  • tool_id – ID of the new tool (used for event callbacks);
  • bitmap – Bitmap to use as the foreground for the new tool. Does not have to be the same size as other tool bitmaps, but should be similar as otherwise it will look visually odd;
  • bitmap_disabled – Bitmap to use when the tool is disabled. If left as wx.NullBitmap, then a bitmap will be automatically generated from bitmap;
  • help_string – The UI help string to associate with the new tool;
  • kind – The kind of tool to add;
  • client_data – Client data to associate with the new tool.
Returns:

An opaque pointer which can be used only with other tool bar methods.



AppendGroup()[source]


CommonInit(style)[source]


DoGetBestSize()[source]


DoGetNextLargerSize(direction, relative_to)[source]


DoGetNextSmallerSize(direction, relative_to)[source]


GetDefaultBorder()[source]


IsSizingContinuous()[source]


MakeDisabledBitmap(original)[source]


OnEraseBackground(event)[source]


OnMouseDown(event)[source]


OnMouseEnter(event)[source]


OnMouseLeave(event)[source]


OnMouseMove(event)[source]


OnMouseUp(event)[source]


OnPaint(event)[source]


OnSize(event)[source]


Realize()[source]


SetRows(nMin, nMax)[source]

Set the number of rows to distribute tool groups over.

Tool groups can be distributed over a variable number of rows. The way in which groups are assigned to rows is not specificed, and the order of groups may change, but they will be distributed in such a way as to minimise the overall size of the tool bar.

Parameters:
  • nMin – The minimum number of rows to use;
  • nMax – The maximum number of rows to use (defaults to nMin).
Tree

Table Of Contents

Previous topic

ribbon.toolbar

Next topic

RibbonToolBarEvent