GMSequencer is an easy to use customisable multiple checkbox, that is designed to be used as a sequencer.
It manipulates an Array containing either 0
or 1
. The size of the provided array determines the size of the sequencer.
It can be updated within a Routine so that the current playing beat is highlighted. It can also be configured so that particular indices are highlighted.
Highlights are specified using an array of float between 0 and 1, that should be the size of the values. The higher the value is, the larger and opaque the highlight will be (see example below).
Specifying a beat
property will highlight the associated checkbox. One can use a Routine (or any TempoClock based algorithm) to dynamically display the current beat. The graphical update is internally deferred. See example below.
Creates a new instance of GMSequencer.
Its graphical properties are defined by its associated GMStyle.
a GMSequencer instance.
Sets or gets the Function that will be evaluated when the GMSequencer has been interacted with. The arguments passed to the function depend on the actionMode
.
Sets or gets which arguments are passed to the action
's Function when the GMSequencer has been interacted with. If set to \values
, the associated Array will be passed as argument. If set to \index
, the index of the modified value and the new value will be passed as arguments.
Sets or gets the sequencer values. Takes an Array containing only 0
or 1
as argument. The size of the array determines the size of the sequencer (i.e. the number of checkboxes).
Sets or gets the displayed beat. Set to -1
to disable. This will internally defer the graphical update.
Sets or gets the policy that highlights checkboxes. Takes an Array containing floats between 0
and 1
, that should be the size of the values
. The closer the highlight is to 1
, the larger and opaque the highlight will be.
Sets or gets wether the highlights should be displayed.
Sets or gets the shape of the symbol used to display checked indices. Can either be \circle
, \square
, or \diamond
.
Sets or gets the ratio of the symbol relative to the case size where it is displayed. Valid values are between 0
and 1
.
Sets or gets whether the widget should respond to mouse move action when it is being pressed.