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

ndk::text Class Reference

Inheritance diagram for ndk::text:

Inheritance graph
Collaboration diagram for ndk::text:

Collaboration graph
List of all members.

Public Types

enum  wrap_type { no_wrap, wrap }

Public Member Functions

 text (const std::string &str, panel *parent=0, wrap_type wrapping=no_wrap)
void add_text (const std::string &str)
void set_text (const std::string &str)
virtual void draw ()
void right ()
void left ()
void up ()
void down ()
virtual void resize (unsigned int w, unsigned int h)
void clear ()
unsigned int length () const
unsigned int last_line () const

Protected Member Functions

event::result at_keyboard (const keyboard &ev)

Private Member Functions

unsigned int string_height (const std::string &str)
unsigned int string_width (const std::string &str)

Private Attributes

int x_
int y_
ncurses::pad pad_
wrap_type wrapping_

Member Enumeration Documentation

enum ndk::text::wrap_type

< this is a simple container of the multi-line text

Enumeration values:

Constructor & Destructor Documentation

text::text const std::string &  str,
panel parent = 0,
wrap_type  wrapping = no_wrap

Member Function Documentation

void text::add_text const std::string &  str  ) 

append text to the buffer

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

ev  draw frame on the panel

void text::clear  ) 

clear all entrie text

void text::down  ) 

move text viewport to the down

void text::draw  )  [virtual]

draw frame on the panel

Reimplemented from ndk::panel.

unsigned int text::last_line  )  const

number of the last visible line

void text::left  ) 

move text viewport to the left

unsigned int text::length  )  const

total length of the text

void text::resize unsigned int  w,
unsigned int  h

void text::right  ) 

move text viewport to the right

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

set current text of the buffer, same as clear+add+draw

unsigned int text::string_height const std::string &  str  )  [private]

number of strings
number of strings

unsigned int text::string_width const std::string &  str  )  [private]

maximum string length
maximum string length

void text::up  ) 

move text viewport to the up

Member Data Documentation

ncurses::pad ndk::text::pad_ [private]

internal containter for all inner text

wrap_type ndk::text::wrapping_ [private]

made or not wrapping of the inner strings

int ndk::text::x_ [private]

first viewport position coordinate

int ndk::text::y_ [private]

second viewport position coordinate

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