C# Класс Flood.GUI.Controls.Button

Button control.
Наследование: Label
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

Button() публичный Метод

Control constructor.
public Button ( Control parent ) : System
parent Control Parent control.
Результат System

Layout() защищенный Метод

Lays out the control's interior according to alignment, padding, dock etc.
protected Layout ( Skins skin ) : void
skin Skins Skin to use.
Результат void

OnAccelerator() защищенный Метод

Default accelerator handler.
protected OnAccelerator ( ) : void
Результат void

OnClicked() защищенный Метод

Internal OnPressed implementation.
protected OnClicked ( ) : void
Результат void

OnKeySpace() защищенный Метод

Handler for Space keyboard event.
protected OnKeySpace ( bool down ) : bool
down bool Indicates whether the key was pressed or released.
Результат bool

OnMouseClickedLeft() защищенный Метод

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.
Результат void

OnMouseDoubleClickedLeft() защищенный Метод

Handler invoked on mouse double click (left) event.
protected OnMouseDoubleClickedLeft ( int x, int y ) : void
x int X coordinate.
y int Y coordinate.
Результат void

Press() публичный Метод

"Clicks" the button.
public Press ( Control control = null ) : void
control Control
Результат void

Render() защищенный Метод

Renders the control using specified skin.
protected Render ( Skins skin ) : void
skin Skins Skin to use.
Результат void

SetImage() публичный Метод

Sets the button's image.
public SetImage ( ResourceHandle imageHandle, bool center = false ) : void
imageHandle ResourceHandle
center bool Determines whether the image should be centered.
Результат void

SetImage() публичный Метод

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.
Результат void

SizeToContents() публичный Метод

Sizes to contents.
public SizeToContents ( ) : void
Результат void

Toggle() публичный Метод

Toggles the button.
public Toggle ( ) : void
Результат void

UpdateColors() публичный Метод

Updates control colors.
public UpdateColors ( ) : void
Результат void