C# Class Flood.GUI.Controls.Button

Button control.
Inheritance: Label
Exibir arquivo Open project: FloodProject/flood Class Usage Examples

Public Methods

Method Description
Button ( Control parent ) : System

Control constructor.

Press ( Control control = null ) : void

"Clicks" the button.

SetImage ( ResourceHandle imageHandle, bool center = false ) : void

Sets the button's image.

SetImage ( String textureName, bool center = false ) : void

Sets the button's image.

SizeToContents ( ) : void

Sizes to contents.

Toggle ( ) : void

Toggles the button.

UpdateColors ( ) : void

Updates control colors.

Protected Methods

Method Description
Layout ( Skins skin ) : void

Lays out the control's interior according to alignment, padding, dock etc.

OnAccelerator ( ) : void

Default accelerator handler.

OnClicked ( ) : void

Internal OnPressed implementation.

OnKeySpace ( bool down ) : bool

Handler for Space keyboard event.

OnMouseClickedLeft ( int x, int y, bool down ) : void

Handler invoked on mouse click (left) event.

OnMouseDoubleClickedLeft ( int x, int y ) : void

Handler invoked on mouse double click (left) event.

Render ( Skins skin ) : void

Renders the control using specified skin.

Method Details

Button() public method

Control constructor.
public Button ( Control parent ) : System
parent Control Parent control.
return System

Layout() protected method

Lays out the control's interior according to alignment, padding, dock etc.
protected Layout ( Skins skin ) : void
skin Skins Skin to use.
return void

OnAccelerator() protected method

Default accelerator handler.
protected OnAccelerator ( ) : void
return void

OnClicked() protected method

Internal OnPressed implementation.
protected OnClicked ( ) : void
return void

OnKeySpace() protected method

Handler for Space keyboard event.
protected OnKeySpace ( bool down ) : bool
down bool Indicates whether the key was pressed or released.
return bool

OnMouseClickedLeft() protected method

Handler invoked on mouse click (left) event.
protected OnMouseClickedLeft ( int x, int y, bool down ) : void
x int X coordinate.
y int Y coordinate.
down bool If set to true mouse button is down.
return void

OnMouseDoubleClickedLeft() protected method

Handler invoked on mouse double click (left) event.
protected OnMouseDoubleClickedLeft ( int x, int y ) : void
x int X coordinate.
y int Y coordinate.
return void

Press() public method

"Clicks" the button.
public Press ( Control control = null ) : void
control Control
return void

Render() protected method

Renders the control using specified skin.
protected Render ( Skins skin ) : void
skin Skins Skin to use.
return void

SetImage() public method

Sets the button's image.
public SetImage ( ResourceHandle imageHandle, bool center = false ) : void
imageHandle ResourceHandle
center bool Determines whether the image should be centered.
return void

SetImage() public method

Sets the button's image.
public SetImage ( String textureName, bool center = false ) : void
textureName String Texture name. Null to remove.
center bool Determines whether the image should be centered.
return void

SizeToContents() public method

Sizes to contents.
public SizeToContents ( ) : void
return void

Toggle() public method

Toggles the button.
public Toggle ( ) : void
return void

UpdateColors() public method

Updates control colors.
public UpdateColors ( ) : void
return void