31 typedef std::vector<std::wstring>::size_type line_count;
32 typedef int col_count;
35 std::vector<std::wstring> lines;
38 line_count first_line;
41 col_count first_column;
47 std::wstring last_search;
53 void search_omnidirectional_for(
const std::wstring &s,
bool forward);
56 pager(
const char *text,
int len,
const char *encoding = NULL);
57 pager(
const std::string &s,
const char *encoding = NULL);
58 pager(
const std::wstring &s);
68 create(
const char *text,
int len,
const char *encoding = NULL)
81 create(
const std::string &s,
const char *encoding = NULL)
111 virtual void set_text(
const char *text,
112 std::string::size_type len,
113 const char *encoding=NULL);
120 virtual void set_text(
const std::string &s,
const char *encoding=NULL);
126 virtual void set_text(
const std::wstring &s);
159 search_omnidirectional_for(s,
true);
168 search_omnidirectional_for(s,
false);
174 line_count get_first_line() {
return first_line;}
175 line_count get_num_lines() {
return lines.size();}
176 col_count get_first_column() {
return first_column;}
177 col_count get_num_columns() {
return text_width;}
190 virtual void dispatch_mouse(
short id,
int x,
int y,
int z, mmask_t bstate);
191 virtual bool focus_me() {
return true;}
196 bool get_cursorvisible() {
return true;}
206 static void init_bindings();
214 file_pager(
const std::string &filename,
const char *encoding = NULL);
215 file_pager(
const std::wstring &filename,
const char *encoding = NULL);
217 file_pager(
const char *text,
int len,
const char *encoding = NULL);
234 create(
const std::wstring &filename,
const char *encoding=NULL)
240 create(
const char *text,
int len,
const char *encoding=NULL)
251 void load_file(
const std::string &filename,
const char *encoding=NULL);
260 void load_file(
const std::wstring &filename,
const char *encoding);
269 void load_file(
const std::wstring &filename);