Checkbox

A checkbox can be selected by the user to indicate a true or false state.

Constructors

this
this(bool isChecked, void delegate() @(safe) changed)
this(void delegate() @(safe) changed)

Create a new checkbox.

Members

Classes

Extra
class Extra

Additional features available for checkbox styling.

Functions

drawImpl
void drawImpl(Rectangle outer, Rectangle inner)
Undocumented in source. Be warned that the author may not have intended to support it.
getImage
Image getImage(Style style)

Get checkmark image used by this checkbox.

getTexture
TextureGC* getTexture(Style style)

Get checkmark texture used by this checkbox.

isChecked
bool isChecked()
bool isChecked(bool value)

If true, the box is checked.

markImage
inout(Image) markImage()

Get the currently used checkmark image. Requires CanvasIO, updated on resize.

press
void press()

Toggle the checkbox.

resizeImpl
void resizeImpl(Vector2 space)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
toggle
void toggle()

Toggle the checkbox.

Mixins

__anonymous
mixin enableInputActions
Undocumented in source.

Variables

canvasIO
CanvasIO canvasIO;
Undocumented in source.
size
Vector2 size;

Size of the checkbox.

Examples

// Checkbox creates a toggleable button
auto myCheckbox = checkbox();

assert(!myCheckbox.isChecked);

Meta