.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.agw.ribbon.control

.. highlight:: python



.. _wx.lib.agw.ribbon.control.RibbonControl:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.ribbon.control.RibbonControl**
==========================================================================================================================================

Base class for all the Ribbon stuff. 



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>RibbonControl</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.agw.ribbon.control.RibbonControl_inheritance.png" alt="Inheritance diagram of RibbonControl" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.agw.ribbon.control.RibbonControl.html" title="wx.lib.agw.ribbon.control.RibbonControl" alt="" coords="5,392,287,421"/> <area shape="rect" id="node2" href="wx.Control.html" title="wx.Control" alt="" coords="100,315,192,344"/> <area shape="rect" id="node3" href="wx.Window.html" title="wx.Window" alt="" coords="97,237,195,267"/> <area shape="rect" id="node4" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="81,160,211,189"/> <area shape="rect" id="node5" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="87,83,205,112"/> <area shape="rect" id="node6" href="wx.Object.html" title="wx.Object" alt="" coords="43,5,129,35"/> <area shape="rect" id="node7" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="154,5,261,35"/> </map> 
   </p>
   </div>

|


|sub_classes| Known Subclasses
==============================

:class:`wx.lib.agw.ribbon.bar.RibbonBar`, :class:`wx.lib.agw.ribbon.buttonbar.RibbonButtonBar`, :class:`wx.lib.agw.ribbon.gallery.RibbonGallery`, :class:`wx.lib.agw.ribbon.page.RibbonPage`, :class:`wx.lib.agw.ribbon.page.RibbonPageScrollButton`, :class:`wx.lib.agw.ribbon.panel.RibbonPanel`, :class:`wx.lib.agw.ribbon.toolbar.RibbonToolBar`

|


|super_classes| Known Superclasses
==================================

:class:`wx.Control`

|


|method_summary| Methods Summary
================================

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


|


|api| Class API
===============


.. class:: RibbonControl(wx.Control)

   Base class for all the Ribbon stuff. 

   .. method:: __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, validator=wx.DefaultValidator, name="RibbonControl")

      Default class constructor.
      
      :param wx.Window `parent`: pointer to a parent window;
      :param integer `id`: window identifier. If ``wx.ID_ANY``, will automatically create
       an identifier;
      :param `pos`: window position. ``wx.DefaultPosition`` indicates that wxPython
       should generate a default position for the window;
      :type `pos`: tuple or :class:`wx.Point`
      :param `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;
      :type `size`: tuple or :class:`wx.Point`
      :param integer `style`: the window style;
      :param wx.Validator `validator`: window validator;
      :param string `name`: window name.


   .. method:: DoGetNextLargerSize(self, direction, size)

      Implementation of :meth:`~RibbonControl.GetNextLargerSize`.
      
      Controls which have non-continuous sizing must override this virtual function
      rather than :meth:`~RibbonControl.GetNextLargerSize`.
      
      :param integer `direction`: the direction(s) in which the size should increase;
      :param wx.Size `size`: the size for which a larger size should be found.


   .. method:: DoGetNextSmallerSize(self, direction, size)

      Implementation of :meth:`~RibbonControl.GetNextSmallerSize`.
      
      Controls which have non-continuous sizing must override this virtual function
      rather than :meth:`~RibbonControl.GetNextSmallerSize`.
      
      :param integer `direction`: the direction(s) in which the size should increase;
      :param wx.Size `size`: the size for which a larger size should be found.


   .. method:: 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``.


   .. method:: 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.
      
      :param integer `direction`: The direction(s) in which the size should reduce;
      :param wx.Size `relative_to`: 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: :meth:`~RibbonControl.IsSizingContinuous`, :meth:`~RibbonControl.DoGetNextLargerSize`


   .. method:: 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.
      
      :param integer `direction`: The direction(s) in which the size should reduce;
      :param wx.Size `relative_to`: 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: :meth:`~RibbonControl.IsSizingContinuous`, :meth:`~RibbonControl.DoGetNextSmallerSize`


   .. method:: 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: :meth:`~RibbonControl.GetNextSmallerSize`, :meth:`~RibbonControl.GetNextLargerSize`


   .. method:: Realise(self)

      Alias for :meth:`~RibbonControl.Realize`.


   .. method:: Realize(self)

      Perform initial size and layout calculations after children have been added,
      and/or realize children.


   .. method:: 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 :class:`RibbonControl`. In most cases, controls will not
      take ownership of the given pointer, with the notable exception being
      :meth:`RibbonBar.SetArtProvider() <lib.agw.ribbon.bar.RibbonBar.SetArtProvider>`.
      
      :param `art`: an art provider.


