#include <pglineedit.h>
Inheritance diagram for PG_LineEdit:

Public Member Functions | |
| PG_LineEdit (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, const std::string &style="LineEdit", int maximumLength=1000000) | |
| ~PG_LineEdit () | |
| void | LoadThemeStyle (const std::string &widgettype) |
| Load a specific themestyle. | |
| void | LoadThemeStyle (const std::string &widgettype, const std::string &objectname) |
| Load a style from the theme definition. | |
| void | EditBegin () |
| start edit | |
| void | EditEnd () |
| virtual void | SetCursorPos (int p) |
| int | GetCursorPos () |
| virtual void | SetText (const std::string &new_text) |
| Set the current text string. | |
| bool | IsCursorVisible () |
| void | SendChar (PG_Char c) |
| Send a char into the LineEdit widget. | |
| void | SendDel () |
| Send a 'del' keystroke into the LineEdit widget. | |
| void | SendBackspace () |
| Send a 'BKSPC' keystroke into the LineEdit widget. | |
| void | SetValidKeys (const std::string &keys) |
| Define a set of valid keys. | |
| void | SetEditable (bool edit) |
| Set if the widget is editable by the user. | |
| bool | GetEditable () |
| Check if the widget is editable by the user. | |
| void | SetPassHidden (const PG_Char &passchar) |
| Set password character (witch will be displayed in place of letter). | |
| char | GetPassHidden () |
| Return setted passchar. | |
| bool | Action (KeyAction action) |
Static Public Member Functions | |
| static void | SetBlinkingTime (int msec) |
| sets the blinking interval of the cursor Only PG_LineEdits created after setting this to a non-zero value will have a blinking cursor | |
Public Attributes | |
| SignalEditBegin | sigEditBegin |
| SignalEditEnd | sigEditEnd |
| SignalEditReturn | sigEditReturn |
| SignalEditUpdate | sigEditUpdate |
Protected Member Functions | |
| virtual void | InsertChar (const PG_Char &c) |
| virtual void | DeleteChar (Uint16 pos) |
| void | CopyText (bool del=false) |
| void | PasteText (Uint16 pos) |
| void | StartMark (Uint16 pos) |
| void | EndMark (Uint16 pos) |
| virtual bool | eventFilterKey (const SDL_KeyboardEvent *key) |
| virtual void | eventEditBegin (int id, PG_Widget *widget, unsigned long data, void *clientdata) |
| virtual void | eventEditEnd (int id, PG_Widget *widget, unsigned long data, void *clientdata) |
| void | eventBlit (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst) |
| overridable eventhandler to blit the widget contents to the screen | |
| bool | eventKeyDown (const SDL_KeyboardEvent *key) |
| Overridable Eventhandler for a SDL_KeyboardEvent message. | |
| bool | eventMouseButtonUp (const SDL_MouseButtonEvent *button) |
| Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
| void | eventInputFocusLost (PG_MessageObject *newfocus) |
| void | eventHide () |
| overridable eventhandler called whenever the widget gets hidden. | |
Protected Attributes | |
| int | my_cursorPosition |
| SDL_Surface * | my_srfTextCursor |
Classes | |
| class | SignalEditBegin |
| Signal type declaration. More... | |
| class | SignalEditEnd |
| class | SignalEditReturn |
| class | SignalEditUpdate |
Definition at line 52 of file pglineedit.h.
|
||||||||||||||||||||
|
Definition at line 33 of file pglineedit.cpp. References PG_Application::GetApp(), LoadThemeStyle(), my_cursorPosition, and my_srfTextCursor. |
|
|
Definition at line 53 of file pglineedit.cpp. |
|
|
Reimplemented from PG_Widget. Definition at line 575 of file pglineedit.cpp. References PG_Widget::ACT_CANCEL, PG_Widget::ACT_OK, PG_Widget::Action(), EditBegin(), and EditEnd(). |
|
|
Definition at line 446 of file pglineedit.cpp. References my_cursorPosition, PG_Widget::my_text, SetCursorPos(), and PG_Widget::Update(). Referenced by eventKeyDown(). |
|
|
Reimplemented in PG_MaskEdit, and PG_MultiLineEdit. Definition at line 429 of file pglineedit.cpp. References PG_Widget::my_text, and sigEditUpdate. Referenced by PG_MultiLineEdit::DeleteChar(), SendBackspace(), and SendDel(). |
|
|
start edit
Definition at line 163 of file pglineedit.cpp. References eventEditBegin(), PG_Widget::GetID(), PG_MessageObject::SetInputFocus(), sigEditBegin, and PG_Widget::Update(). Referenced by Action(), PG_MultiLineEdit::eventMouseButtonDown(), eventMouseButtonUp(), NonEditableLineEdit::NonEditableLineEdit(), GotoPosition::RunModal(), PasswordDialog::RunModal(), and FileFindDialog::RunModal(). |
|
|
Definition at line 172 of file pglineedit.cpp. References eventEditEnd(), PG_Widget::GetID(), my_cursorPosition, PG_MessageObject::ReleaseInputFocus(), sigEditEnd, and PG_Widget::Update(). Referenced by Action(), eventHide(), eventInputFocusLost(), eventKeyDown(), and SetEditable(). |
|
|
Definition at line 441 of file pglineedit.cpp. Referenced by eventKeyDown(). |
|
||||||||||||||||
|
overridable eventhandler to blit the widget contents to the screen
Reimplemented from PG_ThemeWidget. Reimplemented in PG_MultiLineEdit. Definition at line 55 of file pglineedit.cpp. References PG_ThemeWidget::eventBlit(). |
|
||||||||||||||||||||
|
Definition at line 489 of file pglineedit.cpp. Referenced by EditBegin(). |
|
||||||||||||||||||||
|
Definition at line 491 of file pglineedit.cpp. Referenced by EditEnd(). |
|
|
Reimplemented in NonEditableLineEdit. Definition at line 497 of file pglineedit.cpp. Referenced by eventKeyDown(). |
|
|
overridable eventhandler called whenever the widget gets hidden.
Reimplemented from PG_Widget. Definition at line 559 of file pglineedit.cpp. References EditEnd(). |
|
|
Reimplemented from PG_MessageObject. Definition at line 367 of file pglineedit.cpp. References EditEnd(). |
|
|
Overridable Eventhandler for a SDL_KeyboardEvent message. This handler is called when a key changed it's state from unpressed to pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. Reimplemented in NonEditableLineEdit, and PG_MultiLineEdit. Definition at line 183 of file pglineedit.cpp. References CopyText(), EditEnd(), EndMark(), eventFilterKey(), InsertChar(), my_cursorPosition, PG_Widget::my_text, PasteText(), PG_Char, SendBackspace(), SendDel(), SetCursorPos(), sigEditReturn, StartMark(), and PG_Application::TranslateNumpadKeys(). Referenced by PG_MultiLineEdit::eventKeyDown(). |
|
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is released. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. Reimplemented in PG_MultiLineEdit. Definition at line 398 of file pglineedit.cpp. References EditBegin(), and SetCursorPos(). |
|
|
Definition at line 394 of file pglineedit.cpp. References my_cursorPosition. Referenced by PG_MultiLineEdit::eventKeyDown(). |
|
|
Check if the widget is editable by the user.
Definition at line 571 of file pglineedit.cpp. Referenced by PG_MultiLineEdit::eventMouseButtonDown(), and PG_DropDown::GetEditable(). |
|
|
Return setted passchar.
Definition at line 595 of file pglineedit.cpp. |
|
|
Reimplemented in PG_MaskEdit, and PG_MultiLineEdit. Definition at line 412 of file pglineedit.cpp. References my_cursorPosition, PG_Widget::my_text, SetCursorPos(), and sigEditUpdate. Referenced by eventKeyDown(), PG_MultiLineEdit::InsertText(), and SendChar(). |
|
|
Definition at line 493 of file pglineedit.cpp. Referenced by PG_MultiLineEdit::eventKeyDown(), and PG_MultiLineEdit::eventMouseButtonDown(). |
|
||||||||||||
|
Load a style from the theme definition.
Reimplemented from PG_ThemeWidget. Definition at line 512 of file pglineedit.cpp. References PG_Theme::FindString(), PG_Theme::FindSurface(), PG_Application::GetTheme(), my_srfTextCursor, and SetValidKeys(). |
|
|
Load a specific themestyle.
Reimplemented from PG_ThemeWidget. Definition at line 501 of file pglineedit.cpp. References PG_ThemeWidget::LoadThemeStyle(). Referenced by PG_DropDown::LoadThemeStyle(), and PG_LineEdit(). |
|
|
Definition at line 473 of file pglineedit.cpp. References my_cursorPosition, PG_Widget::my_text, and PG_Widget::Update(). Referenced by eventKeyDown(). |
|
|
Send a 'BKSPC' keystroke into the LineEdit widget.
Definition at line 537 of file pglineedit.cpp. References DeleteChar(), PG_Application::BulkModeActivator::disable(), my_cursorPosition, SetCursorPos(), and PG_Widget::Update(). Referenced by ItemSelectorWidget::eventKeyDown(), and eventKeyDown(). |
|
|
Send a char into the LineEdit widget.
Definition at line 524 of file pglineedit.cpp. References InsertChar(). Referenced by ItemSelectorWidget::eventKeyDown(). |
|
|
Send a 'del' keystroke into the LineEdit widget.
Definition at line 532 of file pglineedit.cpp. References DeleteChar(), my_cursorPosition, and SetCursorPos(). Referenced by eventKeyDown(). |
|
|
sets the blinking interval of the cursor Only PG_LineEdits created after setting this to a non-zero value will have a blinking cursor
Definition at line 602 of file pglineedit.cpp. Referenced by ASC_PG_App::ASC_PG_App(). |
|
|
Reimplemented in PG_MultiLineEdit. Definition at line 371 of file pglineedit.cpp. References my_cursorPosition, PG_Widget::my_text, and PG_Widget::Update(). Referenced by CopyText(), PG_MultiLineEdit::eventKeyDown(), eventKeyDown(), PG_MaskEdit::eventMouseButtonDown(), eventMouseButtonUp(), PG_MaskEdit::InsertChar(), InsertChar(), SendBackspace(), SendDel(), PG_MultiLineEdit::SetCursorPos(), and PG_MaskEdit::SetText(). |
|
|
Set if the widget is editable by the user.
Definition at line 565 of file pglineedit.cpp. References EditEnd(). Referenced by AdminGameWindow::AdminGameWindow(), ChooseTech::ChooseTech(), PlayerSetupWidget::PlayerSetupWidget(), ResourcePlacementDialog::ResourcePlacementDialog(), PG_DropDown::SetEditable(), SetLineEditAtts(), and PG_ToolTipHelp::ShowHelp(). |
|
|
Set password character (witch will be displayed in place of letter).
Definition at line 591 of file pglineedit.cpp. Referenced by PasswordDialog::PasswordDialog(), SetLineEditAtts(), PG_PropertyField_String< StringType >::SetPassHidden(), and StartMultiplayerGame::StartMultiplayerGame(). |
|
|
|
Define a set of valid keys.
Definition at line 547 of file pglineedit.cpp. Referenced by AddWeatherAreaDialog::AddWeatherAreaDialog(), AddWindChangeDialog::AddWindChangeDialog(), LoadThemeStyle(), PG_SpinnerBox::PG_SpinnerBox(), ResourcePlacementDialog::ResourcePlacementDialog(), and SetLineEditAtts(). |
|
|
Definition at line 435 of file pglineedit.cpp. Referenced by eventKeyDown(). |
|
|
Definition at line 208 of file pglineedit.h. Referenced by CopyText(), PG_MultiLineEdit::DeleteChar(), EditEnd(), PG_MultiLineEdit::eventKeyDown(), eventKeyDown(), PG_MultiLineEdit::eventMouseButtonDown(), PG_MaskEdit::eventMouseButtonDown(), GetCursorPos(), PG_MaskEdit::InsertChar(), InsertChar(), PG_MultiLineEdit::InsertText(), PasteText(), PG_LineEdit(), SendBackspace(), SendDel(), SetCursorPos(), and SetText(). |
|
|
Definition at line 210 of file pglineedit.h. Referenced by LoadThemeStyle(), and PG_LineEdit(). |
|
|
Definition at line 153 of file pglineedit.h. Referenced by EditBegin(), and PG_DropDown::PG_DropDown(). |
|
|
Definition at line 154 of file pglineedit.h. Referenced by AdminGameWindow::AdminGameWindow(), EditEnd(), FileFindDialog::FileFindDialog(), PG_DropDown::PG_DropDown(), and PG_SpinnerBox::PG_SpinnerBox(). |
|
|
Definition at line 155 of file pglineedit.h. Referenced by AdminGameWindow::AdminGameWindow(), eventKeyDown(), GotoPosition::GotoPosition(), PasswordDialog::PasswordDialog(), and PG_DropDown::PG_DropDown(). |
|
|
Definition at line 156 of file pglineedit.h. Referenced by DeleteChar(), and InsertChar(). |
1.4.2