This widget implements a graphical "more" command. It allows the
user to view a text file. There are various possible ways to
specify the contents to display: loading the data from a file (by
providing a filename) or by loading it from an open C FILE data
stream or from the output of a Unix command or from a Unix file
descriptor.
The following is a simple example of its use. The code creates a
GnomeLess widget, sets a custom font, and fills the widget with
the contents of a file.
GtkWidget *gl;
GdkFont *font;
/* create a new widget */
gl = gnome_less_new();
/* set our custom font */
font = gdk_font_load("-adobe-helvetica-bold-o-normal-*-*-140-*-*-p-*-iso8859-1");
gnome_less_set_font(GNOME_LESS(gl), font);
/* display some text */
gnome_less_show_file(GNOME_LESS(gl), "/home/user/file.txt");
Runs the shell command specified in command_line, and places the output of that command
in the GnomeLess widget specified by gl. Replaces any text already being displayed in the
widget.
gl :
Pointer to GnomeLess widget
command_line :
Command to be executed
Returns :
TRUE if successful, FALSE if not. Error stored in errno.
Sets the font of the text to be displayed in the GnomeLess widget gl to font.
Note: This will not affect text already being displayed.
If you use this function after adding text to the widget, you must show it again
by using gnome_less_reshow or one of the gnome_less_show commands.
Specifies whether or not new text should be displayed using a fixed font. Pass TRUE
in fixed to use a fixed font, or FALSE to revert to the default GtkText font.
Note: This will not affect text already being displayed.
If you use this function after adding text to the widget, you must show it again
by using gnome_less_reshow or one of the gnome_less_show commands.
Re-displays all of the text in the GnomeLess widget gl. If the font has changed since
the last show/reshow of text, it will update the current text to the new font.