Skip to content

CheckBox

Eduard Gushchin edited this page Jun 22, 2026 · 3 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.CheckBox
Namespace Electron2D
Kind class
Category UI and Text

Overview

Provides a toggle button with a check indicator and text.

Syntax

public class Electron2D.CheckBox : Electron2D.Button

Remarks

CheckBox is a Electron2D.Button with Electron2D.BaseButton.ToggleMode enabled by default. It emits the inherited button signals.

Thread Safety

This type is not synchronized. Create and mutate check boxes on the main scene thread.

Since

This type is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.BaseButton.ButtonPressed
  • Electron2D.Button

Members

Member Kind Summary
Electron2D.CheckBox() Constructor Initializes a new instance of the Electron2D.CheckBox class.
_Draw() Method Draws the checkbox indicator and text.
_GetMinimumSize() Method Gets the minimum size requested by this check box.

Member Details

Electron2D.CheckBox()

Kind: Constructor

public Electron2D.CheckBox()

Summary

Initializes a new instance of the Electron2D.CheckBox class.

Remarks

The new check box enables Electron2D.BaseButton.ToggleMode so user activation changes Electron2D.BaseButton.ButtonPressed.

Thread Safety

This constructor is not synchronized. Call it from the main scene thread.

Since

This constructor is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.CheckBox

_Draw()

Kind: Method

public System.Void _Draw()()

Summary

Draws the checkbox indicator and text.

Remarks

The preview visual style uses rectangle primitives. Theme style boxes and icons can be layered later without changing the public API.

Thread Safety

This callback is invoked on the main scene thread.

Since

This method is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Button._Draw

_GetMinimumSize()

Kind: Method

public Electron2D.Vector2 _GetMinimumSize()()

Summary

Gets the minimum size requested by this check box.

Remarks

The indicator reserves 24 pixels on the horizontal axis.

Returns

The inherited text minimum size plus space for the check indicator.

Thread Safety

This callback is invoked on the main scene thread.

Since

This method is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Button._GetMinimumSize

Clone this wiki locally