24#  define Fl_Help_View_H 
   33#  include "Fl_Scrollbar.H" 
   44typedef const char *(Fl_Help_Func)(
Fl_Widget *, 
const char *);
 
   81struct FL_EXPORT Fl_Help_Font_Style {
 
   88  Fl_Help_Font_Style(){} 
 
   92const size_t MAX_FL_HELP_FS_ELTS = 100;
 
  102    elts_[nfonts_].set(f, s, c);
 
 
  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, 
int entity_extra_length = 0);
 
  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;
 
 
 
 
 
int Fl_Font
A font number is an index into the internal font table.
Definition Enumerations.H:884
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition Enumerations.H:941
int Fl_Fontsize
Size of a font in pixels.
Definition Enumerations.H:913
void draw()
Draws the Fl_Help_View widget.
Definition Fl_Help_View.cxx:659
Fl_Font textfont() const
Returns the current default text font.
Definition Fl_Help_View.H:340
void textcolor(Fl_Color c)
Sets the default text color.
Definition Fl_Help_View.H:334
int size() const
Gets the size of the help view.
Definition Fl_Help_View.H:331
const char * filename() const
Returns the current filename for the text in the buffer.
Definition Fl_Help_View.H:302
int scrollbar_size() const
Gets the current size of the scrollbars' troughs, in pixels.
Definition Fl_Help_View.H:368
const char * title()
Returns the current document title, or NULL if there is no title.
Definition Fl_Help_View.H:346
void link(Fl_Help_Func *fn)
This method assigns a callback function to use when a link is followed or a file is loaded (via Fl_He...
Definition Fl_Help_View.H:327
Fl_Fontsize textsize() const
Gets the default text size.
Definition Fl_Help_View.H:344
const char * value() const
Returns the current buffer contents.
Definition Fl_Help_View.H:356
void scrollbar_size(int newSize)
Sets the pixel size of the scrollbars' troughs to newSize, in pixels.
Definition Fl_Help_View.H:390
const char * directory() const
Returns the current directory for the text in the buffer.
Definition Fl_Help_View.H:299
void textsize(Fl_Fontsize s)
Sets the default text size.
Definition Fl_Help_View.H:342
int topline() const
Returns the current top line in pixels.
Definition Fl_Help_View.H:350
void textfont(Fl_Font f)
Sets the default text font.
Definition Fl_Help_View.H:338
Fl_Color textcolor() const
Returns the current default text color.
Definition Fl_Help_View.H:336
Fl_Help_View(int xx, int yy, int ww, int hh, const char *l=0)
The constructor creates the Fl_Help_View widget at the specified position and size.
Definition Fl_Help_View.cxx:3233
int handle(int)
Handles events in the widget.
Definition Fl_Help_View.cxx:3146
int leftline() const
Gets the left position in pixels.
Definition Fl_Help_View.H:353
This class supports caching, loading, scaling, and drawing of image files.
Definition Fl_Shared_Image.H:51
File names and URI utility functions.
utility header to pull drawing functions together
unsigned char uchar
unsigned char
Definition fl_types.h:30
#define FL_PATH_MAX
all path buffers should use this length
Definition filename.H:38
Fl_Font fl_font()
Returns the face set by the most recent call to fl_font().
Definition fl_draw.H:515
Fl_Color fl_color()
Returns the last fl_color() that was set.
Definition fl_draw.H:70
Definition Fl_Help_View.H:51
Definition Fl_Help_View.H:94
void pop(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c)
Pops from the stack the font style triplet and calls fl_font() & fl_color() adequately.
Definition Fl_Help_View.H:115
size_t nfonts_
current number of fonts in stack
Definition Fl_Help_View.H:124
void top(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c)
Gets the top (current) element on the stack.
Definition Fl_Help_View.H:107
Fl_Help_Font_Style elts_[100]
font elements
Definition Fl_Help_View.H:125
Fl_Help_Font_Stack()
font stack construction, initialize attributes.
Definition Fl_Help_View.H:96
size_t count() const
Gets the current count of font style elements in the stack.
Definition Fl_Help_View.H:121
void push(Fl_Font f, Fl_Fontsize s, Fl_Color c)
Pushes the font style triplet on the stack, also calls fl_font() & fl_color() adequately.
Definition Fl_Help_View.H:109
Fl_Help_View font stack element definition.
Definition Fl_Help_View.H:81
Fl_Fontsize s
Font Size.
Definition Fl_Help_View.H:83
Fl_Color c
Font Color.
Definition Fl_Help_View.H:84
void set(Fl_Font afont, Fl_Fontsize asize, Fl_Color acolor)
Sets current font attributes.
Definition Fl_Help_View.H:86
Fl_Font f
Font.
Definition Fl_Help_View.H:82
void get(Fl_Font &afont, Fl_Fontsize &asize, Fl_Color &acolor)
Gets current font attributes.
Definition Fl_Help_View.H:85
Definition of a link for the html viewer.
Definition Fl_Help_View.H:67
char name[32]
Link target (blank if none)
Definition Fl_Help_View.H:69
int h
Height of link text.
Definition Fl_Help_View.H:73
char filename[192]
Reference filename.
Definition Fl_Help_View.H:68
int w
Width of link text.
Definition Fl_Help_View.H:72
int y
Y offset of link text.
Definition Fl_Help_View.H:71
int x
X offset of link text.
Definition Fl_Help_View.H:70
Fl_Help_Target structure.
Definition Fl_Help_View.H:130
char name[32]
Target name.
Definition Fl_Help_View.H:131
int y
Y offset of target.
Definition Fl_Help_View.H:132