struct GUIDropDownMenu::DropDownSubMenu

Contains data about a single drop down box sub-menu.

Public

Constructors

DropDownSubMenu

DropDownSubMenu(GUIDropDownMenu *owner, DropDownSubMenu *parent, const TDropDownAreaPlacement<GUIPhysicalUnit> &placement, const GUIPhysicalArea &availableBounds, const GUIDropDownData &dropDownData, GUIDropDownType type, u32 depthOffset)

Creates a new drop down box sub-menu.

owner
Owner drop down box this sub menu belongs to.
parent
Parent sub-menu. Can be null.
placement
Determines how is the sub-menu positioned in the visible area.
availableBounds
Available bounds (in pixels) in which the sub-menu may be opened.
dropDownData
Data to use for initializing menu items of the sub-menu.
type
Type of the drop down box to show.
depthOffset
How much to offset the sub-menu depth. We want deeper levels of the sub-menu hierarchy to be in front of lower levels, so you should increase this value for each level of the sub-menu hierarchy.

Methods

~DropDownSubMenu

~DropDownSubMenu()

UpdateGuiElements

void UpdateGuiElements()

Recreates all internal GUI elements for the entries of the current sub-menu page.

ScrollDown

void ScrollDown()

Moves the sub-menu to the previous page and displays its elements, if available.

ScrollUp

void ScrollUp()

Moves the sub-menu to the next page and displays its elements, if available.

ScrollToTop

void ScrollToTop()

Moves the sub-menu to the first page and displays its elements.

ScrollToBottom

void ScrollToBottom()

Moves the sub-menu to the last page and displays its elements.

GetPageInfos

Vector<PageInfo> GetPageInfos() const

Calculates ranges for all the pages of the sub-menu.

ElementActivated

void ElementActivated(u32 index, const GUIPhysicalArea &bounds)

Called when the user activates an element with the specified index.

index
Index of the activated element.
bounds
Bounds of the GUI element that is used as a visual representation of this drop down element.

ElementSelected

void ElementSelected(u32 index)

Called when the user selects an element with the specified index.

index
Index of the element that was selected.

CloseSubMenu

void CloseSubMenu()

Called when the user wants to close the currently open sub-menu.

Close

void Close()

Closes this sub-menu.

GetType

GUIDropDownType GetType() const

Returns the type of the displayed drop down menu.

GetVisibleBounds

GUIPhysicalArea GetVisibleBounds() const

Returns actual visible bounds of the sub-menu.

GetOwner

GUIDropDownMenu *GetOwner() const

Returns the drop box object that owns this sub-menu.

Fields

Owner

Page

u32 Page

Position

GUILogicalPoint Position

Size

GUILogicalSize Size

VisibleBounds

GUIPhysicalArea VisibleBounds

AvailableBounds

GUIPhysicalArea AvailableBounds

DepthOffset

u32 DepthOffset

IsOpenedUpward

bool IsOpenedUpward

Content

BackgroundFrame

GUITexture * BackgroundFrame

ScrollUpBtn

GUIButton * ScrollUpBtn

ScrollDownBtn

GUIButton * ScrollDownBtn

Handle

GUITexture * Handle

BackgroundPanel

GUIPanel * BackgroundPanel

ContentPanel

GUIPanel * ContentPanel

ContentLayout

GUILayout * ContentLayout

SidebarPanel

GUIPanel * SidebarPanel

ParentSubMenu

DropDownSubMenu * ParentSubMenu

ActiveChildSubMenu

DropDownSubMenu * ActiveChildSubMenu