OmegaEngine API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Events | List of all members
OmegaGUI.Render.DropdownList Class Reference

Dropdown list control More...

Inheritance diagram for OmegaGUI.Render.DropdownList:
OmegaGUI.Render.Button OmegaGUI.Render.Label OmegaGUI.Render.Control

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< ListItemitemList = 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< ElementelementList = 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...
 

Detailed Description

Dropdown list control

Constructor & Destructor Documentation

OmegaGUI.Render.DropdownList.DropdownList ( Dialog  parent)
inline

Create new dropdown list control

Member Function Documentation

void OmegaGUI.Render.DropdownList.AddItem ( string  text,
string  tag,
object  data 
)
inline

Adds an item to the dropdown list control

void OmegaGUI.Render.DropdownList.Clear ( )
inline

Removes all items from the control

bool OmegaGUI.Render.DropdownList.ContainsItem ( string  text,
int  start 
)
inline

Determines whether this control contains an item

bool OmegaGUI.Render.DropdownList.ContainsItem ( string  text)
inline

Determines whether this control contains an item

int OmegaGUI.Render.DropdownList.FindItem ( string  text,
int  start 
)
inlineprotected

Finds an item in the list and returns the index

int OmegaGUI.Render.DropdownList.FindItem ( string  text)
inlineprotected

Finds an item in the list and returns the index

object OmegaGUI.Render.DropdownList.GetItemData ( string  text)
inline

Gets the data for an item

object OmegaGUI.Render.DropdownList.GetSelectedData ( )
inline

Gets the data for the selected item

ListItem OmegaGUI.Render.DropdownList.GetSelectedItem ( )
inline

Gets the selected item

override bool OmegaGUI.Render.DropdownList.HandleKeyboard ( WindowMessage  msg,
IntPtr  wParam,
IntPtr  lParam 
)
inlinevirtual

Called when the control needs to handle the keyboard

Reimplemented from OmegaGUI.Render.Button.

override bool OmegaGUI.Render.DropdownList.HandleMouse ( WindowMessage  msg,
Point  pt,
IntPtr  wParam,
IntPtr  lParam 
)
inlinevirtual

Called when the control should handle the mouse

Reimplemented from OmegaGUI.Render.Button.

override void OmegaGUI.Render.DropdownList.OnFocusOut ( )
inlinevirtual

Called when focus leaves the control

Reimplemented from OmegaGUI.Render.Control.

override void OmegaGUI.Render.DropdownList.OnHotKey ( )
inlinevirtual

Called when the control's hotkey is pressed

Reimplemented from OmegaGUI.Render.Button.

override void OmegaGUI.Render.DropdownList.OnInitialize ( )
inlinevirtual

Initialize the scrollbar control here

Reimplemented from OmegaGUI.Render.Control.

void OmegaGUI.Render.DropdownList.RaiseChangedEvent ( DropdownList  sender,
bool  wasTriggeredByUser 
)
inlineprotected

Create new button instance

void OmegaGUI.Render.DropdownList.RemoveAt ( int  index)
inline

Removes an item at a particular index

override void OmegaGUI.Render.DropdownList.Render ( Device  device,
float  elapsedTime 
)
inlinevirtual

Called when the control should be rendered

Reimplemented from OmegaGUI.Render.Button.

void OmegaGUI.Render.DropdownList.SetDropHeight ( int  height)
inline

Sets the drop height of this control

void OmegaGUI.Render.DropdownList.SetScrollbarWidth ( int  width)
inline

Sets the scroll bar width of this control

void OmegaGUI.Render.DropdownList.SetSelected ( int  index)
inline

Sets the selected item by index

void OmegaGUI.Render.DropdownList.SetSelected ( string  text)
inline

Sets the selected item by text

override void OmegaGUI.Render.DropdownList.UpdateRectangles ( )
inlineprotectedvirtual

Update the rectangles for the dropdown list control

Reimplemented from OmegaGUI.Render.Control.

Member Data Documentation

override bool OmegaGUI.Render.DropdownList.CanHaveFocus => (IsVisible && IsEnabled)

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


The documentation for this class was generated from the following file: