Selectors library FselInput() Inquire library
Programming guideline of WinDom

FontSel()

NAME

FontSel - Font selector

PROTOTYPAGE

int FontSel( char *winname, char *example, int flags, int *fontid, int *fontsize, char *fontname);

PARAMETERS

winname:
selector title,

example:
text used to display the font or NULL,

flags:
bit field:

VSTHEIGHT:
size in pixel unit (instead of point unit),

MONOSPACED:
use only non proportional fonts.

fontid:
identificator of the selected font,

fontsize:
size selected,

fontname:
font name filled in a 64-byte buffer,

return:
1 if the user choice is valid, 0 else.

DESCRIPTION

FontSel() calls the internal WinDom font selector. The selector is displayed in a modal window. The selector can be used even the system does not support multiple fonts, in this case only the size can be changed.

Before the call, the fontid and fontsize parameters may be filled with a default font-id and size. If a null value is used, default values are the system font and a size of 13 pixels. If the example parameter is NULL, a default text is used to display the fonts.

The window hosting fontselector catches the AP_TERM message : the function will terminate in the same manner than a user clic on the Cancel button.

USAGE OF SELECTOR

simple clic
select a font and display it,

double clique
select a font and return this selection, the selector is closed,

size
font size are real time updated,

up and down arrow
select a font,

touche return ou enter
keyboard shortcut of the OK button,

touche Undo
keyboard shortcut of the CANCEL button,