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

.. highlight:: python



.. _wx.lib.agw.rulerctrl.Indicator:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.rulerctrl.Indicator**
==========================================================================================================================================

This class holds all the information about a single indicator inside :class:`RulerCtrl`.

You should not call this class directly. Use::

    ruler.AddIndicator(id, value)


to add an indicator to your :class:`RulerCtrl`.



|

|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>Indicator</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.rulerctrl.Indicator_inheritance.png" alt="Inheritance diagram of Indicator" 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.lib.agw.rulerctrl.Indicator.html" title="wx.lib.agw.rulerctrl.Indicator" alt="" coords="5,5,200,35"/> </map> 
   </p>

|


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

================================================================================ ================================================================================
:meth:`~wx.lib.agw.rulerctrl.Indicator.__init__`                                 Default class constructor.
:meth:`~wx.lib.agw.rulerctrl.Indicator.Draw`                                     Actually draws the indicator.
:meth:`~wx.lib.agw.rulerctrl.Indicator.GetId`                                    Returns the indicator id.
:meth:`~wx.lib.agw.rulerctrl.Indicator.GetImageSize`                             Returns the indicator bitmap size.
:meth:`~wx.lib.agw.rulerctrl.Indicator.GetPosition`                              Returns the position at which we should draw the indicator bitmap.
:meth:`~wx.lib.agw.rulerctrl.Indicator.GetRect`                                  Returns the indicator client rectangle.
:meth:`~wx.lib.agw.rulerctrl.Indicator.GetValue`                                 Returns the indicator value.
:meth:`~wx.lib.agw.rulerctrl.Indicator.RotateImage`                              Rotates the default indicator bitmap.
:meth:`~wx.lib.agw.rulerctrl.Indicator.SetColour`                                Sets the indicator colour.
:meth:`~wx.lib.agw.rulerctrl.Indicator.SetValue`                                 Sets the indicator value.
================================================================================ ================================================================================


|


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


.. class:: Indicator(object)

   This class holds all the information about a single indicator inside :class:`RulerCtrl`.
   
   You should not call this class directly. Use::
   
       ruler.AddIndicator(id, value)
   
   
   to add an indicator to your :class:`RulerCtrl`.

   .. method:: __init__(self, parent, id=wx.ID_ANY, value=0)

      Default class constructor.
      
      :param `parent`: the parent window, an instance of :class:`RulerCtrl`;
      :param `id`: the indicator identifier;
      :param `value`: the initial value of the indicator.


   .. method:: Draw(self, dc)

      Actually draws the indicator.
      
      :param `dc`: an instance of :class:`wx.DC`.


   .. method:: GetId(self)

      Returns the indicator id. 


   .. method:: GetImageSize(self)

      Returns the indicator bitmap size. 


   .. method:: GetPosition(self)

      Returns the position at which we should draw the indicator bitmap. 


   .. method:: GetRect(self)

      Returns the indicator client rectangle. 


   .. method:: GetValue(self)

      Returns the indicator value. 


   .. method:: RotateImage(self, img=None)

      Rotates the default indicator bitmap.
      
      :param `img`: if not ``None``, the indicator image.


   .. method:: SetColour(self, colour)

      Sets the indicator colour.
      
      :param `colour`: the new indicator colour, an instance of :class:`wx.Colour`.
      
      :note: Requires PIL (Python Imaging Library), which can be downloaded from
       http://www.pythonware.com/products/pil/


   .. method:: SetValue(self, value)

      Sets the indicator value.
      
      :param `value`: the new indicator value.


