Planeshift
|
An edit box widget/. More...
#include <pawstextbox.h>
Classes | |
struct | Word |
struct to contain the end boundry of a word and it's spellcheck status More... | |
Public Member Functions | |
void | Clear () |
virtual void | Draw () |
Draws the widget and all of it's children. | |
virtual int | GetBorderStyle () |
This returns the BORDER_BUMP style. | |
virtual bool | GetFocusOverridesControls () const |
Test if the widget should intercept all key presses. | |
unsigned int | GetMaxLength () const |
Returns the max length for the text box. | |
unsigned int | GetRemainingChars () const |
Gets the remaining characters that can be input. | |
bool | getSpellChecked () const |
returns if the spellchecker is used in this widget | |
const char * | GetText () |
unsigned int | GetTopLine () |
Set & Get top line funcs. | |
unsigned int | getTypoColour () |
Method the get the current colour used for typos. | |
virtual bool | OnClipboard (const csString &content) |
Called as a callback to a request for clipboard content if avaliabe. | |
bool | OnKeyDown (utf32_char code, utf32_char key, int modifiers) |
Process keydown messages. | |
virtual bool | OnMouseDown (int button, int modifiers, int x, int y) |
Manage mouse down event to test for and apply window changes. | |
virtual void | OnUpdateData (const char *dataname, PAWSData &data) |
pawsEditTextBox () | |
pawsEditTextBox (const pawsEditTextBox &origin) | |
bool | SelfPopulate (iDocumentNode *node) |
This function allows a widget to fill in its own contents from an xml node supplied. | |
void | SetCursorPosition (size_t pos) |
void | SetMaxLength (unsigned int maxlen) |
Sets the max length for the text box. | |
void | SetMultiline (bool multi) |
void | SetPassword (bool pass) |
void | SetSizeByText () |
Sets size of the widget to fit the text that it displays. | |
void | setSpellChecked (const bool check) |
set if the spellchecker should be used | |
void | SetText (const char *text, bool publish=true) |
Change the text in the edit box. | |
void | SetTopLine (unsigned int newTopLine) |
void | setTypoColour (unsigned int col) |
Method to set the colour used for typos. | |
bool | Setup (iDocumentNode *node) |
Setup this widget. | |
void | toggleSpellChecked () |
toggels the current setting of the spellchecker | |
virtual | ~pawsEditTextBox () |
Protected Member Functions | |
void | checkSpelling () |
Helper method that does the actual spellchecking. | |
Protected Attributes | |
bool | blink |
The current blink status. | |
csTicks | blinkTicks |
Keep track of ticks for flashing. | |
csRef< iVirtualClock > | clock |
unsigned int | cursorLine |
size_t | cursorPosition |
The position of the cursor blink (in code units not points) | |
int | lineHeight |
unsigned int | maxLen |
The maximum length the text is allowed to be. | |
size_t | maxLines |
bool | multiLine |
bool | password |
bool | spellChecked |
Should the text be checked by the spellchecker plugin (if available) | |
csRef< iSpellChecker > | spellChecker |
PS spellChecker plugin. | |
int | start |
Position of first character that we display. | |
csString | text |
Current input line. | |
unsigned int | topLine |
unsigned int | typoColour |
Colour used for typos. | |
size_t | usedLines |
pawsScrollBar * | vScrollBar |
csArray< Word > | words |
Array that contains the boundries of the words and if the spellchecker recognizes them or not. |
An edit box widget/.
Definition at line 409 of file pawstextbox.h.
pawsEditTextBox::pawsEditTextBox | ( | ) |
virtual pawsEditTextBox::~pawsEditTextBox | ( | ) | [virtual] |
pawsEditTextBox::pawsEditTextBox | ( | const pawsEditTextBox & | origin | ) |
void pawsEditTextBox::checkSpelling | ( | ) | [protected] |
Helper method that does the actual spellchecking.
Called from OnKeyDown
void pawsEditTextBox::Clear | ( | ) |
virtual void pawsEditTextBox::Draw | ( | ) | [virtual] |
Draws the widget and all of it's children.
Reimplemented from pawsWidget.
virtual int pawsEditTextBox::GetBorderStyle | ( | ) | [inline, virtual] |
This returns the BORDER_BUMP style.
Reimplemented from pawsWidget.
Definition at line 456 of file pawstextbox.h.
virtual bool pawsEditTextBox::GetFocusOverridesControls | ( | ) | const [inline, virtual] |
Test if the widget should intercept all key presses.
Reimplemented from pawsWidget.
Definition at line 485 of file pawstextbox.h.
Returns the max length for the text box.
Definition at line 499 of file pawstextbox.h.
Gets the remaining characters that can be input.
Definition at line 507 of file pawstextbox.h.
bool pawsEditTextBox::getSpellChecked | ( | ) | const [inline] |
returns if the spellchecker is used in this widget
Definition at line 516 of file pawstextbox.h.
const char* pawsEditTextBox::GetText | ( | ) | [inline] |
Definition at line 422 of file pawstextbox.h.
Set & Get top line funcs.
Definition at line 471 of file pawstextbox.h.
Method the get the current colour used for typos.
Definition at line 537 of file pawstextbox.h.
virtual bool pawsEditTextBox::OnClipboard | ( | const csString & | content | ) | [virtual] |
Called as a callback to a request for clipboard content if avaliabe.
Reimplemented from pawsWidget.
bool pawsEditTextBox::OnKeyDown | ( | utf32_char | keyCode, |
utf32_char | keyChar, | ||
int | modifiers | ||
) | [virtual] |
Process keydown messages.
keyCode | The code for the pressed key. |
keyChar | The key pressed. |
modifiers | Used to modify tab behavior. |
Reimplemented from pawsWidget.
Manage mouse down event to test for and apply window changes.
button | Type of button: 1 resizable or movable, 2 context menu or config window. |
modifiers | Used with PAWS_CONSTRUCTION. |
x | Used to test for resize. |
y | Used to test for resize. |
Reimplemented from pawsWidget.
virtual void pawsEditTextBox::OnUpdateData | ( | const char * | dataname, |
PAWSData & | data | ||
) | [virtual] |
Reimplemented from pawsWidget.
bool pawsEditTextBox::SelfPopulate | ( | iDocumentNode * | node | ) | [virtual] |
This function allows a widget to fill in its own contents from an xml node supplied.
This is NOT the same as Setup, which is defining height, width, styles, etc. This is data.
Reimplemented from pawsWidget.
void pawsEditTextBox::SetCursorPosition | ( | size_t | pos | ) | [inline] |
Definition at line 480 of file pawstextbox.h.
Sets the max length for the text box.
maxlen | The value to set for the max length |
void pawsEditTextBox::SetMultiline | ( | bool | multi | ) |
void pawsEditTextBox::SetPassword | ( | bool | pass | ) |
void pawsEditTextBox::SetSizeByText | ( | ) |
Sets size of the widget to fit the text that it displays.
void pawsEditTextBox::setSpellChecked | ( | const bool | check | ) | [inline] |
set if the spellchecker should be used
check | true if the spellchecker should be used (the spellchecker will still be only used if the plugin is available) |
Definition at line 524 of file pawstextbox.h.
void pawsEditTextBox::SetText | ( | const char * | text, |
bool | publish = true |
||
) |
Change the text in the edit box.
text | The text that will replace whatever is currently there. |
publish | Publish the text. |
Definition at line 475 of file pawstextbox.h.
Method to set the colour used for typos.
col | The new colour to be used for typos |
Definition at line 544 of file pawstextbox.h.
bool pawsEditTextBox::Setup | ( | iDocumentNode * | ) | [virtual] |
Setup this widget.
Reimplemented from pawsWidget.
void pawsEditTextBox::toggleSpellChecked | ( | ) | [inline] |
toggels the current setting of the spellchecker
Definition at line 531 of file pawstextbox.h.
bool pawsEditTextBox::blink [protected] |
The current blink status.
Definition at line 571 of file pawstextbox.h.
csTicks pawsEditTextBox::blinkTicks [protected] |
Keep track of ticks for flashing.
Definition at line 574 of file pawstextbox.h.
csRef<iVirtualClock> pawsEditTextBox::clock [protected] |
Definition at line 561 of file pawstextbox.h.
unsigned int pawsEditTextBox::cursorLine [protected] |
Definition at line 568 of file pawstextbox.h.
size_t pawsEditTextBox::cursorPosition [protected] |
The position of the cursor blink (in code units not points)
Definition at line 567 of file pawstextbox.h.
int pawsEditTextBox::lineHeight [protected] |
Definition at line 581 of file pawstextbox.h.
unsigned int pawsEditTextBox::maxLen [protected] |
The maximum length the text is allowed to be.
Definition at line 589 of file pawstextbox.h.
size_t pawsEditTextBox::maxLines [protected] |
Definition at line 582 of file pawstextbox.h.
bool pawsEditTextBox::multiLine [protected] |
Definition at line 579 of file pawstextbox.h.
bool pawsEditTextBox::password [protected] |
Definition at line 560 of file pawstextbox.h.
bool pawsEditTextBox::spellChecked [protected] |
Should the text be checked by the spellchecker plugin (if available)
Definition at line 597 of file pawstextbox.h.
csRef<iSpellChecker> pawsEditTextBox::spellChecker [protected] |
PS spellChecker plugin.
Definition at line 594 of file pawstextbox.h.
int pawsEditTextBox::start [protected] |
Position of first character that we display.
Definition at line 564 of file pawstextbox.h.
csString pawsEditTextBox::text [protected] |
Current input line.
Definition at line 577 of file pawstextbox.h.
unsigned int pawsEditTextBox::topLine [protected] |
Definition at line 587 of file pawstextbox.h.
unsigned int pawsEditTextBox::typoColour [protected] |
Colour used for typos.
Definition at line 600 of file pawstextbox.h.
size_t pawsEditTextBox::usedLines [protected] |
Definition at line 585 of file pawstextbox.h.
pawsScrollBar* pawsEditTextBox::vScrollBar [protected] |
Definition at line 591 of file pawstextbox.h.
csArray<Word> pawsEditTextBox::words [protected] |
Array that contains the boundries of the words and if the spellchecker recognizes them or not.
Definition at line 603 of file pawstextbox.h.