Phoenix Logo

phoenix_title wx.lib.agw.ribbon.control.RibbonControl

Base class for all the Ribbon stuff.


class_hierarchy Class Hierarchy

Inheritance diagram for class RibbonControl:


super_classes Known Superclasses

wx.Control


method_summary Methods Summary

__init__ Default class constructor.
DoGetNextLargerSize Implementation of GetNextLargerSize.
DoGetNextSmallerSize Implementation of GetNextSmallerSize.
GetArtProvider Get the art provider to be used.
GetNextLargerSize If sizing is not continuous, then return a suitable size for the control which
GetNextSmallerSize If sizing is not continuous, then return a suitable size for the control which
IsSizingContinuous Returns True if this window can take any size (greater than its minimum size),
Realise Alias for Realize.
Realize Perform initial size and layout calculations after children have been added,
SetArtProvider Set the art provider to be used.

api 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).



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).



IsSizingContinuous(self)

Returns True if this window can take any size (greater than its minimum size), False if it can only take certain sizes.



Realise(self)

Alias for Realize.



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 being RibbonBar.SetArtProvider().

Parameters:art – an art provider.