Next: XPopup Remarks, Previous: Other XPopup Routines, Up: XPopup [Contents][Index]

#### 23.3.4 XPopup Attributes

The title of a XPopup can be set using the functions

    void fl_setpup_title(int popup_id, const char *title);
    void fl_setpup_title_f(int popup_id, const char *fmt, ...);

They only differ in the way the new title is passed to the function, the first one accepts a simple string while the second expects a format string as used for `printf()` etc., followed by the appropriate number of (unspecified) arguments.

Use the following routines to modify the default popup font style, font size and border width:

    int fl_setpup_default_fontsize(int size);
    int fl_setpup_default_fontstyle(int style);
    int fl_setpup_default_bw(int bw);

The functions return the old size, style or border width value, respectively.

All XPopups by default use a right arrow cursor. To change the default cursor, use

    Cursor fl_setpup_default_cursor(int cursor);

where you can use for `cursor` any of the standard cursors defined in `<X11/cursorfont.h>` like `XC_watch` etc. The function returns the previously cursor.

To change the cursor of a particular XPopup only , use the following routine

    Cursor fl_setpup_cursor(int popup_id, int cursor);

For example, after the following sequence,

    id = fl_defpup(win, "item1|item2");
    fl_setpup_cursor(id, XC_hand2);

the popup with ID `id` will use a "hand" instead of the default arrow cursor.

In versions before 1.0.91 XPopups were drawn with a heavy shadow around the box. Drawing of this shadow could be controlled via

    void fl_setpup_shadow(int popup_id, int yes_no);

Nowadays this function still exists for backward-compatibility but does nothing.

The appearance of XPopups (and their associated sub-popups) can be change by the following routines:

    void fl_setpup_bw(int popup_id, int bw);
    void fl_setpup_softedge(int pupup_id, int yes_no);

The first sets the border width for a XPopup. Calling `fl_setpup_softedge()` with a true argument for `yes_no` has the same effect as using a negative border width while using a false (0) argument is equivalent to using a positive one (so this function isn’t very useful).

The background color and text color of a popup can be changed using

    void fl_setpup_default_color(FL_COLOR bgcolor, FL_COLOR tcolor);

By default, the background color `bgcolor` is `FL_COL1` and the text color `tcolor` is `FL_BLACK`.

For "binary" or radio items, that have check box associated with them, the "checked" or "pushed" color (default is `FL_BLUE`) can be changed with the following routine

    void fl_setpup_default_checkcolor(FL_COLOR checkcolor);

There is by default a limit of 32 XPopups per process. To enlarge the number of XPopups allowed, use the following routine

    int fl_setpup_maxpups(int new_max);

The function returns the previous limit.

It is possible to use XPopups as a message facility using the following routines

    void fl_showpup(int popup_id);
    void fl_hidepup(int popup_id);

No interaction takes place with a XPopup shown by `fl_showpup()` and it can only be removed from the screen programmatically via `fl_hidepup()`.

Next: XPopup Remarks, Previous: Other XPopup Routines, Up: XPopup [Contents][Index]