[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

14. Introduction

This part describes all different object classes that are available in the Forms Library. All available object classes are summarized in a table below. For each class there is a section in this document that describes it. The section starts with a short description of the object, followed by the routine(s) to add it to a form. For (almost) all classes this routine has the same form

FL_OBJECT *fl_add_CLASS(int type, FL_Coord x, FL_Coord y,
                        FL_Coord w, FL_Coord h, const char *label);

Here type is the type of the object in its class. Most classes have many different types. They are described in the section. x, y, w and h give the left upper corner and the width and height of the bounding box of the object. label is the label that is placed inside or next to the object. For each object class the default placement of the label is described. When the label starts with the character @ the label is not printed but replaced by a symbol instead.

For each object class there is also a routine

FL_OBJECT *fl_create_CLASS(int type, FL_Coord x, FL_Coord y,
                           FL_Coord w, FL_Coord h, const char *label);

that only creates the object but does not put it in the form. This routine is useful for building hierarchical object classes. The routine is not described in the following sections.

An important aspect of objects is how interaction is performed with them. First, there is the way in which the user interacts with the object, and second there's the question under which circumstances an object changes its state and how this is returned to the application program. All this is described in detail in the following sections.

Object attributes can be divided into generic and object specific ones. For generic attributes (e.g., the object label size), the routines that change them always start with fl_set_object_xxx() where xxx is the name of the attribute. When a specific object is created and added to a form, it inherits many aspects of the generic object or initializes the object attributes to its needed defaults.

Object classes can be roughly divided into static object classes (Box, Frame, LabelFrame, Text, Bitmap, Pixmap, Clock and Chart), Buttons, valuator objects classes (Slider, Scrollbar, Dial, Positioner, Counter, Thumbwheel), Inputs, choice object classes (Menu, Choice, Browser), container object classes (Tabbed Folder, Form Browser, Menu bar) and, finally, other object classes (Timer, XYPlot, Canvas, Popup).


Rectangular areas to visually group objects.


A box with an empty inside region.


A frame with label on the frame.


Simple one line labels.


Displays an X11 bitmap.


Displays a pixmap using the XPM library.


A clock.


Bar-charts, pie-charts, strip-charts, etc.


Many different kinds and types of buttons that the user can push.


Both vertical and horizontal sliders to let the user indicate some float value, possibly with a field showing the currently set value.


Sliders plus two directional buttons.


A dial to let the user indicate a float value.


Lets the user indicate an (x, y) position with the mouse.


A different way to let a user step through values.


Rolling a wheel to indicate float values.


Lets the user type in an input string.


Both pop-up and drop-down menus can be created.


Can be used to let the user make a choice from a set of items.


A text browser with a slider. Can be used for making selections from sets of choices.


A (tabbed) folder is a compound object capable of holding multiple groups of objects.


A browser you can drop forms into.


A timer that runs from a set time towards 0. Can e.g., be used to do default actions after some time has elapsed.


Shows simple 2D xy-plot from a tabulated function or a datafile. Data points can be interactively manipulated and retrieved.


Canvases are managed plain X windows. It differs from a raw application window only in the way its geometry is managed, not in the way various interaction is set up.


Popup are mostly used by menus and choices, but they can also be used stand-alone to isplay context menus etc.

Thus, in the following sections, only the object specific routines are documented. Routines that set generic object attributes are documented in Part V.

When appropriate, the effect of certain (generic) attributes of the objects on the specific object is discussed. In particular, it is described what effect the routine fl_set_object_color() has on the appearance of the object. Also some remarks on possible boxtypes are made.

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Jens Thoms Toerring on January 5, 2014 using texi2html 1.82.