Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Engine.UIContextMenu

Extends
UIList
Modifiers
native ( inherit ) HideCategories ( List ) notplaceable

Displays a list of options for the user to choose from. Invoked when the user right-clicks on a widget which supports context menus, and the list of available options are context sensitive. Items can be either static (using static data providers) or modified at runtime. Copyright 1998-2008 Epic Games, Inc. All Rights Reserved

Core.Object
|   
+-- Engine.UIRoot
   |   
   +-- Engine.UIScreenObject
      |   
      +-- Engine.UIObject
         |   
         +-- Engine.UIList
            |   
            +-- Engine.UIContextMenu

Direct Known Subclasses:

UTUI_ContextMenu

Constants Summary
Inherited Contants from Engine.UIList
ResizeBufferPixels
Inherited Contants from Engine.UIObject
CONTEXTMENU_BINDING_INDEX, FIRST_DEFAULT_DATABINDING_INDEX, TOOLTIP_BINDING_INDEX

Variables Summary
boolbResolvePosition
UIObjectInvokingWidget
array<ContextMenuItem>MenuItems
Inherited Variables from Engine.UIList
bAllowColumnResizing, bAllowDisabledItemSelection, bDisplayDataBindings, bEnableMultiSelect, bEnableVerticalScrollbar, bHoverStateOverridesSelected, bInitializeScrollbars, bSingleClickSubmission, bSortingList, bUpdateItemUnderCursor, CellDataComponent, CellLinkType, CellPadding, CellSpacing, ColumnAutoSizeMode, ColumnCount, ColumnHeaderBackgroundStyle[EColumnHeaderState.COLUMNHEADER_MAX], ColumnHeaderStyle, ColumnWidth, DataProvider, DataSource, DecrementIndexCue, GlobalCellStyle[EUIListElementState.ELEMENT_MAX], HeaderCellPadding, HeaderElementSpacing, IncrementIndexCue, Index, ItemOverlayStyle[EUIListElementState.ELEMENT_MAX], Items, MaxVisibleItems, MinColumnSize, ResizeColumn, RowAutoSizeMode, RowCount, RowHeight, SelectedItems, SetIndexMutex, SortAscendingCue, SortComponent, SortDescendingCue, SubmitDataFailedCue, SubmitDataSuccessCue, TopIndex, ValueChangeNotificationMutex, VerticalScrollbar, WrapType
Inherited Variables from Engine.UIObject
AnimationParent, AnimationPosition, AnimStack, bDebugShowBounds, bEnableActiveCursorUpdates, bSupportsPrimaryStyle, ContextMenuData, DebugBoundsColor, DockTargets, NavigationTargets, Owner, OwnerScene, PrimaryStyle, PrivateFlags, RenderBoundsVertices[EUIWidgetFace.UIFACE_MAX], RenderBounds[EUIWidgetFace.UIFACE_MAX], RenderOffset, Rotation, StyleSubscribers, TabIndex, ToolTip, WidgetID, WidgetTag

Enumerations Summary
EContextMenuItemType
CMIT_Normal, CMIT_Submenu, CMIT_Separator, CMIT_Check, CMIT_Radio,
Inherited Enumerations from Engine.UIList
ECellAutoSizeMode, ECellLinkType, EListWrapBehavior

Structures Summary
ContextMenuItem
OwnerMenu, ParentItem, ItemType, ItemText, ItemId
Inherited Structures from Engine.UIList
CellHitDetectionInfo

