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
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 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 61 of file inputwidget.h.


Constructor & Destructor Documentation

YAPETUI::InputWidget::InputWidget ( const InputWidget  )  [inline, private]

Definition at line 72 of file inputwidget.h.

InputWidget::InputWidget ( int  sx,
int  sy,
int  w,
int  ml = 512 
) throw (UIException)

Definition at line 150 of file inputwidget.cc.

InputWidget::~InputWidget (  )  [virtual]

Definition at line 160 of file inputwidget.cc.

References clearText(), and window.


Member Function Documentation

void InputWidget::clearText (  ) 

Definition at line 292 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 119 of file inputwidget.cc.

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

int InputWidget::focus (  )  throw (UIException)

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

Definition at line 92 of file inputwidget.h.

References buffer.

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

Definition at line 91 of file inputwidget.h.

References buffer.

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

Definition at line 89 of file inputwidget.h.

References pos.

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

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

Definition at line 88 of file inputwidget.h.

References start_pos.

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

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

Definition at line 90 of file inputwidget.h.

References width.

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

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

Definition at line 87 of file inputwidget.h.

References window.

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

Definition at line 86 of file inputwidget.h.

References window.

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

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

Definition at line 105 of file inputwidget.h.

References text_changed.

Referenced by PasswordRecord::entryChanged().

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

Definition at line 29 of file inputwidget.cc.

References pos, refresh(), and start_pos.

Referenced by focus(), and processBackspace().

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

Definition at line 65 of file inputwidget.cc.

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

Referenced by focus().

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

Definition at line 43 of file inputwidget.cc.

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

Referenced by focus().

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

Definition at line 58 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 73 of file inputwidget.h.

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

Definition at line 93 of file inputwidget.cc.

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

Referenced by focus().

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

Definition at line 101 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 78 of file inputwidget.cc.

Referenced by focus().

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

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

Definition at line 264 of file inputwidget.cc.

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

Definition at line 282 of file inputwidget.cc.

References refresh().

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

void InputWidget::visibleCursor ( bool  v  )  const [protected]

Definition at line 141 of file inputwidget.cc.

Referenced by focus().


Member Data Documentation

Definition at line 64 of file inputwidget.h.

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

Definition at line 66 of file inputwidget.h.

Definition at line 70 of file inputwidget.h.

Referenced by isTextChanged(), and processDelete().

Definition at line 69 of file inputwidget.h.

Referenced by getWidth(), moveEnd(), moveForward(), and refresh().

WINDOW* YAPETUI::InputWidget::window [private]

Definition at line 63 of file inputwidget.h.

Referenced by clearText(), focus(), getWindow(), refresh(), and ~InputWidget().


The documentation for this class was generated from the following files:

Generated on Thu Jun 11 19:13:08 2009 for YAPET by  doxygen 1.5.8