GMButton is an easy to use customisable button.
It responds to mouse down and up clicks, but does not discriminate button identifiers.
Creates a new instance of GMButton.
Its graphical properties are defined by its associated GMStyle.
a GMButton instance.
Sets or gets the Function to be triggered when the button is pressed down. This Function doesn't take arguments.
aFunction |
A Function without argument. |
Sets or gets the Function to be triggered when the button has been pressed, and is released. This Function doesn't take arguments.
aFunction |
A Function without argument. |
Sets or gets the Function to be triggered when the button is pressed down. Doesn't take arguments. Equivalent to .mouseDownAction
.
aFunction |
A Function without argument. |
Sets or gets the button displayed text, and refreshes the View.
Deprecated, see fontRatio
Sets or gets the widget displayed text ratio, relative to the smallest axis of the widget, and refreshes the View. You'll need to reduce this value if the displayed text is larger than the size of the widget.
Sets or gets the maximum allowed font size.
Sets or gets the button displayed text orientation, and refreshes the View. Valid values are : \right
, \top
, \left
or \bottom
. This doesn't affect the displayed svg if any.
Sets or gets the button displayed svg, and refreshes the View. Takes a String indicating the path to the svg file as argument.
Sets or gets the widget displayed svg ratio, relative to the smallest axis of the widget, and refreshes the View.
Removes the svg and frees its ressources. Refreshes the View.
The function associated to the View's drawFunc
. Shouldn't be modified.
The function that rescales the svg when needed.