
Public Member Functions | |
| this (Dialog parent, int id) | |
| Constructs an EditBox object to interface a given edit control. | |
| this (WindowBase parent, int id, string text, Rect position) | |
| Constructs an edit box to be created at runtime. | |
| this (FrameWindow parent, int id, string text) | |
| Constructs an edit box to be used as the client pane of a FrameWindow. | |
| bool | undo () |
| Undoes the last edit in this edit box. | |
| void | getSelection (out uint begin, out uint end) |
| Gets the range of the current selection. | |
| void | setSelection (uint begin, uint end) |
| Sets the range of the current selection. | |
| void | selectAll () |
| Selects the entire text of the edit control. | |
| void | scrollToCaret () |
| Ensures that the caret is in view. | |
| void | insertText (cstring t, bool allowUndo=true) |
| Inserts text in the edit control at the current cursor position. | |
Properties | |
| override string | text () |
| The text currently in this edit box. | |
| override string | text (string t) |
| The text currently in this edit box. | |
| bool | canUndo () |
| Whether an edit can be undone. | |
| bool | canUndo (bool c) |
| Whether an edit can be undone. | |
| bool | softLineBreaks () |
| Whether soft line breaks will be stored in the text property, as the sequence "\r\r\n". | |
| bool | softLineBreaks (bool s) |
| Whether soft line breaks will be stored in the text property, as the sequence "\r\r\n". | |
| uint | scrollPosition () |
| The position to which the edit control is scrolled. | |
| uint | scrollPosition (uint pos) |
| The position to which the edit control is scrolled. | |
| uint | lines () |
| The number of lines of text present in a multi-line edit box. | |
| uint | maxLength (uint len) |
| The maximum number of characters that may be entered in this edit box. | |
| uint | maxLength () |
| The maximum number of characters that may be entered in this edit box. | |
| bool | modified () |
| A flag automatically set to true when the edit box's contents are changed. | |
| bool | modified (bool m) |
| A flag automatically set to true when the edit box's contents are changed. | |
| char | passwordChar () |
| The character by which text will be masked, as to conceal a password being entered. | |
| char | passwordChar (char c) |
| The character by which text will be masked, as to conceal a password being entered. | |
| bool | readOnly () |
| Whether this control is read-only. | |
| bool | readOnly (bool r) |
| Whether this control is read-only. | |
| bool | hasSelection () |
| Whether text is selected in this edit box. | |
| string | selectedText () |
| Gets the selected text. | |
| uint[] | tabStops (uint[] t) |
| The tab stops to use in this edit box. | |
| uint[] | tabStops (uint t) |
| The tab spacing to use in this edit box. | |
| uint[] | tabStops () |
| The tab stops to use in this edit box. | |
Public Attributes | |
| mixin | EditOperations |
| smjg.libs.sdwf.control.EditBox.this | ( | Dialog | parent, | |
| int | id | |||
| ) |
Constructs an EditBox object to interface a given edit control.
Reimplemented from smjg.libs.sdwf.control.Control.
| smjg.libs.sdwf.control.EditBox.this | ( | WindowBase | parent, | |
| int | id, | |||
| string | text, | |||
| Rect | position | |||
| ) |
Constructs an edit box to be created at runtime.
| parent | the window or dialog on which the edit box will be placed. | |
| id | numeric ID that the edit box will have. | |
| text | the edit box's caption text. | |
| position | the position on the parent window where the edit box will be placed. |
| smjg.libs.sdwf.control.EditBox.this | ( | FrameWindow | parent, | |
| int | id, | |||
| string | text | |||
| ) |
Constructs an edit box to be used as the client pane of a FrameWindow.
| parent | the frame window in which this edit box will be framed. | |
| id | numeric ID that the edit box will have. | |
| text | the edit box's initial text. |
| override string smjg.libs.sdwf.control.EditBox.text | ( | ) |
| override string smjg.libs.sdwf.control.EditBox.text | ( | string | t | ) |
The text currently in this edit box.
| ControlException | if the text is too long for an edit box. |
Reimplemented from smjg.libs.sdwf.windowbase.WindowBase.
| bool smjg.libs.sdwf.control.EditBox.canUndo | ( | ) |
Whether an edit can be undone.
| bool smjg.libs.sdwf.control.EditBox.canUndo | ( | bool | c | ) |
Whether an edit can be undone.
Only setting to false has an effect, clearing the edit box's undo buffer.
| bool smjg.libs.sdwf.control.EditBox.softLineBreaks | ( | ) |
Whether soft line breaks will be stored in the text property, as the sequence "\r\r\n".
| bool smjg.libs.sdwf.control.EditBox.softLineBreaks | ( | bool | s | ) |
Whether soft line breaks will be stored in the text property, as the sequence "\r\r\n".
| uint smjg.libs.sdwf.control.EditBox.scrollPosition | ( | ) |
The position to which the edit control is scrolled.
| uint smjg.libs.sdwf.control.EditBox.scrollPosition | ( | uint | pos | ) |
The position to which the edit control is scrolled.
| pos | for a multi-line edit box, the zero-based index of the uppermost visible line. |
| uint smjg.libs.sdwf.control.EditBox.lines | ( | ) |
The number of lines of text present in a multi-line edit box.
| 1 | if the box is empty |
| uint smjg.libs.sdwf.control.EditBox.maxLength | ( | uint | len | ) |
The maximum number of characters that may be entered in this edit box.
| uint smjg.libs.sdwf.control.EditBox.maxLength | ( | ) |
The maximum number of characters that may be entered in this edit box.
| bool smjg.libs.sdwf.control.EditBox.modified | ( | ) |
A flag automatically set to true when the edit box's contents are changed.
| bool smjg.libs.sdwf.control.EditBox.modified | ( | bool | m | ) |
A flag automatically set to true when the edit box's contents are changed.
| char smjg.libs.sdwf.control.EditBox.passwordChar | ( | ) |
The character by which text will be masked, as to conceal a password being entered.
A value of '' signifies that no masking takes place.
| char smjg.libs.sdwf.control.EditBox.passwordChar | ( | char | c | ) |
The character by which text will be masked, as to conceal a password being entered.
A value of '' signifies that no masking takes place.
| bool smjg.libs.sdwf.control.EditBox.readOnly | ( | ) |
| bool smjg.libs.sdwf.control.EditBox.readOnly | ( | bool | r | ) |
| bool smjg.libs.sdwf.control.EditBox.hasSelection | ( | ) |
Whether text is selected in this edit box.
| string smjg.libs.sdwf.control.EditBox.selectedText | ( | ) |
Gets the selected text.
null if no text is selected.| uint [] smjg.libs.sdwf.control.EditBox.tabStops | ( | uint[] | t | ) |
The tab stops to use in this edit box.
| t | array of tab stop positions, in dialog resource units. |
| uint [] smjg.libs.sdwf.control.EditBox.tabStops | ( | uint | t | ) |
The tab spacing to use in this edit box.
| t | the tab interval, in dialog resource units. |
| uint [] smjg.libs.sdwf.control.EditBox.tabStops | ( | ) |
The tab stops to use in this edit box.
| bool smjg.libs.sdwf.control.EditBox.undo | ( | ) |
Undoes the last edit in this edit box.
| true | there turned out to be something to undo, or this is a single-line edit box. (This is due to an eccentricity in the Windows API.) | |
| false | in a multi-line edit box, there was nothing to undo. |
| void smjg.libs.sdwf.control.EditBox.getSelection | ( | out uint | begin, | |
| out uint | end | |||
| ) |
Gets the range of the current selection.
| begin | variable to receive the beginning character position. | |
| end | variable to receive the ending character position. |
begin is just inside the selection, and that indexed by end is just outside. If begin == end, then nothing is selected, and the value is the current cursor position. begin <= end will always hold regardless of the direction in which the selection was made.| void smjg.libs.sdwf.control.EditBox.setSelection | ( | uint | begin, | |
| uint | end | |||
| ) |
Sets the range of the current selection.
| begin | the beginning character position. | |
| end | the ending character position, or uint.max to select to the end. |
begin is just inside the selection, and that indexed by end is just outside. If begin == end, then nothing is selected, and the value becomes the current cursor position.| void smjg.libs.sdwf.control.EditBox.selectAll | ( | ) |
| void smjg.libs.sdwf.control.EditBox.scrollToCaret | ( | ) |
| void smjg.libs.sdwf.control.EditBox.insertText | ( | cstring | t, | |
| bool | allowUndo = true | |||
| ) |
Inserts text in the edit control at the current cursor position.
If text is selected, it will be replaced.
1.5.4