SpaceVIL
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
SpaceVIL.MenuItem Class Reference

Inherits SpaceVIL.Prototype.

Public Member Functions

Prototype GetSender ()
 
ContextMenu GetSubContextMenu ()
 
Returns
sub context menu

 
CustomShape GetArrow ()
 
void AssignContextMenu (ContextMenu context_menu)
 Assign the context menu More...
 
 MenuItem ()
 Constructs a MenuItem More...
 
 MenuItem (String text="")
 Constructs a MenuItem with text More...
 
 MenuItem (ContextMenu context_menu, String text="")
 Constructs a MenuItem with assigned context menu and text More...
 
int GetTextWidth ()
 
Returns
text width in the MenuItem

 
int GetTextHeight ()
 
Returns
text height in the MenuItem

 
void SetTextAlignment (ItemAlignment alignment)
 Text alignment in the MenuItem More...
 
void SetTextAlignment (params ItemAlignment[] alignment)
 
Indents GetTextMargin ()
 Text margin in the MenuItem More...
 
void SetTextMargin (Indents margin)
 
void SetFont (Font font)
 Text font in the MenuItem More...
 
Font GetFont ()
 
void SetText (String text)
 MenuItem text More...
 
String GetText ()
 
void SetForeground (Color color)
 Text color in the MenuItem More...
 
void SetForeground (int r, int g, int b)
 
void SetForeground (int r, int g, int b, int a)
 
void SetForeground (float r, float g, float b)
 
void SetForeground (float r, float g, float b, float a)
 
Color GetForeground ()
 
override void InitElements ()
 Initialization and adding of all elements in the MenuItem More...
 
override void AddItem (IBaseItem item)
 
override void SetStyle (Style style)
 Set style of the MenuItem More...
 
void AddArrow (CustomShape arrow)
 Customize shape of the MenuItem's arrow More...
 
void Show ()
 Show the MenuItem More...
 
void Hide ()
 Hide the MenuItem More...
 
- Public Member Functions inherited from SpaceVIL.Prototype
 Prototype ()
 Constructs a Prototype More...
 
virtual void Release ()
 
void SetHandler (CoreWindow handler)
 Set parent window for the Prototype More...
 
CoreWindow GetHandler ()
 
String GetToolTip ()
 tooltip of the Prototype More...
 
void SetToolTip (String text)
 
Prototype GetParent ()
 Prototype parent item More...
 
void SetParent (Prototype parent)
 
Spacing GetSpacing ()
 Spacing(horizontal, vertical) of the Prototype More...
 
void SetSpacing (Spacing spacing)
 
void SetSpacing (int horizontal=0, int vertical=0)
 
Indents GetPadding ()
 Prototype padding (left, top, right, bottom) More...
 
void SetPadding (Indents padding)
 
void SetPadding (int left=0, int top=0, int right=0, int bottom=0)
 
Indents GetMargin ()
 Margin of the Prototype (left, top, right, bottom) More...
 
void SetMargin (Indents margin)
 
void SetMargin (int left=0, int top=0, int right=0, int bottom=0)
 
void SetBorder (Border border)
 
Parameters
borderBorder of the Prototype

 
void SetBorderFill (Color fill)
 Prototype border color More...
 
Color GetBorderFill ()
 
void SetBorderFill (int r, int g, int b, int a=255)
 
void SetBorderFill (float r, float g, float b, float a=1.0f)
 
void SetBorderRadius (CornerRadius radius)
 Radius of the border's corners More...
 
void SetBorderRadius (int radius)
 
CornerRadius GetBorderRadius ()
 
void SetBorderThickness (int thickness)
 Border thickness of the Prototype More...
 
int GetBorderThickness ()
 
List< float[]> GetTriangles ()
 Make/get shape of the item using triangles list More...
 
virtual void SetTriangles (List< float[]> triangles)
 
virtual List< float[]> MakeShape ()
 
virtual void SetBackground (Color color)
 Text color in the Prototype More...
 
virtual void SetBackground (int r, int g, int b)
 
virtual void SetBackground (int r, int g, int b, int a)
 
virtual void SetBackground (float r, float g, float b)
 
virtual void SetBackground (float r, float g, float b, float a)
 
virtual Color GetBackground ()
 
void SetItemName (string name)
 Name of the Prototype More...
 
