OmegaEngine API
1.0.3
|
A basic edit box More...
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... | |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
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 |
![]() | |
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>() |
Properties | |
string | Text [get, set] |
Get or sets the text More... | |
![]() | |
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 |
![]() | |
EventHandler | MouseEnter |
A basic edit box
|
inline |
Creates a new edit box control
|
inline |
Clears the edit box
|
inlineprotected |
Copy the selected text to the clipboard
|
inlineprotected |
Deletes the text that is currently selected
|
inline |
Gets a copy of the text
|
inlinevirtual |
Handle keyboard input to the edit box
Reimplemented from OmegaGUI.Render.Control.
|
inlinevirtual |
Handle mouse messages
Reimplemented from OmegaGUI.Render.Control.
|
inlinevirtual |
Handle all other messages
Reimplemented from OmegaGUI.Render.Control.
|
inlinevirtual |
Update the caret when focus is in
Reimplemented from OmegaGUI.Render.Control.
|
inlineprotected |
Paste the clipboard data to the control
|
inlineprotected |
Set the caret to a character position, and adjust the scrolling if necessary
|
inlineprotected |
Raises the changed event
|
inlineprotected |
Raises the Enter event
|
inlinevirtual |
Render the control
Implements OmegaGUI.Render.Control.
|
inlineprotected |
Reset's the caret blink time
|
inline |
Update the border
|
inline |
Update the caret color
|
inline |
Update the selected background color
|
inline |
Update the text selected color
|
inline |
Update the spacing
|
inline |
Sets the text for the control
|
inline |
Update the text color
|
inlineprotectedvirtual |
Updates the rectangles used by the control
Reimplemented from OmegaGUI.Render.Control.
Can the edit box have focus
|
getset |
Get or sets the text