Window Framework v1.2.4
Window Framework for Unity UI Toolkit
Loading...
Searching...
No Matches
GWG.WindowFramework.ContextMenuItem Class Reference

Used to define the items that will be displayed in the context menu.

Public Member Functions

 ContextMenuItem ()
 Create a menu seperator in the menu.
 ContextMenuItem (bool isSeparator=true, string label=null, Action action=null, Func< bool > isVisible=null, Func< bool > isDisabled=null, Func< bool > isChecked=null, Object userData=null)
 Context Menu Default implementation with all possible options.
 ContextMenuItem (string label, Action action=null)
 Represents an individual item in a context menu, providing the label and action.
 ContextMenuItem (string label, Action action=null, Func< bool > isVisible=null)
 Represents an item in a context menu, including its label, action to be performed, and visibility logic.
 ContextMenuItem (string label, Action action=null, Func< bool > isVisible=null, Func< bool > isDisabled=null)
 ContextMenuItem (string label, Action action=null, Func< bool > isVisible=null, Func< bool > isDisabled=null, Func< bool > isChecked=null)
 Represents an item in a context menu, providing its display label, associated action, and optional logic for visibility, enablement, and selection state.
 ContextMenuItem (string label, Action action=null, Func< bool > isVisible=null, Func< bool > isDisabled=null, Func< bool > isChecked=null, Object userData=null)
 Represents an item in a context menu, providing its display label, associated action, and optional logic for visibility, enablement, and selection state.

Public Attributes

Action Action
Func< bool > IsChecked
Func< bool > IsDisabled
bool IsSeparator
Func< bool > IsVisible
string Label
Object UserData

Constructor & Destructor Documentation

◆ ContextMenuItem() [1/7]

GWG.WindowFramework.ContextMenuItem.ContextMenuItem ( string label,
Action action = null )
Parameters
labelText to display in the menu
actionAction to Invoke when activated

◆ ContextMenuItem() [2/7]

GWG.WindowFramework.ContextMenuItem.ContextMenuItem ( string label,
Action action = null,
Func< bool > isVisible = null )
Parameters
labelText to display in the menu
actionAction to Invoke when activated
isVisibleBool Func - Should the item be displayed undercurrent conditions

◆ ContextMenuItem() [3/7]

GWG.WindowFramework.ContextMenuItem.ContextMenuItem ( string label,
Action action = null,
Func< bool > isVisible = null,
Func< bool > isDisabled = null )
Parameters
labelText to display in the menu
actionAction to Invoke when activated
isVisibleBool Func - Should the item be displayed undercurrent conditions
isDisabledBool Func - Show the item but in a disabled state based on data

◆ ContextMenuItem() [4/7]

GWG.WindowFramework.ContextMenuItem.ContextMenuItem ( string label,
Action action = null,
Func< bool > isVisible = null,
Func< bool > isDisabled = null,
Func< bool > isChecked = null )
Parameters
labelText to display in the menu
actionAction to Invoke when activated
isVisibleBool Func - Should the item be displayed undercurrent conditions
isDisabledBool Func - Show the item but in a disabled state based on data
isCheckedBool Func - Show a check mark next to the item in the menu

◆ ContextMenuItem() [5/7]

GWG.WindowFramework.ContextMenuItem.ContextMenuItem ( string label,
Action action = null,
Func< bool > isVisible = null,
Func< bool > isDisabled = null,
Func< bool > isChecked = null,
Object userData = null )
Parameters
labelText to display in the menu
actionAction to Invoke when activated
isVisibleBool Func - Should the item be displayed undercurrent conditions
isDisabledBool Func - Show the item but in a disabled state based on data
isCheckedBool Func - Show a check mark next to the item in the menu
userDataOptional user data object to store in the userdata container of the visual element

◆ ContextMenuItem() [6/7]

GWG.WindowFramework.ContextMenuItem.ContextMenuItem ( )

◆ ContextMenuItem() [7/7]

GWG.WindowFramework.ContextMenuItem.ContextMenuItem ( bool isSeparator = true,
string label = null,
Action action = null,
Func< bool > isVisible = null,
Func< bool > isDisabled = null,
Func< bool > isChecked = null,
Object userData = null )
Parameters
isSeparatorMake the item as a seperator
labelText to display in the menu
actionAction to Invoke when activated
isVisibleBool Func - Should the item be displayed undercurrent conditions
isDisabledBool Func - Show the item but in a disabled state based on data
isCheckedBool Func - Show a check mark next to the item in the menu
userDataOptional user data object to store in the userdata container of the visual element

Member Data Documentation

◆ Action

Action GWG.WindowFramework.ContextMenuItem.Action

◆ IsChecked

Func<bool> GWG.WindowFramework.ContextMenuItem.IsChecked

◆ IsDisabled

Func<bool> GWG.WindowFramework.ContextMenuItem.IsDisabled

◆ IsSeparator

bool GWG.WindowFramework.ContextMenuItem.IsSeparator

◆ IsVisible

Func<bool> GWG.WindowFramework.ContextMenuItem.IsVisible

◆ Label

string GWG.WindowFramework.ContextMenuItem.Label

◆ UserData

Object GWG.WindowFramework.ContextMenuItem.UserData