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_ |
|
< this is a simple container of the multi-line text |
|
|
|
append text to the buffer |
|
|
|
clear all entrie text |
|
move text viewport to the down |
|
draw frame on the panel Reimplemented from ndk::panel. |
|
number of the last visible line |
|
move text viewport to the left |
|
total length of the text |
|
|
|
move text viewport to the right |
|
set current text of the buffer, same as clear+add+draw |
|
|
|
|
|
move text viewport to the up |
|
internal containter for all inner text |
|
made or not wrapping of the inner strings |
|
first viewport position coordinate |
|
second viewport position coordinate |