Table of Contents

Class CheckBox

Namespace
OmegaGUI.Render
Assembly
OmegaGUI.dll

CheckBox control

public class CheckBox : Button
Inheritance
CheckBox
Derived
Inherited Members
Extension Methods

Constructors

CheckBox(Dialog)

Create new checkbox instance

public CheckBox(Dialog parent)

Parameters

parent Dialog

Fields

BoxLayer

public const int BoxLayer = 0

Field Value

int

CheckLayer

public const int CheckLayer = 1

Field Value

int

buttonRect

protected Rectangle buttonRect

Field Value

Rectangle

isBoxChecked

protected bool isBoxChecked

Field Value

bool

textRect

protected Rectangle textRect

Field Value

Rectangle

Properties

IsChecked

Checked property

public virtual bool IsChecked { get; set; }

Property Value

bool

Methods

ContainsPoint(Point)

Does the control contain the point?

public override bool ContainsPoint(Point pt)

Parameters

pt Point

Returns

bool

HandleKeyboard(WindowMessage, IntPtr, IntPtr)

Handle the keyboard for the checkbox

public override bool HandleKeyboard(WindowMessage msg, IntPtr wParam, IntPtr lParam)

Parameters

msg WindowMessage
wParam IntPtr
lParam IntPtr

Returns

bool

HandleMouse(WindowMessage, Point, IntPtr, IntPtr)

Handle mouse messages from the checkbox

public override bool HandleMouse(WindowMessage msg, Point pt, IntPtr wParam, IntPtr lParam)

Parameters

msg WindowMessage
pt Point
wParam IntPtr
lParam IntPtr

Returns

bool

OnHotKey()

Override hotkey to fire event

public override void OnHotKey()

RaiseChangedEvent(CheckBox, bool)

Create new button instance

protected void RaiseChangedEvent(CheckBox sender, bool wasTriggeredByUser)

Parameters

sender CheckBox
wasTriggeredByUser bool

Render(Device, float)

Render the checkbox control

public override void Render(Device device, float elapsedTime)

Parameters

device Device
elapsedTime float

SetCheckedInternal(bool, bool)

Sets the checked state and fires the event if necessary

protected virtual void SetCheckedInternal(bool ischecked, bool fromInput)

Parameters

ischecked bool
fromInput bool

UpdateRectangles()

Update the rectangles

protected override void UpdateRectangles()

Events

Changed

public event EventHandler Changed

Event Type

EventHandler