wx.lib.agw.ribbon.control.RibbonControl¶
Base class for all the Ribbon stuff.
Class Hierarchy¶
Known Subclasses¶
wx.lib.agw.ribbon.bar.RibbonBar
, wx.lib.agw.ribbon.buttonbar.RibbonButtonBar
, wx.lib.agw.ribbon.gallery.RibbonGallery
, wx.lib.agw.ribbon.page.RibbonPage
, wx.lib.agw.ribbon.page.RibbonPageScrollButton
, wx.lib.agw.ribbon.panel.RibbonPanel
, wx.lib.agw.ribbon.toolbar.RibbonToolBar
Known Superclasses¶
Methods Summary¶
Default class constructor. |
|
Implementation of |
|
Implementation of |
|
Get the art provider to be used. |
|
If sizing is not continuous, then return a suitable size for the control which |
|
If sizing is not continuous, then return a suitable size for the control which |
|
Returns |
|
Alias for |
|
Perform initial size and layout calculations after children have been added, |
|
Set the art provider to be used. |
Class API¶
- class RibbonControl(wx.Control)¶
Base class for all the Ribbon stuff.
Methods¶
- __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, validator=wx.DefaultValidator, name='RibbonControl')¶
Default class constructor.
- Parameters:
parent (wx.Window) – pointer to a parent window;
id (integer) – window identifier. If
wx.ID_ANY
, will automatically create an identifier;pos (tuple or
wx.Point
) – window position.wx.DefaultPosition
indicates that wxPython should generate a default position for the window;size (tuple or
wx.Point
) – 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 (integer) – the window style;
validator (wx.Validator) – window validator;
name (string) – window name.
- DoGetNextLargerSize(self, direction, size)¶
Implementation of
GetNextLargerSize
.Controls which have non-continuous sizing must override this virtual function rather than
GetNextLargerSize
.- Parameters:
direction (integer) – the direction(s) in which the size should increase;
size (wx.Size) – the size for which a larger size should be found.
- DoGetNextSmallerSize(self, direction, size)¶
Implementation of
GetNextSmallerSize
.Controls which have non-continuous sizing must override this virtual function rather than
GetNextSmallerSize
.- Parameters:
direction (integer) – the direction(s) in which the size should increase;
size (wx.Size) – the size for which a larger size should be found.
- GetArtProvider(self)¶
Get the art provider to be used.
Note that until an art provider has been set in some way, this function may return
None
.
- GetNextLargerSize(self, direction, relative_to=None)¶
If sizing is not continuous, then return a suitable size for the control which is larger then the given size.
- Parameters:
direction (integer) – The direction(s) in which the size should reduce;
relative_to (wx.Size) – The size for which a smaller size should be found.
- Returns:
if there is no larger size, otherwise a suitable size which is larger in the given direction(s), and the same as in the other direction (if any).
See also
- GetNextSmallerSize(self, direction, relative_to=None)¶
If sizing is not continuous, then return a suitable size for the control which is smaller than the given size.
- Parameters:
direction (integer) – The direction(s) in which the size should reduce;
relative_to (wx.Size) – The size for which a smaller size should be found.
- Returns:
if there is no smaller size, otherwise a suitable size which is smaller in the given direction(s), and the same as in the other direction (if any).
See also
- IsSizingContinuous(self)¶
Returns
True
if this window can take any size (greater than its minimum size),False
if it can only take certain sizes.See also
- Realize(self)¶
Perform initial size and layout calculations after children have been added, and/or realize children.
- SetArtProvider(self, art)¶
Set the art provider to be used.
In many cases, setting the art provider will also set the art provider on all child windows which extend
RibbonControl
. In most cases, controls will not take ownership of the given pointer, with the notable exception beingRibbonBar.SetArtProvider()
.- Parameters:
art – an art provider.