1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
|
.. 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.flatmenu
.. highlight:: python
.. _wx.lib.agw.flatmenu.FlatMenuButton:
==========================================================================================================================================
|phoenix_title| **wx.lib.agw.flatmenu.FlatMenuButton**
==========================================================================================================================================
A nice small class that functions like :class:`wx.BitmapButton`, the reason I did
not used :class:`wx.BitmapButton` is that on Linux, it has some extra margins that
I can't seem to be able to remove.
|
|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>FlatMenuButton</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.flatmenu.FlatMenuButton_inheritance.png" alt="Inheritance diagram of FlatMenuButton" 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.flatmenu.FlatMenuButton.html" title="wx.lib.agw.flatmenu.FlatMenuButton" alt="" coords="5,5,256,35"/> </map>
</p>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.agw.flatmenu.FlatMenuButton.__init__` Default class constructor.
:meth:`~wx.lib.agw.flatmenu.FlatMenuButton.Contains` Used internally.
:meth:`~wx.lib.agw.flatmenu.FlatMenuButton.Draw` Draws self at rect using dc.
:meth:`~wx.lib.agw.flatmenu.FlatMenuButton.GetClientRect` Returns the client rectangle for :class:`FlatMenuButton`.
:meth:`~wx.lib.agw.flatmenu.FlatMenuButton.GetTimer` Returns the timer object.
:meth:`~wx.lib.agw.flatmenu.FlatMenuButton.GetTimerId` Returns the timer object identifier.
:meth:`~wx.lib.agw.flatmenu.FlatMenuButton.Move` Moves :class:`FlatMenuButton` to the specified position.
:meth:`~wx.lib.agw.flatmenu.FlatMenuButton.ProcessLeftDown` Handles left down mouse events.
:meth:`~wx.lib.agw.flatmenu.FlatMenuButton.ProcessLeftUp` Handles left up mouse events.
:meth:`~wx.lib.agw.flatmenu.FlatMenuButton.ProcessMouseMove` Handles mouse motion events. This is called any time the mouse moves in the parent menu,
:meth:`~wx.lib.agw.flatmenu.FlatMenuButton.SetSize` Sets the size for :class:`FlatMenuButton`.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: FlatMenuButton(object)
A nice small class that functions like :class:`wx.BitmapButton`, the reason I did
not used :class:`wx.BitmapButton` is that on Linux, it has some extra margins that
I can't seem to be able to remove.
.. method:: __init__(self, menu, up, normalBmp, disabledBmp=wx.NullBitmap, scrollOnHover=False)
Default class constructor.
:param `menu`: the parent menu associated with this button, an instance of :class:`FlatMenu`;
:param bool `up`: ``True`` for up arrow or ``False`` for down arrow;
:param `normalBmp`: normal state bitmap, an instance of :class:`wx.Bitmap`;
:param `disabledBmp`: disabled state bitmap, an instance of :class:`wx.Bitmap`.
.. method:: Contains(self, pt)
Used internally.
.. method:: Draw(self, dc)
Draws self at rect using dc.
:param `dc`: an instance of :class:`wx.DC`.
.. method:: GetClientRect(self)
Returns the client rectangle for :class:`FlatMenuButton`.
.. method:: GetTimer(self)
Returns the timer object.
.. method:: GetTimerId(self)
Returns the timer object identifier.
.. method:: Move(self, input1, input2=None)
Moves :class:`FlatMenuButton` to the specified position.
:param `input1`: if it is an instance of :class:`wx.Point`, it represents the :class:`FlatMenuButton`
position and the `input2` parameter is not used. Otherwise it is an integer representing
the button `x` position;
:param `input2`: if not ``None``, it is an integer representing the button `y` position.
.. method:: ProcessLeftDown(self, pt)
Handles left down mouse events.
:param `pt`: an instance of :class:`wx.Point` where the left mouse button was pressed.
.. method:: ProcessLeftUp(self, pt)
Handles left up mouse events.
:param `pt`: an instance of :class:`wx.Point` where the left mouse button was released.
.. method:: ProcessMouseMove(self, pt)
Handles mouse motion events. This is called any time the mouse moves in the parent menu,
so we must check to see if the mouse is over the button.
:param `pt`: an instance of :class:`wx.Point` where the mouse pointer was moved.
.. method:: SetSize(self, input1, input2=None)
Sets the size for :class:`FlatMenuButton`.
:param `input1`: if it is an instance of :class:`wx.Size`, it represents the :class:`FlatMenuButton`
size and the `input2` parameter is not used. Otherwise it is an integer representing
the button width;
:param `input2`: if not ``None``, it is an integer representing the button height.
|