string GetItemName ()
 
void SetMinWidth (int width)
 Prototype minimum width More...
 
int GetMinWidth ()
 
virtual void SetWidth (int width)
 Prototype width More...
 
virtual int GetWidth ()
 
void SetMaxWidth (int width)
 Prototype maximum width More...
 
int GetMaxWidth ()
 
void SetMinHeight (int height)
 Prototype minimum height More...
 
int GetMinHeight ()
 
virtual void SetHeight (int height)
 Prototype height More...
 
virtual int GetHeight ()
 
void SetMaxHeight (int height)
 Prototype maximum height More...
 
int GetMaxHeight ()
 
virtual void SetSize (int width, int height)
 Prototype size (width, height) More...
 
int [] GetSize ()
 
void SetMinSize (int width, int height)
 Prototype minimum size (width, height) More...
 
int [] GetMinSize ()
 
void SetMaxSize (int width, int height)
 Prototype maximum size (width, height) More...
 
int [] GetMaxSize ()
 
void SetAlignment (ItemAlignment alignment)
 Prototype alignment More...
 
void SetAlignment (params ItemAlignment[] alignment)
 
ItemAlignment GetAlignment ()
 
void SetSizePolicy (SizePolicy width, SizePolicy height)
 Prototype size policy (FIXED, EXPAND) by width and height More...
 
void SetWidthPolicy (SizePolicy policy)
 
SizePolicy GetWidthPolicy ()
 
void SetHeightPolicy (SizePolicy policy)
 
SizePolicy GetHeightPolicy ()
 
virtual void SetPosition (int x, int y)
 Prototype position More...
 
virtual void SetX (int x)
 
virtual int GetX ()
 
virtual void SetY (int y)
 
virtual int GetY ()
 
virtual void SetConfines ()
 Set default confines of the Prototype based on parent properties More...
 
virtual void SetConfines (int x0, int x1, int y0, int y1)
 Set Prototype confines More...
 
virtual Style GetCoreStyle ()
 Generate all item properties in one style More...
 
bool IsShadowDrop ()
 
Returns
if Prototype has shadow

 
void SetShadowDrop (bool value)
 
void SetShadowRadius (int radius)
 Radius of the shadows corners More...
 
int GetShadowRadius ()
 
Color GetShadowColor ()
 Shadow color More...
 
void SetShadowColor (Color color)
 
Position GetShadowPos ()
 Prototype's shadow position More...
 
void SetShadow (int radius, int x, int y, Color color)
 Set Prototype's shadow More...
 
void AddItemState (ItemStateType type, ItemState state)
 Add new item state for one of the item state types (BASE, HOVERED, PRESSED, TOGGLED, FOCUSED, DISABLED) More...
 
void RemoveItemState (ItemStateType type)
 Remove item state More...
 
void RemoveAllItemStates ()
 Remove all item states More...
 
ItemState GetState (ItemStateType type)
 
Returns
Returns ItemState for the ItemStateType type

 
virtual void InsertItem (IBaseItem item, Int32 index)
 Insert item to the Prototype. If Prototype has more items than index replace existing item, else add new item More...
 
virtual void AddItems (params IBaseItem[] items)
 Add items into the Prototype More...
 
void Update (GeometryEventType type, int value=0)
 Update Prototype size or position depending on the GeometryEventType More...
 
virtual bool IsDrawable ()
 Is Prototype and its inner items drawable More...
 
void SetDrawable (bool value)
 
virtual bool IsVisible ()
 Is Prototype visible More...
 
virtual void SetVisible (bool value)
 
virtual bool IsPassEvents ()
 Is Prototype pass events throw itself More...
 
bool IsPassEvents (InputEventType e)
 Is Prototype pass the InputEventType throw More...
 
void SetPassEvents (bool value)
 Sets all InputEventType passed or non passed (value) More...
 
void SetPassEvents (bool value, InputEventType e)
 
void SetPassEvents (bool value, params InputEventType[] e)
 
virtual bool IsDisabled ()
 Is Prototype disabled More...
 
virtual void SetDisabled (bool value)
 
virtual bool IsMouseHover ()
 Is mouse hover on the Prototype More...
 
virtual void SetMouseHover (bool value)
 
virtual bool IsMousePressed ()
 Is mouse pressed on the Prototype More...
 
