GMRecordButton is an easy to use button.
It natively alternates between two visual symbols related to the idea of recording a sound. When recording, the button is slowly blinking.
It only responds to mouse down clicks, and does not discriminate button identifiers.
By default, it allows to record the default server, using default parameters, using this Function :
You can override this by any custom Function.
Creates a new instance of GMRecordButton.
By default, its graphical properties are defined by its associated GMStyle. In fact, the visual properties of this View are hardcoded, and the only available settings are the borders parameters.
a GMRecordButton instance.
Sets or gets the Function to be triggered when the button is pressed down. This Function takes the current state of the button as a boolean as argument, i.e. pressing it down once will call the Function passing true
as argument, pressing it down a second time will call the Function passing false
as argument, etc.
aFunction |
A Function with one argument, the state of the button as a Boolean. |
Sets or gets the Function to be triggered when the button is pressed down. This Function takes the current state of the button as a boolean as argument, i.e. pressing it down once will call the Function passing true
as argument, pressing it down a second time will call the Function passing false
as argument, etc. Equivalent to .action
.
aFunction |
A Function with one argument, the state of the button as a Boolean. |
Allows to animate the button without triggering the associated action (for example in response to a keyboard event). Passing true
as argument will animate the button if not animated already, passing false
will stop the animation if not stopped already. Visual updates are internally deferred so the method can be called within a clock context.
Sets or gets the symbol size relative to its smallest axis, and refreshes the View.
Gets the internal state of the GMRecordButton.
The function associated to the View's drawFunc. Shouldn't be modified, use UserView instead.
aFunction |