FLTK logo

Documentation

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  ]
 

class Fl_Help_View


Class Hierarchy

    Fl_Group
       |
       +----Fl_Help_View
    

Include Files

    #include "Fl_Help_View.h"
    

Description

The Fl_Help_View widget displays HTML text. Most HTML 2.0 elements are supported, as well as a primitive implementation of tables. GIF, JPEG, and PNG images are displayed inline.

Methods

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.

~Fl_Help_View()

The destructor destroys the widget and frees all memory that has been allocated for the current file.

const char *directory() const

This method returns the current directory (base) path for the file in the buffer.

const char *filename() const

This method returns the current filename for the text in the buffer.

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_Help_View::load()) that requires a different file or path. The callback function receives a pointer to the Fl_Help_View widget and the URI or full pathname for the file in question. It must return a pathname that can be opened as a local file or NULL:

    const char *fn(Fl_Widget *w, const char *uri);
    

The link function can be used to retrieve remote or virtual documents, returning a temporary file that contains the actual data. If the link function returns NULL, the value of the Fl_Help_View widget will remain unchanged.

If the link callback cannot handle the URI scheme, it should return the uri value unchanged or set the value() of the widget before returning NULL.

int load(const char *f)

This method loads the specified file or URL.

int size() const

This method returns the length of the buffer text in pixels.

void textcolor(Fl_Color c)
Fl_Color textcolor() const

The first form sets the default text color. The second returns the current default text color.

void textfont(uchar f)
uchar textfont() const

The first form sets the default text font. The second returns the current default text font.

void textsize(uchar s)
uchar textsize() const

The first form sets the default text size. The second returns the current default text size.

const char *title()

This method returns the current document title, or NULL if there is no title.

void topline(const char *n)
void topline(int)
int topline() const

The first two forms scroll the text to the indicated position, either with a named destination or by pixel line.

The second form returns the current top line in pixels.

void value(const char *v)
const char *value() const

The first form sets the current buffer to the string provided and reformats the text. The second form returns the current buffer contents.


User Comments [ Add Comment ]

From Anonymous, 09:03 Dec 29, 2003 (score=1)

Yeah, we got a F grade beacuse of this.
Reply ]

From Randolf Rotta, 12:10 Jul 03, 2003 (score=1)

Why isn't this called HTML_View or the like? Otherwise it's difficult to find, when looking for a simple HTML-Browser, and not a help window...
Reply ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.