|
GuiPopUpMenuCtrlEx Class Reference
[General Controls]
A control that allows to select a value from a drop-down list. More...
Public Member Functions | |
void | add (string name, int idNum, int scheme=0) |
void | add (string name, S32 idNum, S32 scheme=0) |
Adds an entry to the list. | |
void | addCategory (string text) |
Add a category to the list. | |
void | addScheme (int id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL) |
Create a new scheme and add it to the list of choices for when a new text entry is added. | |
void | clear () |
Clear the popup list. | |
void | clearEntry (S32 entry) |
int | findText (string text) |
Returns the id of the first entry containing the specified text or -1 if not found. | |
void | forceClose () |
Manually force this control to collapse and close. | |
void | forceOnAction () |
Manually for the onAction function, which updates everything in this control. | |
int | getSelected () |
Get the current selection of the menu. | |
string | getText () |
Get the. | |
string | getTextById (int id) |
Get the text of an entry based on an ID. | |
void | setNoneSelected (int param) |
Clears selection in the menu. | |
setSelected (int id, bool scriptCallback=true) | |
setSelected (bool scriptCallback=true) | |
void | setText (string text) |
Set the current text to a specified value. | |
void | sort () |
Sort the list alphabetically. | |
void | sortID () |
Sort the list by ID. | |
Public Attributes | |
filename | bitmap |
File name of bitmap to use. | |
Point2I | bitmapBounds |
Boundaries of bitmap displayed. | |
string | getColorById |
Get color of an entry's box. | |
bool | hotTrackCallback |
Whether to provide a 'onHotTrackItem' callback when a list item is hovered over. | |
int | maxPopupHeight |
Length of menu when it extends. | |
void | replaceText |
Flag that causes each new text addition to replace the current entry. | |
bool | reverseTextList |
Reverses text list if popup extends up, instead of down. | |
bool | sbUsesNAColor |
Deprecated. | |
void | setEnumContent |
This fills the popup with a classrep's field enumeration type info. | |
int | size |
Get the size of the menu. |
Detailed Description
A control that allows to select a value from a drop-down list.
This is essentially a GuiPopUpMenuCtrl, but with quite a few more features.
- Example:
new GuiPopUpMenuCtrlEx() { maxPopupHeight = "200"; sbUsesNAColor = "0"; reverseTextList = "0"; bitmapBounds = "16 16"; hotTrackCallback = "0"; extent = "64 64"; profile = "GuiDefaultProfile"; tooltipProfile = "GuiToolTipProfile"; };
- See also:
- GuiPopUpMenuCtrl
Member Function Documentation
void GuiPopUpMenuCtrlEx::add | ( | string | name, | |
int | idNum, | |||
int | scheme = 0 | |||
) |
void GuiPopUpMenuCtrlEx::add | ( | string | name, | |
S32 | idNum, | |||
S32 | scheme = 0 | |||
) |
Adds an entry to the list.
- Parameters:
-
name String containing the name of the entry idNum Numerical value assigned to the name scheme Optional ID associated with a scheme for font coloring, highlight coloring, and selection coloring
void GuiPopUpMenuCtrlEx::addCategory | ( | string | text | ) |
Add a category to the list.
Acts as a separator between entries, allowing for sub-lists
- Parameters:
-
text Name of the new category
void GuiPopUpMenuCtrlEx::addScheme | ( | int | id, | |
ColorI | fontColor, | |||
ColorI | fontColorHL, | |||
ColorI | fontColorSEL | |||
) |
Create a new scheme and add it to the list of choices for when a new text entry is added.
- Parameters:
-
id Numerical id associated with this scheme fontColor The base text font color. Formatted as "Red Green Blue", each a numerical between 0 and 255. fontColorHL Color of text when being highlighted. Formatted as "Red Green Blue", each a numerical between 0 and 255. fontColorSel Color of text when being selected. Formatted as "Red Green Blue", each a numerical between 0 and 255.
void GuiPopUpMenuCtrlEx::clear | ( | ) |
Clear the popup list.
Reimplemented from SimSet.
void GuiPopUpMenuCtrlEx::clearEntry | ( | S32 | entry | ) |
int GuiPopUpMenuCtrlEx::findText | ( | string | text | ) |
Returns the id of the first entry containing the specified text or -1 if not found.
- Parameters:
-
text String value used for the query
- Returns:
- Numerical ID of entry containing the text.
void GuiPopUpMenuCtrlEx::forceClose | ( | ) |
Manually force this control to collapse and close.
void GuiPopUpMenuCtrlEx::forceOnAction | ( | ) |
Manually for the onAction function, which updates everything in this control.
int GuiPopUpMenuCtrlEx::getSelected | ( | ) |
Get the current selection of the menu.
- Returns:
- Returns the ID of the currently selected entry
string GuiPopUpMenuCtrlEx::getText | ( | ) |
Get the.
Detailed description
- Parameters:
-
param Description
- Example:
// Comment code();
- Returns:
- Returns current text in string format
string GuiPopUpMenuCtrlEx::getTextById | ( | int | id | ) |
Get the text of an entry based on an ID.
- Parameters:
-
id The ID assigned to the entry being queried
- Returns:
- String contained by the specified entry, NULL if empty or bad ID
void GuiPopUpMenuCtrlEx::setNoneSelected | ( | int | param | ) |
Clears selection in the menu.
GuiPopUpMenuCtrlEx::setSelected | ( | int | id, | |
bool | scriptCallback = true | |||
) |
brief Manually set an entry as selected int his control
- Parameters:
-
id The ID of the entry to select scripCallback Optional boolean that forces the script callback if true
GuiPopUpMenuCtrlEx::setSelected | ( | bool | scriptCallback = true |
) |
brief Manually set the selection to the first entry
- Parameters:
-
scripCallback Optional boolean that forces the script callback if true
void GuiPopUpMenuCtrlEx::setText | ( | string | text | ) |
Set the current text to a specified value.
- Parameters:
-
text String containing new text to set
Reimplemented from GuiTextCtrl.
void GuiPopUpMenuCtrlEx::sort | ( | ) |
Sort the list alphabetically.
void GuiPopUpMenuCtrlEx::sortID | ( | ) |
Sort the list by ID.
Member Data Documentation
filename GuiPopUpMenuCtrlEx::bitmap |
File name of bitmap to use.
Point2I GuiPopUpMenuCtrlEx::bitmapBounds |
Boundaries of bitmap displayed.
Get color of an entry's box.
- Parameters:
-
id ID number of entry to query
- Returns:
- ColorI in the format of "Red Green Blue Alpha", each of with is a value between 0 - 255
Whether to provide a 'onHotTrackItem' callback when a list item is hovered over.
Length of menu when it extends.
Flag that causes each new text addition to replace the current entry.
- Parameters:
-
True to turn on replacing, false to disable it
Reverses text list if popup extends up, instead of down.
Deprecated.
This fills the popup with a classrep's field enumeration type info.
More of a helper function than anything. If console access to the field list is added, at least for the enumerated types, then this should go away.
- Parameters:
-
class Name of the class containing the enum enum Name of the enum value to acces
Get the size of the menu.
- Returns:
- Number of entries in the menu