YAPETUI::InputWidget Class Reference

A widget where text can be entered. More...

#include <inputwidget.h>

Inheritance diagram for YAPETUI::InputWidget:

YAPETUI::PasswordWidget

List of all members.

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 secstringgetBuffer () const
secstringgetBuffer ()
int getPos () const
int getStartPos () const
int getWidth () const
WINDOW * getWindow ()
const WINDOW * getWindow () const

Private Member Functions

 InputWidget (const InputWidget &)
void moveBackward () throw (UIException)
void moveEnd () throw (UIException)
void moveForward () throw (UIException)
void moveHome () throw (UIException)
const InputWidgetoperator= (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


Detailed Description

A single line widget where text can be entered. The text entered can be obtained by calling getText().

The text is stored in a secstring.

To activate the widget, call focus().

See also:
secstring

Definition at line 60 of file inputwidget.h.


Constructor & Destructor Documentation

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 138 of file inputwidget.cc.

References createWindow().

InputWidget::~InputWidget (  )  [virtual]

Definition at line 148 of file inputwidget.cc.

References clearText(), and window.


Member Function Documentation

void InputWidget::clearText (  ) 

Definition at line 281 of file inputwidget.cc.

References buffer, and window.

Referenced by PasswordDialog::resize(), PasswordDialog::run(), setText(), and ~InputWidget().

void InputWidget::createWindow ( int  sx,
int  sy,
int  w 
) throw (UIException) [protected]

Definition at line 117 of file inputwidget.cc.

References YAPETUI::INPUTWIDGET_NOFOCUS, YAPETUI::Colors::setcolor(), and window.

Referenced by InputWidget(), and resize().

int InputWidget::focus (  )  throw (UIException)

Definition at line 155 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(), and window.

Referenced by PasswordRecord::run(), PasswordDialog::run(), and FileOpen::run().

const secstring& YAPETUI::InputWidget::getBuffer (  )  const [inline, protected]

Definition at line 90 of file inputwidget.h.

References buffer.

secstring& YAPETUI::InputWidget::getBuffer (  )  [inline, protected]

Definition at line 89 of file inputwidget.h.

References buffer.

int YAPETUI::InputWidget::getPos (  )  const [inline, protected]

Definition at line 87 of file inputwidget.h.

References pos.

Referenced by YAPETUI::PasswordWidget::refresh().

int YAPETUI::InputWidget::getStartPos (  )  const [inline, protected]

Definition at line 86 of file inputwidget.h.

References start_pos.

secstring YAPETUI::InputWidget::getText (  )  const [inline]

Definition at line 100 of file inputwidget.h.

References buffer.

Referenced by PasswordRecord::run(), PasswordDialog::run(), and FileOpen::run().

int YAPETUI::InputWidget::getWidth (  )  const [inline, protected]

Definition at line 88 of file inputwidget.h.

References width.

Referenced by YAPETUI::PasswordWidget::refresh().

WINDOW* YAPETUI::InputWidget::getWindow (  )  [inline, protected]

Definition at line 85 of file inputwidget.h.

References window.

const WINDOW* YAPETUI::InputWidget::getWindow (  )  const [inline, protected]

Definition at line 84 of file inputwidget.h.

References window.

Referenced by YAPETUI::PasswordWidget::refresh().

bool YAPETUI::InputWidget::isTextChanged (  )  const [inline]

Definition at line 102 of file inputwidget.h.

References text_changed.

Referenced by PasswordRecord::entryChanged().

void InputWidget::moveBackward (  )  throw (UIException) [private]

Definition at line 27 of file inputwidget.cc.

References pos, refresh(), and start_pos.

Referenced by focus(), and processBackspace().

void InputWidget::moveEnd (  )  throw (UIException) [private]

Definition at line 63 of file inputwidget.cc.

References buffer, pos, refresh(), start_pos, and width.

Referenced by focus().

void InputWidget::moveForward (  )  throw (UIException) [private]

Definition at line 41 of file inputwidget.cc.

References buffer, pos, refresh(), start_pos, and width.

Referenced by focus(), and processInput().

void InputWidget::moveHome (  )  throw (UIException) [private]

Definition at line 56 of file inputwidget.cc.

References pos, refresh(), and start_pos.

Referenced by focus().

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 91 of file inputwidget.cc.

References moveBackward(), pos, processDelete(), and start_pos.

Referenced by focus().

void InputWidget::processDelete (  )  throw (UIException) [private]

Definition at line 99 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]

Definition at line 76 of file inputwidget.cc.

References buffer, max_length, moveForward(), pos, start_pos, and text_changed.

Referenced by focus().

void InputWidget::refresh (  )  throw (UIException) [virtual]

Reimplemented in YAPETUI::PasswordWidget.

Definition at line 222 of file inputwidget.cc.

References buffer, pos, start_pos, width, and window.

Referenced by moveBackward(), moveEnd(), moveForward(), moveHome(), processDelete(), PasswordRecord::refresh(), FileOpen::refresh(), and setText().

void InputWidget::resize ( int  sx,
int  sy,
int  w 
) throw (UIException)

Definition at line 253 of file inputwidget.cc.

References createWindow(), and window.

void InputWidget::setText ( secstring  t  )  throw (UIException)

Definition at line 271 of file inputwidget.cc.

References buffer, clearText(), pos, refresh(), start_pos, and text_changed.

Referenced by PasswordRecord::refresh(), PasswordDialog::run(), and FileOpen::run().


Member Data Documentation

secstring YAPETUI::InputWidget::buffer [private]

Definition at line 63 of file inputwidget.h.

Referenced by clearText(), getBuffer(), getText(), moveEnd(), moveForward(), processDelete(), processInput(), refresh(), and setText().

int YAPETUI::InputWidget::max_length [private]

Definition at line 65 of file inputwidget.h.

Referenced by processInput().

int YAPETUI::InputWidget::pos [private]

Definition at line 67 of file inputwidget.h.

Referenced by focus(), getPos(), moveBackward(), moveEnd(), moveForward(), moveHome(), processBackspace(), processDelete(), processInput(), refresh(), and setText().

int YAPETUI::InputWidget::start_pos [private]

Definition at line 66 of file inputwidget.h.

Referenced by getStartPos(), moveBackward(), moveEnd(), moveForward(), moveHome(), processBackspace(), processDelete(), processInput(), refresh(), and setText().

bool YAPETUI::InputWidget::text_changed [private]

Definition at line 69 of file inputwidget.h.

Referenced by isTextChanged(), processDelete(), processInput(), and setText().

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(), createWindow(), focus(), getWindow(), refresh(), resize(), and ~InputWidget().


The documentation for this class was generated from the following files:
Generated on Wed Feb 27 16:15:42 2008 for YAPET by  doxygen 1.5.4