#include <pager.h>
Inheritance diagram for cwidget::widgets::pager:
Public Types | |
typedef std::vector< std::wstring >::size_type | line_count |
typedef int | col_count |
Public Member Functions | |
virtual | ~pager () |
Destroy this pager. | |
virtual void | set_text (const char *text, std::string::size_type len, const char *encoding=NULL) |
Set the text to the given memory region. | |
virtual void | set_text (const std::string &s, const char *encoding=NULL) |
Change the displayed text. | |
virtual void | set_text (const std::wstring &s) |
Change the displayed text. | |
void | scroll_up (line_count nlines) |
Scroll the screen up by the given number of lines. | |
void | scroll_down (line_count nlines) |
Scroll the screen down by the given number of lines. | |
void | scroll_right (col_count ncols) |
Scroll the screen right by the given number of columns. | |
void | scroll_left (col_count ncols) |
Scroll the screen left by the given number of columns. | |
void | scroll_top () |
Scroll to the top of the screen. | |
void | scroll_bottom () |
Scroll to the bottom of the screen. | |
void | scroll_page (bool dir) |
Scroll by a page in the given direction. | |
void | search_for (const std::wstring &s) |
Find the next line containing the given string. | |
void | search_back_for (const std::wstring &s) |
Find the previous line containing the given string. | |
std::wstring | get_last_search () |
Return the last string which the user searched for. | |
line_count | get_first_line () |
line_count | get_num_lines () |
col_count | get_first_column () |
col_count | get_num_columns () |
void | do_line_signal () |
Emits a signal describing the verical location of the display within the text. | |
void | do_column_signal () |
Emits a signal describing the horizontal location of the display within the text. | |
virtual bool | handle_key (const config::key &k) |
Handles a keypress in this widget. | |
virtual void | dispatch_mouse (short id, int x, int y, int z, mmask_t bstate) |
virtual bool | focus_me () |
virtual void | paint (const style &st) |
Display this widget. | |
int | width_request () |
int | height_request (int w) |
Calculate the desired height of the widget, given its width. | |
bool | get_cursorvisible () |
point | get_cursorloc () |
Static Public Member Functions | |
static util::ref_ptr< pager > | create (const char *text, int len, const char *encoding=NULL) |
Create a pager from the given memory region. | |
static util::ref_ptr< pager > | create (const std::string &s, const char *encoding=NULL) |
Create a pager from a string. | |
static util::ref_ptr< pager > | create (const std::wstring &s) |
Create a pager from a wide character string. | |
static void | init_bindings () |
Public Attributes | |
sigc::signal2< void, int, int > | line_changed |
Announces that the user has scrolled vertically. | |
sigc::signal2< void, int, int > | column_changed |
Announces that the user has scrolled horizontally. | |
Static Public Attributes | |
static config::keybindings * | bindings = NULL |
Protected Member Functions | |
pager (const char *text, int len, const char *encoding=NULL) | |
pager (const std::string &s, const char *encoding=NULL) | |
pager (const std::wstring &s) |
The text is displayed as-is, without wrapping or formatting. Tab stops are placed at 8-character intervals. The user can scroll up, down, left and right using the standard keybindings.
|
Create a pager from a wide character string.
|
|
Create a pager from a string.
Reimplemented in cwidget::widgets::file_pager. |
|
Create a pager from the given memory region.
Reimplemented in cwidget::widgets::file_pager. |
|
Handles a keypress in this widget.
Reimplemented from cwidget::widgets::widget. |
|
Calculate the desired height of the widget, given its width.
Implements cwidget::widgets::widget. |
|
Display this widget.
Implements cwidget::widgets::widget. |
|
Scroll by a page in the given direction.
|
|
Find the previous line containing the given string.
|
|
Find the next line containing the given string.
|
|
Change the displayed text.
|
|
Change the displayed text.
|
|
Set the text to the given memory region.
|
|
Implements cwidget::widgets::widget. |