Functions Summary
eventbool ClearMenuItems (UIObject Widget ))
functionbool Close (int PlayerIndex=GetBestPlayerIndex())
eventint FindMenuItemIndex (UIObject Widget, string ItemToFind ))
eventbool GetAllMenuItems (UIObject Widget, out array out_MenuItems ))
eventbool GetMenuItem (UIObject Widget, int IndexToGet, out string out_MenuItem ))
eventbool InsertMenuItem (UIObject Widget, string Item, optional int InsertIndex=INDEX_NONE, optional bool bAllowDuplicates ))
functionbool IsActiveContextMenu () con)
functionbool Open (int PlayerIndex=GetBestPlayerIndex())
eventbool RemoveMenuItem (UIObject Widget, string ItemToRemove ))
eventbool RemoveMenuItemAtIndex (UIObject Widget, int IndexToRemove ))
eventbool SetMenuItems (UIObject Widget, array<string> NewMenuItems, optional bool bClearExisting=true, optional int InsertIndex=INDEX_NONE ))
Inherited Functions from Engine.UIList
AllMutexesDisabled, CalculateIndexFromCursorLocation, CanSelectElement, ClearBoundDataStores, ClickedScrollZone, DecrementAllMutexes, DisableSetIndex, DisableValueChangeNotification, EnableColumnHeaderRendering, EnableSetIndex, EnableValueChangeNotification, FindItemIndex, GetBoundDataStores, GetClientRegion, GetColumnWidth, GetCurrentItem, GetDataStoreBinding, GetElementValue, GetItemCount, GetMaxNumVisibleColumns, GetMaxNumVisibleRows, GetMaxVisibleElementCount, GetResizeColumn, GetRowHeight, GetSelectedItems, GetTotalColumnCount, GetTotalRowCount, IncrementAllMutexes, Initialized, IsElementAutoSizingEnabled, IsElementEnabled, IsHotTrackingEnabled, IsSetIndexEnabled, IsValueChangeNotificationEnabled, NotifyDataStoreValueUpdated, OnGetTextValue, OnSetListIndex, OnStateChanged, PostInitialize, RefreshSubscriberValue, RemoveElement, SaveSubscriberValue, ScrollVertical, SetColumnCount, SetDataStoreBinding, SetHotTracking, SetIndex, SetRowCount, SetTopIndex, ShouldRenderColumnHeaders
Inherited Functions from Engine.UIObject
AddStyleSubscriber, AnimSetBottom, AnimSetColor, AnimSetLeft, AnimSetOpacity, AnimSetPosition, AnimSetRelPosition, AnimSetRight, AnimSetRotation, AnimSetScale, AnimSetTop, AnimSetVisibility, CanAcceptFocus, ClearDefaultDataBinding, ClearUIAnimation, FindStyleSubscriberIndex, FindStyleSubscriberIndexById, GenerateSceneDataStoreMarkup, GenerateTransformMatrix, GetAnchorPosition, GetDefaultDataBinding, GetDefaultDataStores, GetOwner, GetParent, GetPositionExtent, GetPositionExtents, GetRotationMatrix, GetScene, GetToolTipValue, HasTransform, IsContainedBy, IsDockedTo, IsPrivateBehaviorSet, LogRenderBounds, NeedsActiveCursorUpdates, NotifyValueChanged, OnSetDatastoreBinding, PlayUIAnimation, RemoveStyleSubscriber, ResolveDefaultDataBinding, ResolveStyles, RotateWidget, SetActiveCursorUpdate, SetAnchorPosition, SetDefaultDataBinding, SetDockPadding, SetDockParameters, SetDockTarget, SetForcedNavigationTarget, SetNavigationTarget, SetPrivateBehavior, SetWidgetStyleByName, StopUIAnimation, TickAnim, UIAnimEnd, UpdateRotationMatrix


Variables Detail

bResolvePosition Source code

var transient const bool bResolvePosition;
indicates that this context menu's position needs to be re-resolved during the next scene update

InvokingWidget Source code

var transient const UIObject InvokingWidget;
the widget that invoked this context menu

MenuItems Source code

var transient const array<ContextMenuItem> MenuItems;


Enumerations Detail

EContextMenuItemType Source code

enum EContextMenuItemType
{
CMIT_Normal, CMIT_Submenu, CMIT_Separator, CMIT_Check, CMIT_Radio,
};
Different types of context menu items


Structures Detail

ContextMenuItem Source code

struct native ContextMenuItem
{
var int ItemId;
var string ItemText;
var EContextMenuItemType ItemType;
var transient const UIContextMenu OwnerMenu;
var native transient const pointer ParentItem;
};
Represents a single item in a context menu @note - temporary; not sure if this struct will actually be used