virtual void SetMousePressed (bool value)
 
virtual bool IsFocused ()
 Is Prototype focused More...
 
virtual void SetFocus ()
 Set focus on the Prototype if its focusable More...
 
virtual List< IBaseItemGetItems ()
 Returns list of the Prototype's inner items More...
 
virtual bool RemoveItem (IBaseItem item)
 Remove item from the Prototype More...
 
virtual void Clear ()
 
int [] GetConfines ()
 Prototype confines More...
 
CustomFigure IsCustomFigure ()
 Is Prototype has CustomFigure shape, return it
More...
 
void SetCustomFigure (CustomFigure figure)
 Sets shape of the Prototype as CustomFigure More...
 
ItemRule GetHoverRule ()
 Hover rule of the Prototype More...
 
void SetHoverRule (ItemRule rule)
 
CursorImage GetCursor ()
 
void SetCursor (EmbeddedCursor type)
 
void SetCursor (CursorImage cursor)
 
void SetCursor (Bitmap bitmap)
 
void SetCursor (Bitmap bitmap, int width, int height)
 

Public Attributes

bool IsActionItem = false
 
- Public Attributes inherited from SpaceVIL.Prototype
EventCommonMethodState EventResize
 
EventCommonMethodState EventDestroy
 
EventMouseMethodState EventMouseHover
 Mouse input events More...
 
EventMouseMethodState EventMouseLeave
 
EventMouseMethodState EventMouseClick
 
EventMouseMethodState EventMouseDoubleClick
 
EventMouseMethodState EventMousePress
 
EventMouseMethodState EventMouseDrag
 
EventMouseMethodState EventMouseDrop
 
EventMouseMethodState EventScrollUp
 
EventMouseMethodState EventScrollDown
 
EventKeyMethodState EventKeyPress
 Keyboard input events More...
 
EventKeyMethodState EventKeyRelease
 
EventInputTextMethodState EventTextInput
 Text input events More...
 
bool IsFocusable = true
 Is Prototype focusable More...
 

Protected Member Functions

virtual void OnKeyPress (object sender, KeyArgs args)
 
- Protected Member Functions inherited from SpaceVIL.Prototype
virtual void UpdateState ()
 Update Prototype's state according to its ItemStateType More...
 

Constructor & Destructor Documentation

◆ MenuItem() [1/3]

SpaceVIL.MenuItem.MenuItem ( )

Constructs a MenuItem

◆ MenuItem() [2/3]

SpaceVIL.MenuItem.MenuItem ( String  text = "")

Constructs a MenuItem with text

◆ MenuItem() [3/3]

SpaceVIL.MenuItem.MenuItem ( ContextMenu  context_menu,
String  text = "" 
)

Constructs a MenuItem with assigned context menu and text

Member Function Documentation

◆ AddArrow()

void SpaceVIL.MenuItem.AddArrow ( CustomShape  arrow)

Customize shape of the MenuItem's arrow

◆ AssignContextMenu()

void SpaceVIL.MenuItem.AssignContextMenu ( ContextMenu  context_menu)

Assign the context menu

◆ GetTextMargin()

Indents SpaceVIL.MenuItem.GetTextMargin ( )

Text margin in the MenuItem

◆ Hide()

void SpaceVIL.MenuItem.Hide ( )

Hide the MenuItem

◆ InitElements()

override void SpaceVIL.MenuItem.InitElements ( )
virtual

Initialization and adding of all elements in the MenuItem

Reimplemented from SpaceVIL.Prototype.

◆ SetFont()

void SpaceVIL.MenuItem.SetFont ( Font  font)

Text font in the MenuItem

◆ SetForeground()

void SpaceVIL.MenuItem.SetForeground ( Color  color)

Text color in the MenuItem

◆ SetStyle()

override void SpaceVIL.MenuItem.SetStyle ( Style  style)
virtual

Set style of the MenuItem

Reimplemented from SpaceVIL.Prototype.

◆ SetText()

void SpaceVIL.MenuItem.SetText ( String  text)

MenuItem text

◆ SetTextAlignment()

void SpaceVIL.MenuItem.SetTextAlignment ( ItemAlignment  alignment)

Text alignment in the MenuItem

◆ Show()

void SpaceVIL.MenuItem.Show ( )

Show the MenuItem


The documentation for this class was generated from the following file: