23 #ifndef Fl_Help_View_H
24 # define Fl_Help_View_H
32 # include "Fl_Group.H"
33 # include "Fl_Scrollbar.H"
44 typedef const char *(Fl_Help_Func)(
Fl_Widget *,
const char *);
92 const size_t MAX_FL_HELP_FS_ELTS = 100;
102 elts_[nfonts_].set(f, s, c);
110 if (nfonts_ < MAX_FL_HELP_FS_ELTS-1) nfonts_ ++;
111 elts_[nfonts_].set(f, s, c);
116 if (nfonts_ > 0) nfonts_ --;
121 size_t count()
const {
return nfonts_;}
202 enum { RIGHT = -1, CENTER, LEFT };
237 static int selection_first;
238 static int selection_last;
239 static int selection_push_first;
240 static int selection_push_last;
241 static int selection_drag_first;
242 static int selection_drag_last;
244 static int draw_mode;
247 static int current_pos;
250 static Fl_Color hv_selection_text_color;
253 void initfont(
Fl_Font &f,
Fl_Fontsize &s,
Fl_Color &c) { f = textfont_; s = textsize_; c = textcolor_; fstack_.init(f, s, c); }
258 Fl_Help_Block *add_block(
const char *s,
int xx,
int yy,
int ww,
int hh,
uchar border = 0);
259 void add_link(
const char *n,
int xx,
int yy,
int ww,
int hh);
260 void add_target(
const char *n,
int yy);
262 int do_align(
Fl_Help_Block *block,
int line,
int xx,
int a,
int &l);
263 #if FLTK_ABI_VERSION >= 10303
267 #if FLTK_ABI_VERSION >= 10303
271 void format_table(
int *table_width,
int *columns,
const char *table);
273 int get_align(
const char *p,
int a);
274 const char *get_attr(
const char *p,
const char *n,
char *buf,
int bufsize);
277 int get_length(
const char *l);
278 #if FLTK_ABI_VERSION >= 10303
282 #if FLTK_ABI_VERSION >= 10303
286 void hv_draw(
const char *t,
int x,
int y);
287 char begin_selection();
288 char extend_selection();
289 void end_selection(
int c=0);
290 void clear_global_selection();
296 Fl_Help_View(
int xx,
int yy,
int ww,
int hh,
const char *l = 0);
299 const char *
directory()
const {
if (directory_[0])
return (directory_);
300 else return ((
const char *)0); }
302 const char *
filename()
const {
if (filename_[0])
return (filename_);
303 else return ((
const char *)0); }
304 int find(
const char *s,
int p = 0);
327 void link(Fl_Help_Func *fn) { link_ = fn; }
328 int load(
const char *f);
329 void resize(
int,
int,
int,
int);
331 int size()
const {
return (size_); }
346 const char *
title() {
return (title_); }
347 void topline(
const char *n);
354 void value(
const char *val);
356 const char *
value()
const {
return (value_); }
357 void clear_selection();
369 return(scrollbar_size_);
391 scrollbar_size_ = newSize;
395 #endif // !Fl_Help_View_H