Functions Detail

ClearMenuItems Source code

event bool ClearMenuItems ( UIObject Widget ) )
Removes all context menu items from this context menu.
@param Widget the widget that invoked this context menu
@return TRUE if the operation was successful.

Close Source code

native final function bool Close ( int PlayerIndex=GetBestPlayerIndex() )
Closes this context menu.
@return TRUE if the context menu closed successfully; FALSE if it didn't close (as a result of OnClose returning FALSE, for example)

FindMenuItemIndex Source code

event int FindMenuItemIndex ( UIObject Widget, string ItemToFind ) )
Finds the location of a string in the context menu's array of items.
@param Widget the widget that invoked this context menu
@param ItemToFind the string to find
@return the index for the specified value, or INDEX_NONE if it couldn't be found.

GetAllMenuItems Source code

event bool GetAllMenuItems ( UIObject Widget, out array<string> out_MenuItems ) )
Gets a list of the current context menu items strings.
@param Widget the widget that invoked this context menu
@param out_MenuItems receives the context menu item strings
@return TRUE if the operation was successful.

GetMenuItem Source code

event bool GetMenuItem ( UIObject Widget, int IndexToGet, out string out_MenuItem ) )
Gets the value of the context menu item located at a specified position in the array.
@param Widget the widget that invoked this context menu
@param IndexToGet the index of the context menu item to get
@param out_MenuItem receives the value of the context menu item text.
@return TRUE if the value was successfully retrieved and copied to out_MenuItem.

InsertMenuItem Source code

event bool InsertMenuItem ( UIObject Widget, string Item, optional int InsertIndex=INDEX_NONE, optional bool bAllowDuplicates ) )
Sets the text for a single context menu item.
@param Widget the widget that invoked this context menu
@param Item the text to add/insert to the context menu
@param InsertIndex the location [in the list's items array] to insert the new menu item; if not specified, will be appended to the end of the array.
@param bAllowDuplicates specify TRUE to allow multiple menu items with the same value; otherwise, the new value will not be added if an existing item has the same value.
@return TRUE if the operation was successful.

IsActiveContextMenu Source code

native final const function bool IsActiveContextMenu ( ) con )
Returns TRUE if this context menu is the scene's currently active context menu.

Open Source code

native final function bool Open ( int PlayerIndex=GetBestPlayerIndex() )
Opens this context menu. Called by the owning scene when a new context menu is activated.
@param PlayerIndex the index of the player that triggered the context menu to be opened.
@return TRUE if the context menu was successfully opened.

RemoveMenuItem Source code

event bool RemoveMenuItem ( UIObject Widget, string ItemToRemove ) )
Removes a single menu item from the context menu.
@param Widget the widget that invoked this context menu
@param ItemToRemove the string that should be removed from the context menu
@return TRUE if the value was successfully removed or didn't exist in the first place.

RemoveMenuItemAtIndex Source code

event bool RemoveMenuItemAtIndex ( UIObject Widget, int IndexToRemove ) )
Removes the context menu item located at a specified position in the array.
@param Widget the widget that invoked this context menu
@param IndexToRemove the index of the item that should be removed.
@return TRUE if the value was successfully removed; FALSE if IndexToRemove wasn't valid or the value couldn't be removed.

SetMenuItems Source code

