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

A basic edit box More...

Inheritance diagram for OmegaGUI.Render.TextBox:
OmegaGUI.Render.Control

Public Member Functions

void SetSpacing (int space)
 Update the spacing More...
 
void SetBorderWidth (int b)
 Update the border More...
 
void SetTextColor (Color4 color)
 Update the text color More...
 
void SetSelectedTextColor (Color4 color)
 Update the text selected color More...
 
void SetSelectedBackColor (Color4 color)
 Update the selected background color More...
 
void SetCaretColor (Color4 color)
 Update the caret color More...
 
string GetTextCopy ()
 Gets a copy of the text More...
 
 TextBox (Dialog parent)
 Creates a new edit box control More...
 
void Clear ()
 Clears the edit box More...
 
void SetText (string text, bool selected)
 Sets the text for the control More...
 
override void OnFocusIn ()
 Update the caret when focus is in More...
 
override bool HandleKeyboard (WindowMessage msg, IntPtr wParam, IntPtr lParam)
 Handle keyboard input to the edit box More...
 
override bool HandleMouse (WindowMessage msg, Point pt, IntPtr wParam, IntPtr lParam)
 Handle mouse messages More...
 
override bool MsgProc (IntPtr hWnd, WindowMessage msg, IntPtr wParam, IntPtr lParam)
 Handle all other messages More...
 
override void Render (Device device, float elapsedTime)
 Render the control More...
 
- Public Member Functions inherited from OmegaGUI.Render.Control
override string ToString ()
 
virtual void OnInitialize ()
 Initialize the control More...
 
virtual void OnFocusOut ()
 Called when control loses focus More...
 
virtual void OnMouseEnter ()
 Called when mouse goes over the control More...
 
virtual void OnMouseExit ()
 Called when mouse leaves the control More...
 
virtual void OnHotKey ()
 Called when the control's hotkey is hit 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 TextLayer = 0
 
const int TopLeftBorder = 1
 
const int TopBorder = 2
 
const int TopRightBorder = 3
 
const int LeftBorder = 4
 
const int RightBorder = 5
 
const int LowerLeftBorder = 6
 
const int LowerBorder = 7
 
const int LowerRightBorder = 8
 
override bool CanHaveFocus => (IsVisible && IsEnabled)
 Can the edit box 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 (TextBox sender, bool wasTriggeredByUser)
 Raises the changed event More...
 
void RaiseEnterEvent (TextBox sender, bool wasTriggeredByUser)
 Raises the Enter event More...
 
void PlaceCaret (int pos)
 Set the caret to a character position, and adjust the scrolling if necessary More...
 
void DeleteSelectionText ()
 Deletes the text that is currently selected More...
 
override void UpdateRectangles ()
 Updates the rectangles used by the control More...
 
void CopyToClipboard ()
 Copy the selected text to the clipboard More...
 
void PasteFromClipboard ()
 Paste the clipboard data to the control More...
 
void ResetCaretBlink ()
 Reset's the caret blink time More...
 
- Protected Member Functions inherited from OmegaGUI.Render.Control
 Control (Dialog parent)
 Create a new instance of a control More...
 

Protected Attributes

RichTextBox textData
 
int border
 
int spacing
 
Rectangle textRect
 
Rectangle[] elementRects = new Rectangle[9]
 
double blinkTime
 
double lastBlink
 
bool isCaretOn
 
int caretPosition
 
bool isInsertMode
 
int firstVisible
 
Color4 textColor
 
Color4 selectedTextColor
 
Color4 selectedBackColor
 
Color4 caretColor
 
bool isMouseDragging
 
- 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>()
 

Properties

string Text [get, set]
 Get or sets the text More...
 
- 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...
 

Events

EventHandler Changed
 
EventHandler Enter
 
- Events inherited from OmegaGUI.Render.Control
EventHandler MouseEnter
 

Detailed Description

A basic edit box

Constructor & Destructor Documentation

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

Creates a new edit box control

Member Function Documentation

void OmegaGUI.Render.TextBox.Clear ( )
inline

Clears the edit box

void OmegaGUI.Render.TextBox.CopyToClipboard ( )
inlineprotected

Copy the selected text to the clipboard

void OmegaGUI.Render.TextBox.DeleteSelectionText ( )
inlineprotected

Deletes the text that is currently selected

string OmegaGUI.Render.TextBox.GetTextCopy ( )
inline

Gets a copy of the text

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

Handle keyboard input to the edit box

Reimplemented from OmegaGUI.Render.Control.

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

Handle mouse messages

Reimplemented from OmegaGUI.Render.Control.

override bool OmegaGUI.Render.TextBox.MsgProc ( IntPtr  hWnd,
WindowMessage  msg,
IntPtr  wParam,
IntPtr  lParam 
)
inlinevirtual

Handle all other messages

Reimplemented from OmegaGUI.Render.Control.

override void OmegaGUI.Render.TextBox.OnFocusIn ( )
inlinevirtual

Update the caret when focus is in

Reimplemented from OmegaGUI.Render.Control.

void OmegaGUI.Render.TextBox.PasteFromClipboard ( )
inlineprotected

Paste the clipboard data to the control

void OmegaGUI.Render.TextBox.PlaceCaret ( int  pos)
inlineprotected

Set the caret to a character position, and adjust the scrolling if necessary

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

Raises the changed event

void OmegaGUI.Render.TextBox.RaiseEnterEvent ( TextBox  sender,
bool  wasTriggeredByUser 
)
inlineprotected

Raises the Enter event

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

Render the control

Implements OmegaGUI.Render.Control.

void OmegaGUI.Render.TextBox.ResetCaretBlink ( )
inlineprotected

Reset's the caret blink time

void OmegaGUI.Render.TextBox.SetBorderWidth ( int  b)
inline

Update the border

void OmegaGUI.Render.TextBox.SetCaretColor ( Color4  color)
inline

Update the caret color

void OmegaGUI.Render.TextBox.SetSelectedBackColor ( Color4  color)
inline

Update the selected background color

void OmegaGUI.Render.TextBox.SetSelectedTextColor ( Color4  color)
inline

Update the text selected color

void OmegaGUI.Render.TextBox.SetSpacing ( int  space)
inline

Update the spacing

void OmegaGUI.Render.TextBox.SetText ( string  text,
bool  selected 
)
inline

Sets the text for the control

void OmegaGUI.Render.TextBox.SetTextColor ( Color4  color)
inline

Update the text color

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

Updates the rectangles used by the control

Reimplemented from OmegaGUI.Render.Control.

Member Data Documentation

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

Can the edit box have focus

Property Documentation

string OmegaGUI.Render.TextBox.Text
getset

Get or sets the text


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