32 #ifndef Fl_Help_View_H
33 # define Fl_Help_View_H
41 # include "Fl_Group.H"
42 # include "Fl_Scrollbar.H"
45 # include "filename.H"
53 typedef const char *(Fl_Help_Func)(
Fl_Widget *,
const char *);
101 const size_t MAX_FL_HELP_FS_ELTS = 100;
111 elts_[nfonts_].set(f, s, c);
119 if (nfonts_ < MAX_FL_HELP_FS_ELTS-1) nfonts_ ++;
120 elts_[nfonts_].set(f, s, c);
125 if (nfonts_ > 0) nfonts_ --;
130 size_t count()
const {
return nfonts_;}
211 enum { RIGHT = -1, CENTER, LEFT };
246 static int selection_first;
247 static int selection_last;
248 static int selection_push_first;
249 static int selection_push_last;
250 static int selection_drag_first;
251 static int selection_drag_last;
253 static int draw_mode;
256 static int current_pos;
259 static Fl_Color hv_selection_text_color;
262 void initfont(
Fl_Font &f,
Fl_Fontsize &s,
Fl_Color &c) { f = textfont_; s = textsize_; c = textcolor_; fstack_.init(f, s, c); }
267 Fl_Help_Block *add_block(
const char *s,
int xx,
int yy,
int ww,
int hh,
uchar border = 0);
268 void add_link(
const char *n,
int xx,
int yy,
int ww,
int hh);
269 void add_target(
const char *n,
int yy);
271 int do_align(
Fl_Help_Block *block,
int line,
int xx,
int a,
int &l);
274 void format_table(
int *table_width,
int *columns,
const char *table);
276 int get_align(
const char *p,
int a);
277 const char *get_attr(
const char *p,
const char *n,
char *buf,
int bufsize);
280 int get_length(
const char *l);
283 void hv_draw(
const char *t,
int x,
int y);
284 char begin_selection();
285 char extend_selection();
286 void end_selection(
int c=0);
287 void clear_global_selection();
293 Fl_Help_View(
int xx,
int yy,
int ww,
int hh,
const char *l = 0);
296 const char *
directory()
const {
if (directory_[0])
return (directory_);
297 else return ((
const char *)0); }
299 const char *
filename()
const {
if (filename_[0])
return (filename_);
300 else return ((
const char *)0); }
301 int find(
const char *s,
int p = 0);
324 void link(Fl_Help_Func *fn) { link_ = fn; }
325 int load(
const char *f);
326 void resize(
int,
int,
int,
int);
328 int size()
const {
return (size_); }
343 const char *
title() {
return (title_); }
344 void topline(
const char *n);
351 void value(
const char *val);
353 const char *
value()
const {
return (value_); }
354 void clear_selection();
366 return(scrollbar_size_);
388 scrollbar_size_ =
size;
392 #endif // !Fl_Help_View_H