event bool SetMenuItems ( UIObject Widget, array<string> NewMenuItems, optional bool bClearExisting=true, optional int InsertIndex=INDEX_NONE ) )
Sets the text that will be displayed in the context menu items.
@param Widget the widget that invoked this context menu
@param NewMenuItems the menu items to use in the context menu
@param bClearExisting specify TRUE to clear any existing menu items; otherwise, the new items will be appended to the old
@param InsertIndex the location [in the list's items array] to insert the new menu items at; only relevant if bClearExisting is FALSE
@return TRUE if the operation was successful.


Defaultproperties

defaultproperties
{
   ColumnAutoSizeMode=CELLAUTOSIZE_AdjustList
   RowAutoSizeMode=CELLAUTOSIZE_AdjustList
   WrapType=LISTWRAP_Jump
   bEnableVerticalScrollbar=False
   bSingleClickSubmission=True
   bUpdateItemUnderCursor=True
   Begin Object Class=UIComp_ContextMenuListPresenter Name=ContextMenuDataComponent ObjName=ContextMenuDataComponent Archetype=UIComp_ContextMenuListPresenter'Engine.Default__UIComp_ContextMenuListPresenter'
      Begin Object Class=UITexture Name=NormalOverlayTemplate ObjName=NormalOverlayTemplate Archetype=UITexture'Engine.Default__UIComp_ContextMenuListPresenter:NormalOverlayTemplate'
         ObjectArchetype=UITexture'Engine.Default__UIComp_ContextMenuListPresenter:NormalOverlayTemplate'
      End Object
      Begin Object Class=UITexture Name=ActiveOverlayTemplate ObjName=ActiveOverlayTemplate Archetype=UITexture'Engine.Default__UIComp_ContextMenuListPresenter:ActiveOverlayTemplate'
         ObjectArchetype=UITexture'Engine.Default__UIComp_ContextMenuListPresenter:ActiveOverlayTemplate'
      End Object
      Begin Object Class=UITexture Name=SelectionOverlayTemplate ObjName=SelectionOverlayTemplate Archetype=UITexture'Engine.Default__UIComp_ContextMenuListPresenter:SelectionOverlayTemplate'
         ObjectArchetype=UITexture'Engine.Default__UIComp_ContextMenuListPresenter:SelectionOverlayTemplate'
      End Object
      Begin Object Class=UITexture Name=HoverOverlayTemplate ObjName=HoverOverlayTemplate Archetype=UITexture'Engine.Default__UIComp_ContextMenuListPresenter:HoverOverlayTemplate'
         ObjectArchetype=UITexture'Engine.Default__UIComp_ContextMenuListPresenter:HoverOverlayTemplate'
      End Object
      ListItemOverlay(0)=UITexture'Engine.Default__UIContextMenu:ContextMenuDataComponent.NormalOverlayTemplate'
      ListItemOverlay(1)=UITexture'Engine.Default__UIContextMenu:ContextMenuDataComponent.ActiveOverlayTemplate'
      ListItemOverlay(2)=UITexture'Engine.Default__UIContextMenu:ContextMenuDataComponent.SelectionOverlayTemplate'
      ListItemOverlay(3)=UITexture'Engine.Default__UIContextMenu:ContextMenuDataComponent.HoverOverlayTemplate'
      Name="ContextMenuDataComponent"
      ObjectArchetype=UIComp_ContextMenuListPresenter'Engine.Default__UIComp_ContextMenuListPresenter'
   End Object
   CellDataComponent=ContextMenuDataComponent
   PrimaryStyle=(DefaultStyleTag="DefaultContextMenuStyle",RequiredStyleClass=Class'Engine.UIStyle_Image')
   bEnableActiveCursorUpdates=True
   bSupportsPrimaryStyle=True
   Position=(Value[2]=16.000000,Value[3]=100.000000,ScaleType[0]=EVALPOS_PixelViewport,ScaleType[1]=EVALPOS_PixelViewport,ScaleType[2]=EVALPOS_PixelOwner,ScaleType[3]=EVALPOS_PixelOwner)
   bHidden=True
   Begin Object Class=UIComp_Event Name=WidgetEventComponent ObjName=WidgetEventComponent Archetype=UIComp_Event'Engine.Default__UIList:WidgetEventComponent'
      ObjectArchetype=UIComp_Event'Engine.Default__UIList:WidgetEventComponent'
   End Object
   EventProvider=WidgetEventComponent
   Name="Default__UIContextMenu"
   ObjectArchetype=UIList'Engine.Default__UIList'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Creation time: sk 18-3-2018 10:00:46.578 - Created with UnCodeX