.. wxPython Phoenix documentation

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

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

.. include:: headings.inc

.. currentmodule:: wx.lib.agw.ribbon.bar

.. highlight:: python



.. _wx.lib.agw.ribbon.bar.RibbonBarEvent:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.ribbon.bar.RibbonBarEvent**
==========================================================================================================================================

Event used to indicate various actions relating to a :class:`RibbonBar`.

.. seealso:: :class:`RibbonBar` for available event types.



|

|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>RibbonBarEvent</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.bar.RibbonBarEvent_inheritance.png" alt="Inheritance diagram of RibbonBarEvent" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.Event.html" title="wx.Event" alt="" coords="94,83,172,112"/> <area shape="rect" id="node5" href="wx.CommandEvent.html" title="wx.CommandEvent" alt="" coords="61,160,205,189"/> <area shape="rect" id="node2" href="wx.Object.html" title="wx.Object" alt="" coords="92,5,173,35"/> <area shape="rect" id="node3" href="wx.lib.agw.ribbon.bar.RibbonBarEvent.html" title="wx.lib.agw.ribbon.bar.RibbonBarEvent" alt="" coords="5,315,261,344"/> <area shape="rect" id="node4" href="wx.NotifyEvent.html" title="wx.NotifyEvent" alt="" coords="76,237,191,267"/> </map> 
   </p>

|


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

:class:`wx.NotifyEvent`

|


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

================================================================================ ================================================================================
:meth:`~wx.lib.agw.ribbon.bar.RibbonBarEvent.__init__`                           Default class constructor.
:meth:`~wx.lib.agw.ribbon.bar.RibbonBarEvent.Allow`                              This is the opposite of :meth:`~RibbonBarEvent.Veto`: it explicitly allows the event to be processed.
:meth:`~wx.lib.agw.ribbon.bar.RibbonBarEvent.GetPage`                            Returns the page being changed to, or being clicked on.
:meth:`~wx.lib.agw.ribbon.bar.RibbonBarEvent.IsAllowed`                          Returns ``True`` if the change is allowed (:meth:`~RibbonBarEvent.Veto` hasn't been called) or
:meth:`~wx.lib.agw.ribbon.bar.RibbonBarEvent.SetPage`                            Sets the page relating to this event.
:meth:`~wx.lib.agw.ribbon.bar.RibbonBarEvent.Veto`                               Prevents the change announced by this event from happening.
================================================================================ ================================================================================


|


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


.. class:: RibbonBarEvent(wx.NotifyEvent)

   Event used to indicate various actions relating to a :class:`RibbonBar`.
   
   .. seealso:: :class:`RibbonBar` for available event types.

   .. method:: __init__(self, command_type=None, win_id=0, page=None)

      Default class constructor.
      
      :param integer `command_type`: the event type;
      :param integer `win_id`: the event identifier;
      :param `page`: an instance of :class:`~wx.lib.agw.ribbon.page.RibbonPage`.


   .. method:: Allow(self)

      This is the opposite of :meth:`~RibbonBarEvent.Veto`: it explicitly allows the event to be processed.
      For most events it is not necessary to call this method as the events are
      allowed anyhow but some are forbidden by default (this will be mentioned
      in the corresponding event description).


   .. method:: GetPage(self)

      Returns the page being changed to, or being clicked on.
      
      :returns: An instance of :class:`~wx.lib.agw.ribbon.page.RibbonPage`.


   .. method:: IsAllowed(self)

      Returns ``True`` if the change is allowed (:meth:`~RibbonBarEvent.Veto` hasn't been called) or
      ``False`` otherwise (if it was).


   .. method:: SetPage(self, page)

      Sets the page relating to this event.
      
      :param `page`: an instance of :class:`~wx.lib.agw.ribbon.page.RibbonPage`.


   .. method:: Veto(self)

      Prevents the change announced by this event from happening.
      
      :note: It is in general a good idea to notify the user about the reasons
       for vetoing the change because otherwise the applications behaviour (which
       just refuses to do what the user wants) might be quite surprising.


