#include <inputwidget.h>
Public Member Functions | |
void | clearText () |
int | focus () throw (UIException) |
secstring | getText () const |
InputWidget (int sx, int sy, int w, int ml=512) throw (UIException) | |
bool | isTextChanged () const |
virtual void | refresh () throw (UIException) |
void | resize (int sx, int sy, int w) throw (UIException) |
void | setText (secstring t) throw (UIException) |
virtual | ~InputWidget () |
Protected Member Functions | |
void | createWindow (int sx, int sy, int w) throw (UIException) |
const secstring & | getBuffer () const |
secstring & | getBuffer () |
int | getPos () const |
int | getStartPos () const |
int | getWidth () const |
WINDOW * | getWindow () |
const WINDOW * | getWindow () const |
void | visibleCursor (bool v) const |
Private Member Functions | |
InputWidget (const InputWidget &) | |
void | moveBackward () throw (UIException) |
void | moveEnd () throw (UIException) |
void | moveForward () throw (UIException) |
void | moveHome () throw (UIException) |
const InputWidget & | operator= (const InputWidget &) |
void | processBackspace () throw (UIException) |
void | processDelete () throw (UIException) |
void | processInput (int ch) throw (UIException) |
Private Attributes | |
secstring | buffer |
int | max_length |
int | pos |
int | start_pos |
bool | text_changed |
int | width |
WINDOW * | window |
getText()
.
The text is stored in a secstring
.
To activate the widget, call focus()
.
Definition at line 60 of file inputwidget.h.
YAPETUI::InputWidget::InputWidget | ( | const InputWidget & | ) | [inline, private] |
Definition at line 71 of file inputwidget.h.
InputWidget::InputWidget | ( | int | sx, | |
int | sy, | |||
int | w, | |||
int | ml = 512 | |||
) | throw (UIException) |
Definition at line 149 of file inputwidget.cc.
InputWidget::~InputWidget | ( | ) | [virtual] |
void InputWidget::clearText | ( | ) |
Definition at line 291 of file inputwidget.cc.
References buffer, and window.
Referenced by PasswordDialog::resize(), PasswordDialog::run(), and ~InputWidget().
void InputWidget::createWindow | ( | int | sx, | |
int | sy, | |||
int | w | |||
) | throw (UIException) [protected] |
Definition at line 118 of file inputwidget.cc.
References YAPETUI::INPUTWIDGET_NOFOCUS, and YAPETUI::Colors::setcolor().
int InputWidget::focus | ( | ) | throw (UIException) |
Definition at line 166 of file inputwidget.cc.
References YAPETUI::INPUTWIDGET_FOCUS, YAPETUI::INPUTWIDGET_NOFOCUS, KEY_REFRESH, moveBackward(), moveEnd(), moveForward(), moveHome(), pos, processBackspace(), processDelete(), processInput(), YAPETUI::BaseWindow::refreshAll(), YAPETUI::Colors::setcolor(), visibleCursor(), and window.
Referenced by SearchDialog::run(), PasswordRecord::run(), PasswordDialog::run(), and FileOpen::run().
const secstring& YAPETUI::InputWidget::getBuffer | ( | ) | const [inline, protected] |
secstring& YAPETUI::InputWidget::getBuffer | ( | ) | [inline, protected] |
int YAPETUI::InputWidget::getPos | ( | ) | const [inline, protected] |
Definition at line 88 of file inputwidget.h.
References pos.
Referenced by YAPETUI::PasswordWidget::refresh().
int YAPETUI::InputWidget::getStartPos | ( | ) | const [inline, protected] |
secstring YAPETUI::InputWidget::getText | ( | ) | const [inline] |
Definition at line 102 of file inputwidget.h.
References buffer.
Referenced by SearchDialog::getSearchTerm(), PasswordRecord::run(), PasswordDialog::run(), and FileOpen::run().
int YAPETUI::InputWidget::getWidth | ( | ) | const [inline, protected] |
Definition at line 89 of file inputwidget.h.
References width.
Referenced by YAPETUI::PasswordWidget::refresh().
WINDOW* YAPETUI::InputWidget::getWindow | ( | ) | [inline, protected] |
const WINDOW* YAPETUI::InputWidget::getWindow | ( | ) | const [inline, protected] |
Definition at line 85 of file inputwidget.h.
References window.
Referenced by YAPETUI::PasswordWidget::refresh().
bool YAPETUI::InputWidget::isTextChanged | ( | ) | const [inline] |
Definition at line 104 of file inputwidget.h.
References text_changed.
Referenced by PasswordRecord::entryChanged().
void InputWidget::moveBackward | ( | ) | throw (UIException) [private] |
Definition at line 28 of file inputwidget.cc.
References pos, refresh(), and start_pos.
Referenced by focus(), and processBackspace().
void InputWidget::moveEnd | ( | ) | throw (UIException) [private] |
void InputWidget::moveForward | ( | ) | throw (UIException) [private] |
void InputWidget::moveHome | ( | ) | throw (UIException) [private] |
const InputWidget& YAPETUI::InputWidget::operator= | ( | const InputWidget & | ) | [inline, private] |
Definition at line 72 of file inputwidget.h.
void InputWidget::processBackspace | ( | ) | throw (UIException) [private] |
Definition at line 92 of file inputwidget.cc.
References moveBackward(), pos, processDelete(), and start_pos.
Referenced by focus().
void InputWidget::processDelete | ( | ) | throw (UIException) [private] |
Definition at line 100 of file inputwidget.cc.
References buffer, pos, refresh(), start_pos, and text_changed.
Referenced by focus(), and processBackspace().
void InputWidget::processInput | ( | int | ch | ) | throw (UIException) [private] |
void InputWidget::refresh | ( | ) | throw (UIException) [virtual] |
Reimplemented in YAPETUI::PasswordWidget.
Definition at line 232 of file inputwidget.cc.
References buffer, pos, start_pos, width, and window.
Referenced by moveBackward(), moveEnd(), moveForward(), moveHome(), processDelete(), SearchDialog::refresh(), PasswordRecord::refresh(), and FileOpen::refresh().
void InputWidget::resize | ( | int | sx, | |
int | sy, | |||
int | w | |||
) | throw (UIException) |
Definition at line 263 of file inputwidget.cc.
void InputWidget::setText | ( | secstring | t | ) | throw (UIException) |
Definition at line 281 of file inputwidget.cc.
References refresh().
Referenced by PasswordRecord::refresh(), PasswordDialog::run(), and FileOpen::run().
void InputWidget::visibleCursor | ( | bool | v | ) | const [protected] |
secstring YAPETUI::InputWidget::buffer [private] |
Definition at line 63 of file inputwidget.h.
Referenced by clearText(), getBuffer(), getText(), moveEnd(), moveForward(), processDelete(), and refresh().
int YAPETUI::InputWidget::max_length [private] |
Definition at line 65 of file inputwidget.h.
int YAPETUI::InputWidget::pos [private] |
Definition at line 67 of file inputwidget.h.
Referenced by focus(), getPos(), moveBackward(), moveEnd(), moveForward(), moveHome(), processBackspace(), processDelete(), and refresh().
int YAPETUI::InputWidget::start_pos [private] |
Definition at line 66 of file inputwidget.h.
Referenced by getStartPos(), moveBackward(), moveEnd(), moveForward(), moveHome(), processBackspace(), processDelete(), and refresh().
bool YAPETUI::InputWidget::text_changed [private] |
int YAPETUI::InputWidget::width [private] |
Definition at line 68 of file inputwidget.h.
Referenced by getWidth(), moveEnd(), moveForward(), and refresh().
WINDOW* YAPETUI::InputWidget::window [private] |
Definition at line 62 of file inputwidget.h.
Referenced by clearText(), focus(), getWindow(), refresh(), and ~InputWidget().