C# Class Flood.GUI.Controls.Menu

Popup menu.
Inheritance: Flood.GUI.Controls.ScrollControl
Datei anzeigen Open project: FloodProject/flood Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
AddDivider ( ) : void

Adds a divider menu item.

AddItem ( String text ) : MenuItem

Adds a new menu item.

AddItem ( String text, String iconName, String accelerator = "" ) : MenuItem

Adds a new menu item.

Close ( ) : void

Closes the current menu.

CloseAll ( ) : void

Closes all submenus.

CloseMenus ( ) : void

Closes all submenus and the current menu.

IsMenuOpen ( ) : bool

Indicates whether any (sub)menu is open.

Menu ( Control parent ) : System

Initializes a new instance of the Menu class.

Open ( Pos pos ) : void

Opens the menu.

Protected Methods

Method Description
Layout ( Skins skin ) : void

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

OnAddItem ( MenuItem item ) : void

Add item handler.

OnHoverItem ( Control control ) : void

Mouse hover handler.

Render ( Skins skin ) : void

Renders the control using specified skin.

RenderUnder ( Skins skin ) : void

Renders under the actual control (shadows etc).

Method Details

AddDivider() public method

Adds a divider menu item.
public AddDivider ( ) : void
return void

AddItem() public method

Adds a new menu item.
public AddItem ( String text ) : MenuItem
text String Item text.
return MenuItem

AddItem() public method

Adds a new menu item.
public AddItem ( String text, String iconName, String accelerator = "" ) : MenuItem
text String Item text.
iconName String Icon texture name.
accelerator String Accelerator for this item.
return MenuItem

Close() public method

Closes the current menu.
public Close ( ) : void
return void

CloseAll() public method

Closes all submenus.
public CloseAll ( ) : void
return void

CloseMenus() public method

Closes all submenus and the current menu.
public CloseMenus ( ) : void
return void

IsMenuOpen() public method

Indicates whether any (sub)menu is open.
public IsMenuOpen ( ) : bool
return bool

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

Menu() public method

Initializes a new instance of the Menu class.
public Menu ( Control parent ) : System
parent Control Parent control.
return System

OnAddItem() protected method

Add item handler.
protected OnAddItem ( MenuItem item ) : void
item MenuItem Item added.
return void

OnHoverItem() protected method

Mouse hover handler.
protected OnHoverItem ( Control control ) : void
control Control Event source.
return void

Open() public method

Opens the menu.
public Open ( Pos pos ) : void
pos Pos Unused.
return void

Render() protected method

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

RenderUnder() protected method

Renders under the actual control (shadows etc).
protected RenderUnder ( Skins skin ) : void
skin Skins Skin to use.
return void