Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ndk::edit Class Reference

Inheritance diagram for ndk::edit:

Inheritance graph
[legend]
Collaboration diagram for ndk::edit:

Collaboration graph
[legend]
List of all members.

Public Types

enum  echo_mode { normal, password, no_echo }

Public Member Functions

 edit (const std::string &str="", panel *parent=0, bool accept=true)
void resize (unsigned int size)
void set_text (const std::string &str)
void set_mode (echo_mode mode)
void set_max (unsigned int max)
void set_mask (mask *m)
virtual void draw ()

Protected Member Functions

event::result at_keyboard (const keyboard &ev)
virtual void change_color ()

Private Member Functions

event::result at_system (const event &ev)
bool scroll_right ()
bool scroll_left ()
bool recalibrate ()
void set_cursor ()
void insert (unsigned int pos, char sym)
void erase (unsigned int pos)

Private Attributes

unsigned int current_
unsigned int begin_
echo_mode mode_
unsigned int max_
maskmask_

Detailed Description

Line Edit widget. This widget don't made auto resize at draw() as Label or Button, so you need to set widget size itself using resize() This widgets inherits from button, 'cause we can insert this widget to the list, and we need activation/deactivation feature to show/hide cursor


Member Enumeration Documentation

enum ndk::edit::echo_mode
 

Enumeration values:
normal  display characters as they are entered
password  display asterisks instead of the characters actually entered
no_echo  do not display anything


Constructor & Destructor Documentation

edit::edit const std::string &  str = "",
panel parent = 0,
bool  accept = true
 


Member Function Documentation

event::result edit::at_keyboard const keyboard ev  )  [protected]
 

public, 'cause used by listbox

Reimplemented from ndk::mini_button.

event::result edit::at_system const event ev  )  [private]
 

system event processor

Reimplemented from ndk::button.

void edit::change_color  )  [protected, virtual]
 

void edit::draw  )  [virtual]
 

special draw method for edit

Reimplemented from ndk::label.

void edit::erase unsigned int  pos  )  [private]
 

erase/replace symbol at position

void edit::insert unsigned int  pos,
char  sym
[private]
 

insert/replace symbol at position

bool edit::recalibrate  )  [private]
 

recalibrate begin_ position

void edit::resize unsigned int  size  ) 
 

* helper to resize widget only in one direction

bool edit::scroll_left  )  [private]
 

scroll viewport to the left

bool edit::scroll_right  )  [private]
 

scroll viewport to the right

void edit::set_cursor  )  [private]
 

move cursor to current position

void edit::set_mask mask m  ) 
 

set(reset) edit mask

void edit::set_max unsigned int  max  ) 
 

set maximum possible size of the text

void edit::set_mode echo_mode  mode  ) 
 

set edit's text display mode

void edit::set_text const std::string &  str  ) 
 

set text, draw and reset current cursor position

Reimplemented from ndk::label.


Member Data Documentation

unsigned int ndk::edit::begin_ [private]
 

beginning of the string

unsigned int ndk::edit::current_ [private]
 

current cursor position under string

mask* ndk::edit::mask_ [private]
 

edit mask, if we have

unsigned int ndk::edit::max_ [private]
 

maximum possible text's size

echo_mode ndk::edit::mode_ [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Jun 4 16:20:55 2004 for NDK++ by doxygen 1.3.6