OmegaEngine API
1.0.3
|
Dropdown list control More...
Public Member Functions | |
DropdownList (Dialog parent) | |
Create new dropdown list control More... | |
void | SetDropHeight (int height) |
Sets the drop height of this control More... | |
void | SetScrollbarWidth (int width) |
Sets the scroll bar width of this control More... | |
override void | OnInitialize () |
Initialize the scrollbar control here More... | |
override void | OnFocusOut () |
Called when focus leaves the control More... | |
override void | OnHotKey () |
Called when the control's hotkey is pressed More... | |
override bool | HandleKeyboard (WindowMessage msg, IntPtr wParam, IntPtr lParam) |
Called when the control needs to handle the keyboard More... | |
override bool | HandleMouse (WindowMessage msg, Point pt, IntPtr wParam, IntPtr lParam) |
Called when the control should handle the mouse More... | |
override void | Render (Device device, float elapsedTime) |
Called when the control should be rendered More... | |
void | AddItem (string text, string tag, object data) |
Adds an item to the dropdown list control More... | |
void | RemoveAt (int index) |
Removes an item at a particular index More... | |
void | Clear () |
Removes all items from the control More... | |
bool | ContainsItem (string text, int start) |
Determines whether this control contains an item More... | |
bool | ContainsItem (string text) |
Determines whether this control contains an item More... | |
object | GetSelectedData () |
Gets the data for the selected item More... | |
ListItem | GetSelectedItem () |
Gets the selected item More... | |
object | GetItemData (string text) |
Gets the data for an item More... | |
void | SetSelected (int index) |
Sets the selected item by index More... | |
void | SetSelected (string text) |
Sets the selected item by text More... | |
Public Member Functions inherited from OmegaGUI.Render.Button | |
Button (Dialog parent) | |
Create new button instance More... | |
Public Member Functions inherited from OmegaGUI.Render.Label | |
Label (Dialog parent) | |
Create a new instance of a static text control More... | |
override void | Render (Device device, float elapsedTime) |
Render this control More... | |
string | GetTextCopy () |
Return a copy of the string More... | |
void | SetText (string newText) |
Sets the updated text for this control More... | |
Public Member Functions inherited from OmegaGUI.Render.Control | |
override string | ToString () |
virtual bool | MsgProc (IntPtr hWnd, WindowMessage msg, IntPtr wParam, IntPtr lParam) |
Message Handler More... | |
virtual void | OnFocusIn () |
Called when control gets focus More... | |
virtual void | OnMouseEnter () |
Called when mouse goes over the control More... | |
virtual void | OnMouseExit () |
Called when mouse leaves the control More... | |
virtual bool | ContainsPoint (Point pt) |
Does the control contain this point More... | |
virtual void | SetLocation (int x, int y) |
Called to set control's location More... | |
virtual void | SetSize (int w, int h) |
Called to set control's size More... | |
virtual void | Refresh () |
Refreshes the control More... | |
Public Attributes | |
const int | MainLayer = 0 |
const int | ComboButtonLayer = 1 |
const int | DropdownLayer = 2 |
const int | SelectionLayer = 3 |
override bool | CanHaveFocus => (IsVisible && IsEnabled) |
Can this control have focus More... | |
int | NumberItems => itemList.Count |
Number of items current in the list More... | |
ListItem | this[int index] => itemList[index] |
Indexer for items in the list More... | |
Public Attributes inherited from OmegaGUI.Render.Button | |
const int | ButtonLayer = 0 |
const int | FillLayer = 1 |
override bool | CanHaveFocus => IsVisible && IsEnabled |
Can the button have focus More... | |
Public Attributes inherited from OmegaGUI.Render.Control | |
uint | index |
bool | IsDefault |
Dialog | Parent => parentDialog |
The parent dialog of this control More... | |
virtual bool | CanHaveFocus => false |
Can the control have focus More... | |
virtual ControlType | ControlType => ctrlType |
Type of the control More... | |
Protected Member Functions | |
void | RaiseChangedEvent (DropdownList sender, bool wasTriggeredByUser) |
Create new button instance More... | |
override void | UpdateRectangles () |
Update the rectangles for the dropdown list control More... | |
int | FindItem (string text, int start) |
Finds an item in the list and returns the index More... | |
int | FindItem (string text) |
Finds an item in the list and returns the index More... | |
Protected Member Functions inherited from OmegaGUI.Render.Button | |
void | RaiseClickEvent (Button sender, bool wasTriggeredByUser) |
Create new button instance More... | |
Protected Member Functions inherited from OmegaGUI.Render.Control | |
Control (Dialog parent) | |
Create a new instance of a control More... | |
Protected Attributes | |
int | selectedIndex |
int | focusedIndex |
int | dropHeight |
ScrollBar | scrollbarControl |
int | scrollWidth |
bool | isComboOpen |
Rectangle | textRect |
Rectangle | buttonRect |
Rectangle | dropDownRect |
Rectangle | dropDownTextRect |
List< ListItem > | itemList = new List<ListItem>() |
Protected Attributes inherited from OmegaGUI.Render.Button | |
bool | isPressed |
Protected Attributes inherited from OmegaGUI.Render.Label | |
string | textData |
Protected Attributes inherited from OmegaGUI.Render.Control | |
Dialog | parentDialog |
object | localUserData |
bool | visible = true |
bool | isMouseOver |
bool | hasFocus |
int | controlId |
ControlType | ctrlType |
Keys | ctrlHotKey |
bool | enabled = true |
Rectangle | boundingBox |
int | controlX |
List< Element > | elementList = new List<Element>() |
Events | |
EventHandler | Changed |
Events inherited from OmegaGUI.Render.Button | |
EventHandler | Click |
Events inherited from OmegaGUI.Render.Control | |
EventHandler | MouseEnter |
Additional Inherited Members | |
Properties inherited from OmegaGUI.Render.Label | |
TextAlign | TextAlign [get, set] |
Properties inherited from OmegaGUI.Render.Control | |
object | UserData [get, set] |
User specified data More... | |
virtual bool | IsEnabled [get, set] |
Is the control enabled More... | |
virtual bool | IsVisible [get, set] |
Is the control visible More... | |
virtual int | ID [get, set] |
Unique ID of the control More... | |
virtual Keys | Hotkey [get, set] |
The controls hotkey More... | |
Element | this[uint elementIndex] [get, set] |
Index for the elements this control has access to More... | |
Dropdown list control
|
inline |
Create new dropdown list control
|
inline |
Adds an item to the dropdown list control
|
inline |
Removes all items from the control
|
inline |
Determines whether this control contains an item
|
inline |
Determines whether this control contains an item
|
inlineprotected |
Finds an item in the list and returns the index
|
inlineprotected |
Finds an item in the list and returns the index
|
inline |
Gets the data for an item
|
inline |
Gets the data for the selected item
|
inline |
Gets the selected item
|
inlinevirtual |
Called when the control needs to handle the keyboard
Reimplemented from OmegaGUI.Render.Button.
|
inlinevirtual |
Called when the control should handle the mouse
Reimplemented from OmegaGUI.Render.Button.
|
inlinevirtual |
Called when focus leaves the control
Reimplemented from OmegaGUI.Render.Control.
|
inlinevirtual |
Called when the control's hotkey is pressed
Reimplemented from OmegaGUI.Render.Button.
|
inlinevirtual |
Initialize the scrollbar control here
Reimplemented from OmegaGUI.Render.Control.
|
inlineprotected |
Create new button instance
|
inline |
Removes an item at a particular index
|
inlinevirtual |
Called when the control should be rendered
Reimplemented from OmegaGUI.Render.Button.
|
inline |
Sets the drop height of this control
|
inline |
Sets the scroll bar width of this control
|
inline |
Sets the selected item by index
|
inline |
Sets the selected item by text
|
inlineprotectedvirtual |
Update the rectangles for the dropdown list control
Reimplemented from OmegaGUI.Render.Control.
Can this control have focus
int OmegaGUI.Render.DropdownList.NumberItems => itemList.Count |
Number of items current in the list
ListItem OmegaGUI.Render.DropdownList.this[int index] => itemList[index] |
Indexer for items in the list