C# Class Flood.GUI.Controls.Button

Button control.
Inheritance: Label
Afficher le fichier Open project: FloodProject/flood Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

Control constructor.
public Button ( Control parent ) : System
parent Control Parent control.
Résultat System

Layout() protected méthode

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

OnAccelerator() protected méthode

Default accelerator handler.
protected OnAccelerator ( ) : void
Résultat void

OnClicked() protected méthode

Internal OnPressed implementation.
protected OnClicked ( ) : void
Résultat void

OnKeySpace() protected méthode

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

OnMouseClickedLeft() protected méthode

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.
Résultat void

OnMouseDoubleClickedLeft() protected méthode

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

Press() public méthode

"Clicks" the button.
public Press ( Control control = null ) : void
control Control
Résultat void

Render() protected méthode

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

SetImage() public méthode

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

SetImage() public méthode

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.
Résultat void

SizeToContents() public méthode

Sizes to contents.
public SizeToContents ( ) : void
Résultat void

Toggle() public méthode

Toggles the button.
public Toggle ( ) : void
Résultat void

UpdateColors() public méthode

Updates control colors.
public UpdateColors ( ) : void
Résultat void