A nice small class that functions like wx.BitmapButton
, the reason I did
not used wx.BitmapButton
is that on Linux, it has some extra margins that
I can’t seem to be able to remove.
Default class constructor. |
|
Used internally. |
|
Draws self at rect using dc. |
|
Returns the client rectangle for |
|
Returns the timer object. |
|
Returns the timer object identifier. |
|
Moves |
|
Handles left down mouse events. |
|
Handles left up mouse events. |
|
Handles mouse motion events. This is called any time the mouse moves in the parent menu, |
|
Sets the size for |
FlatMenuButton
(object)¶A nice small class that functions like wx.BitmapButton
, the reason I did
not used wx.BitmapButton
is that on Linux, it has some extra margins that
I can’t seem to be able to remove.
__init__
(self, menu, up, normalBmp, disabledBmp=wx.NullBitmap, scrollOnHover=False)¶Default class constructor.
Contains
(self, pt)¶Used internally.
GetClientRect
(self)¶Returns the client rectangle for FlatMenuButton
.
GetTimer
(self)¶Returns the timer object.
GetTimerId
(self)¶Returns the timer object identifier.
Move
(self, input1, input2=None)¶Moves FlatMenuButton
to the specified position.
input1 – if it is an instance of wx.Point
, it represents the FlatMenuButton
position and the input2 parameter is not used. Otherwise it is an integer representing
the button x position;
input2 – if not None
, it is an integer representing the button y position.
ProcessLeftDown
(self, pt)¶Handles left down mouse events.
pt – an instance of wx.Point
where the left mouse button was pressed.
ProcessLeftUp
(self, pt)¶Handles left up mouse events.
pt – an instance of wx.Point
where the left mouse button was released.
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.
pt – an instance of wx.Point
where the mouse pointer was moved.
SetSize
(self, input1, input2=None)¶Sets the size for FlatMenuButton
.
input1 – if it is an instance of wx.Size
, it represents the FlatMenuButton
size and the input2 parameter is not used. Otherwise it is an integer representing
the button width;
input2 – if not None
, it is an integer representing the button height.