Home AESAES Extended shell libraryExtended shell library AES function listAES function list

8.25 Font selection

This library contains routines for handling a font selector, which an application can use to select fonts for its use. The routines were introduced with MagiC 4.

fnts_add Adds user's fonts for selection
fnts_close Closes selector
fnts_create Initializes the font selector
fnts_delete Releases memory used by font selector
fnts_do Displays font selector in modal dialog
fnts_evnt Processes events for dialog in window
fnts_get_info Obtains information about a font
fnts_get_name Obtains name of a font
fnts_get_no_styles Obtains number of styles of a font family
fnts_get_style Obtains ID of the n-th style of a family
fnts_open Opens font selector in a window
fnts_remove Removes user's fonts from the list
fnts_update Updates font selector

Note: The existence of these functions is best established with a call of appl_getinfo (opcode 7).

See also:
Selector in a window   Selector in a modal dialog   WDIALOG   xFSL interface

8.25.1 fnts_add

Name: »Font selector add user fonts« - Add user's fonts for selection.
 
Opcode: 185 (sub-opcode 0)
 
Syntax: int16_t fnts_add ( FNT_DIALOG *fnt_dialog, FNTS_ITEM *user_fonts );
 
Description: The call fnts_add adds the user's fonts to those of those displayed by the font selector. The following apply:
 

Parameter Meaning
fnt_dialog Pointer to management structure
user_fonts Pointer to user fonts

Hint: The IDs of these fonts must be higher than 65535. In addition the pointer to a display function must be entered into the structure element display.
 
Return value: On successful execution the function returns the value 1. A value of 0 on the other hand signals an error.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Font selection
 
See also: Binding   fnts_delete   fnts_remove   xFSL interface
 

8.25.1.1 Bindings for fnts_add

C: int16_t fnts_add ( FNT_DIALOG *fnt_dialog, FNTS_ITEM *user_fonts );
 
Binding:
 
int16_t fnts_add ( FNT_DIALOG *fnt_dialog,
                   FNTS_ITEM *user_fonts )
{
   addr_in[0] = fnt_dialog;
   addr_in[1] = user_fonts;

   int_in[0] = 0;
   crys_if (185);

   return ( int_out[0] );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 185 # Function opcode
control+2 control[1] 1 # Entry in int_in
control+4 control[2] 1 # Entry in int_out
control+6 control[3] 2 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] fnt_dialog
addr_in+4 addr_in[1] user_fonts
int_in int_in[0] 0 # Sub-opcode
int_out int_out[0] Return value

8.25.2 fnts_close

Name: »Font selector close window« - Close font selector window.
 
Opcode: 183
 
Syntax: int16_t fnts_close ( FNT_DIALOG *fnt_dialog, int16_t *x, int16_t *y );
 
Description: The call fnts_close closes the window of the font selector. The following apply:
 

Parameter Meaning
fnt_dialog Pointer to management structure
x Last x-coordinate of the dialog
y Last y-coordinate of the dialog

Hint: Old WDIALOG versions do not return the window coordinates. In that case the binding enters -1, so that the dialog will be centred automatically at the next call.
 
Return value: This function returns always 1.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Font selection
 
See also: Binding   fnts_open   xFSL interface
 

8.25.2.1 Bindings for fnts_close

C: int16_t fnts_close ( FNT_DIALOG *fnt_dialog, int16_t *x, int16_t *y );
 
Binding:
 
int16_t fnts_close ( FNT_DIALOG *fnt_dialog, int16_t *x,
                     int16_t *y )
{
   int_out[1] = -1;
   int_out[2] = -1;

   addr_in[0] = fnt_dialog;

   crys_if (183);

   *x = int_out[1];
   *y = int_out[2];

   return ( int_out[0] );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 183 # Function opcode
control+2 control[1] 0 # Entry in int_in
control+4 control[2] 3 # Entry in int_out
control+6 control[3] 1 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] fnt_dialog
int_out int_out[0] Return value
int_out+2 int_out[1] Last x-coordinate of the dialog
int_out+4 int_out[2] Last y-coordinate of the dialog

8.25.3 fnts_create

Name: »Font selector create« - Initializes the font selector.
 
Opcode: 180
 
Syntax: FNT_DIALOG *fnts_create ( int16_t vdi_handle, int16_t no_fonts, int16_t font_flags, int16_t dialog_flags, int8_t *sample, int8_t *opt_button );
 
Description: The call fnts_create initializes the font selector. The following apply:
 
Parameter Meaning
   
vdi_handle Handle of the workstation to be used
no_fonts Number of available fonts, or 0 if vst_load_fonts is to be called
font_flags Type of fonts to be displayed:
Bit 0 = Display bitmap fonts ( FNTS_BTMP = 1)
Bit 1 = Display vector fonts ( FNTS_OUTL = 2)
Bit 2 = Display mono-spaced fonts ( FNTS_MONO = 4)
Bit 3 = Display proportional fonts ( FNTS_PROP = 8)
dialog_flags Appearance of the dialog:
FNTS_3D (1) = Display selector in 3D-look
FNTS_DISPLAY (2) = Display available display styles (XaAES)
sample Pointer to string for the sample text
opt_button Pointer to string for optional button, or 0L

Hint: If no_fonts is 0, vst_load_fonts is called with vdi_handle. Otherwise an assumption is made that no_fonts is the number of all fonts available via vdi_handle, i.e. the number of all system fonts (work_out[10] for v_opnvwk/vq_extnd) plus the number of fonts loaded in later (return value of vst_load_fonts).
 
Depending on system configuration, this function may well take 1 second (possibly even more), so it should be called at program start and not just immediately before displaying the font selector.
 
Note: The font selector alters the attributes of the workstation described by vdi_handle. If one wants to use the workstation passed with fnts_create also for other purposes, the attributes have to be set first each time, as they may have been altered meantime by the font selector.
 
Return value: This function returns a pointer to management structure.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Font selection
 
See also: Binding   fnts_open   fnts_close   xFSL interface
 

8.25.3.1 Bindings for fnts_create

C: FNT_DIALOG *fnts_create ( int16_t vdi_handle, int16_t no_fonts, int16_t font_flags, int16_t dialog_flags, int8_t *sample, int8_t *opt_button );
 
Binding:
 
FNT_DIALOG *fnts_create ( int16_t vdi_handle,
                          int16_t no_fonts,
                          int16_t font_flags,
                          int16_t dialog_flags,
                          int8_t *sample,
                          int8_t *opt_button )
{
   addr_in[0] = sample;
   addr_in[1] = opt_button;

   int_in[0] = vdi_handle;
   int_in[1] = no_fonts;
   int_in[2] = font_flags;
   int_in[3] = dialog_flags;
   crys_if (180);

   return ( addr_out[0] );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 180 # Function opcode
control+2 control[1] 4 # Entry in int_in
control+4 control[2] 0 # Entry in int_out
control+6 control[3] 2 # Entry in addr_in
control+8 control[4] 1 # Entry in addr_out
addr_in addr_in[0] sample
addr_in+4 addr_in[1] opt_button
int_in int_in[0] vdi_handle
int_in+2 int_in[1] no_fonts
int_in+4 int_in[2] font_flags
int_in+6 int_in[3] dialog_flags
addr_out addr_out[0] Return value

8.25.4 fnts_delete

Name: »Font selector delete« - Release memory used by font selector.
 
Opcode: 181
 
Syntax: int16_t fnts_delete ( FNT_DIALOG *fnt_dialog, int16_t vdi_handle );
 
Description: The call fnts_delete releases the memory that was used by the font selector. The following apply:
 
Parameter Meaning
   
fnt_dialog Pointer to management structure
vdi_handle Handle of the Workstation, or 0 if vst_unload_fonts() is not to be called

Hint: If vdi_handle is not 0, then vst_unload_fonts() will be called.
 
Return value: This function returns always one.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Font selection
 
See also: Binding   fnts_close   fnts_remove   xFSL interface
 

8.25.4.1 Bindings for fnts_delete

C: int16_t fnts_delete ( FNT_DIALOG *fnt_dialog, int16_t vdi_handle );
 
Binding:
 
int16_t fnts_delete ( FNT_DIALOG *fnt_dialog,
                      int16_t vdi_handle )
{
   addr_in[0] = fnt_dialog;
   int_in[0]  = vdi_handle;
   crys_if (181);

   return ( int_out[0] );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 181 # Function opcode
control+2 control[1] 1 # Entry in int_in
control+4 control[2] 1 # Entry in int_out
control+6 control[3] 1 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] fnt_dialog
int_in int_in[0] vdi_handle
int_out int_out[0] Return value

8.25.5 fnts_do

Name: »Font selector do« - Display font selector in a modal dialog.
 
Opcode: 187
 
Syntax: int16_t fnts_do ( FNT_DIALOG *fnt_dialog, int16_t button_flags, int32_t id_in, int32_t pt_in, int32_t ratio_in, int16_t *check_boxes, int32_t *id, fix31 *pt, int32_t *ratio );
 
Description: The call fnts_do displays the font selector in a modal dialog. The following apply:
 
Parameter Meaning
   
fnt_dialog Pointer to management structure
button_flags Flags for supported buttons:
0x0001 = Select checkbox for names
0x0002 = Select checkbox for style
0x0004 = Select checkbox for height
0x0008 = Select checkbox for width/height ratio
0x0100 = Display checkbox for names
0x0200 = Display checkbox for style
0x0400 = Display checkbox for height
0x0800 = Display checkbox for width/height ratio
0x1000 = Width/height ratio adjustable
0x2000 = Button "Set" selectable
0x4000 = Button "Mark" selectable
id_in Font ID of the displayed font
pt_in Height in 1/65536 point
ratio_in Width/height ratio in 1/65536
check_boxes Status of the checkboxes
id Font ID of the selected font
pt Height in 1/65536 point
ratio Width/height ratio in 1/65536

Hint: This function is the counterpart to fnts_open/fnts_evnt/fnts_close. This function opens a modal dialog and only returns to the caller when one of the exit buttons was activated.
 
Return value: This function returns the index of the exit button
 

1 = Cancel
2 = OK
3 = Set
4 = Mark
5 = Options
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Font selection
 
See also: Binding   fnts_open   fnts_evnt   xFSL interface
 

8.25.5.1 Bindings for fnts_do

C: int16_t fnts_do ( FNT_DIALOG *fnt_dialog, int16_t button_flags, int32_t id_in, int32_t pt_in, int32_t ratio_in, int16_t *check_boxes, int32_t *id, fix31 *pt, int32_t *ratio );
 
Binding:
 
int16_t fnts_do ( FNT_DIALOG *fnt_dialog,
                  int16_t button_flags,
                  int32_t id_in, int32_t pt_in,
                  int32_t ratio_in, int16_t *check_boxes,
                  int32_t *id, fix31 *pt,
                  int32_t *ratio )
{
   addr_in[0] = fnt_dialog;

   int_in[0]    = button_flags;
   int_in[1..2] = id_in;
   int_in[3..4] = pt_in;
   int_in[5..6] = ratio_in;
   crys_if (187);

   *check_boxes = int_out[1];
   *id          = int_out[2..3];
   *pt          = int_out[4..5];
   *ratio       = int_out[6..7];

   return ( int_out[0] );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 187 # Function opcode
control+2 control[1] 7 # Entry in int_in
control+4 control[2] 8 # Entry in int_out
control+6 control[3] 1 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] fnt_dialog
int_in int_in[0] button_flags
int_in+2 int_in[1..2] id_in
int_in+6 int_in[3..4] pt_in
int_in+10 int_in[5..6] ratio_in
int_out int_out[0] Return value
int_out+2 int_out[1] check_boxes
int_out+4 int_out[2..3] id
int_out+8 int_out[4..5] pt
int_out+12 int_out[6..7] ratio

8.25.6 fnts_evnt

Name: »Font selector handle event« - Process events for a font selector dialog in a window.
 
Opcode: 186
 
Syntax: int16_t fnts_evnt ( FNT_DIALOG *fnt_dialog, EVNT *events, int16_t *button, int16_t *check_boxes, int32_t *id, fix31 *pt, int32_t *ratio );
 
Description: The call fnts_evnt evaluates the passed EVNT structure. The following apply:
 
Parameter Meaning
   
fnt_dialog Pointer to management structure
events Pointer to EVNT structure
button Selected button (or 0):
1 = Cancel
2 = Ok
3 = Set
4 = Mark
5 = Optional (application-specific)
check_boxes Status of the checkboxes:
Bit-0 = Checkbox for the names selected
Bit-1 = Checkbox for the style selected
Bit-2 = Checkbox for the height selected
Bit-3 = dto. für Breiten/Höhenverhältnis
id ID of the selected font
pt Height in 1/65536 point
ratio Width/height ratio

Hint: The function calls internally wdlg_evnt.
 
Return value: The function returns the value 0 if an exit button was selected, else the value 1 if nothing happened.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Font selection
 
See also: Binding   fnts_do   xFSL interface
 

8.25.6.1 Bindings for fnts_evnt

C: int16_t fnts_evnt ( FNT_DIALOG *fnt_dialog, EVNT *events, int16_t *button, int16_t *check_boxes, int32_t *id, fix31 *pt, int32_t *ratio );
 
Binding:
 
int16_t fnts_evnt ( FNT_DIALOG *fnt_dialog, EVNT *events,
                    int16_t *button, int16_t *check_boxes,
                    int32_t *id, fix31 *pt, int32_t *ratio )
{
   addr_in[0] = fnt_dialog;
   addr_in[1] = events;
   crys_if (186);

   *button      = int_out[1];
   *check_boxes = int_out[2];
   *id          = int_out[3..4];
   *pt          = int_out[5..6];
   *ratio       = int_out[7..8];

   return ( int_out[0] );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 186 # Function opcode
control+2 control[1] 0 # Entry in int_in
control+4 control[2] 9 # Entry in int_out
control+6 control[3] 2 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] fnt_dialog
addr_in+4 addr_in[1] events
int_out int_out[0] Return value
int_out+2 int_out[1] button
int_out+4 int_out[2] check_boxes
int_out+6 int_out[3..4] id
int_out+10 int_out[5..6] pt
int_out+14 int_out[7..8] ratio

8.25.7 fnts_get_info

Name: »Font selector get font info« - Obtain information about a font.
 
Opcode: 184 (sub-opcode 3)
 
Syntax: int16_t fnts_get_info ( FNT_DIALOG *fnt_dialog, int32_t id, int16_t *mono, int16_t *outline );
 
Description: The call fnts_get_info obtains various items of information about a font. The following apply:
 

Parameter Meaning
fnt_dialog Pointer to management structure
id Font ID
mono Flag for monospaced font
outline Flag for vector font

Note: The function determines whether the specified font is a monospaced one, or a vector (outline) font.
 
Return value: The function returns the index of the font (or the value 0 in case of error).
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Font selection
 
See also: Binding   fnts_get_name   fnts_get_style   xFSL interface
 

8.25.7.1 Bindings for fnts_get_info

C: int16_t fnts_get_info ( FNT_DIALOG *fnt_dialog, int32_t id, int16_t *mono, int16_t *outline );
 
Binding:
 
int16_t fnts_get_info ( FNT_DIALOG *fnt_dialog, int32_t id,
                        int16_t *mono, int16_t *outline )
{
   addr_in[0] = fnt_dialog;

   int_in[0]    = 3;
   int_in[1..2] = id;
   crys_if (184);

   *mono    = int_out[1];
   *outline = int_out[2];
   return ( int_out[0] );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 184 # Function opcode
control+2 control[1] 3 # Entry in int_in
control+4 control[2] 3 # Entry in int_out
control+6 control[3] 1 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] fnt_dialog
int_in int_in[0] 3 # Sub-opcode
int_in+2 int_in[1..2] id
int_out int_out[0] Return value
int_out+2 int_out[1] mono
int_out+4 int_out[2] outline

8.25.8 fnts_get_name

Name: »Font selector get font name« - Obtain name of a font.
 
Opcode: 184 (sub-opcode 2)
 
Syntax: int16_t fnts_get_name ( FNT_DIALOG *fnt_dialog, int32_t id, int8_t *full_name, int8_t *family_name, int8_t *style_name );
 
Description: The call fnts_get_name obtains the name, family name and style name of a font. The following apply:
 

Parameter Meaning
fnt_dialog Pointer to management structure
id Font ID
full_name Pointer to the full name, or NULL
family_name Pointer to the family name, or NULL
style_name Pointer to the style name, or NULL
Return value: The function returns the value 1 on error-free execution; a value of 0, on the other hand, signals an error has occurred.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Font selection
 
See also: Binding   fnts_get_info   fnts_get_style   xFSL interface
 

8.25.8.1 Bindings for fnts_get_name

C: int16_t fnts_get_name ( FNT_DIALOG *fnt_dialog, int32_t id, int8_t *full_name, int8_t *family_name, int8_t *style_name );
 
Binding:
 
int16_t fnts_get_name ( FNT_DIALOG *fnt_dialog, int32_t id,
                        int8_t *full_name,
                        int8_t *family_name,
                        int8_t *style_name )
{
   addr_in[0] = fnt_dialog;
   addr_in[1] = full_name;
   addr_in[2] = family_name;
   addr_in[3] = style_name;

   int_in[0]    = 2;
   int_in[1..2] = id;
   crys_if (184);

   return ( int_out[0] );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 184 # Function opcode
control+2 control[1] 3 # Entry in int_in
control+4 control[2] 1 # Entry in int_out
control+6 control[3] 4 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] fnt_dialog
addr_in+4 addr_in[1] full_name
addr_in+8 addr_in[2] family_name
addr_in+12 addr_in[3] style_name
int_in int_in[0] 2 # Sub-opcode
int_in+2 int_in[1..2] id
int_out int_out[0] Return value

8.25.9 fnts_get_no_styles

Name: »Font selector get number of styles« - Obtain number of styles of a font family.
 
Opcode: 184 (sub-opcode 0)
 
Syntax: int16_t fnts_get_no_styles ( FNT_DIALOG *fnt_dialog, int32_t id );
 
Description: The call fnts_get_no_styles obtains the number of styles of a font. The following apply:
 

Parameter Meaning
fnt_dialog Pointer to management structure
id ID of a font of the family

Hint: The parameter id is the ID of a font of this family, that may have been returned by fnts_evnt for instance.
 
Return value: This function returns the number of styles belonging to the family.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Font selection
 
See also: Binding   fnts_get_info   fnts_get_name   xFSL interface
 

8.25.9.1 Bindings for fnts_get_no_styles

C: int16_t fnts_get_no_styles ( FNT_DIALOG *fnt_dialog, int32_t id );
 
Binding:
 
int16_t fnts_get_no_styles ( FNT_DIALOG *fnt_dialog,
                             int32_t id )
{
   addr_in[0] = fnt_dialog;

   int_in[0]    = 0;
   int_in[1..2] = id;
   crys_if (184);

   return ( int_out[0] );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 184 # Function opcode
control+2 control[1] 3 # Entry in int_in
control+4 control[2] 1 # Entry in int_out
control+6 control[3] 1 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] fnt_dialog
int_in int_in[0] 0 # Sub-opcode
int_in+2 int_in[1..2] id
int_out int_out[0] Return value

8.25.10 fnts_get_style

Name: »Font selector get style ID« - Obtain ID of the n-th style of a font family.
 
Opcode: 184 (sub-opcode 1)
 
Syntax: int32_t fnts_get_style ( FNT_DIALOG *fnt_dialog, int32_t id, int16_t index );
 
Description: The call fnts_get_style obtains the ID of the n-th font of a font family. The following apply:
 

Parameter Meaning
fnt_dialog Pointer to management structure
id ID of a font of the family
index Index within the family

Hint: The parameter index must be a number between 1 and the result of fnts_get_no_styles.
 
Return value: This function returns ID of the index-th font of the family.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Font selection
 
See also: Binding   fnts_get_info   fnts_get_name   xFSL interface
 

8.25.10.1 Bindings for fnts_get_style

C: int32_t fnts_get_style ( FNT_DIALOG *fnt_dialog, int32_t id, int16_t index );
 
Binding:
 
int32_t fnts_get_style ( FNT_DIALOG *fnt_dialog, int32_t id,
                         int16_t index )
{
   addr_in[0] = fnt_dialog;

   int_in[0]    = 1;
   int_in[1..2] = id;
   int_in[3]    = index;
   crys_if (184);

   return ( int_out[0..1] );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 184 # Function opcode
control+2 control[1] 4 # Entry in int_in
control+4 control[2] 2 # Entry in int_out
control+6 control[3] 1 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] fnt_dialog
int_in int_in[0] 1 # Sub-opcode
int_in+2 int_in[1..2] id
int_in+6 int_in[3] index
int_out int_out[0..1] Return value

8.25.11 fnts_open

Name: »Font selector open window« - Open font selector in a window.
 
Opcode: 182
 
Syntax: int16_t fnts_open ( FNT_DIALOG *fnt_dialog, int16_t button_flags, int16_t x, int16_t y, int32_t id, fix31 pt, fix31 ratio );
 
Description: The call fnts_open opens a window dialog with the font selector. The following apply:
 
Parameter Meaning
   
fnt_dialog Pointer to management structure
button_flags Flags for supported buttons:
0x0001 = Select checkbox for names
0x0002 = Select checkbox for style
0x0004 = Select checkbox for height
0x0008 = Select checkbox for width/height ratio
0x0100 = Display checkbox for names
0x0200 = Display checkbox for style
0x0400 = Display checkbox for height
0x0800 = Display checkbox for width/height ratio
0x1000 = Width/height ratio adjustable
0x2000 = Button 'Set' selectable
0x4000 = Button 'Mark' selectable
x X-coordinate of the window's top left corner, or -1 (centred)
y Y-coordinate of the window's top left corner, or -1 (centred)
id Font ID
pt Height in 1/65536 point
ratio Width/height ratio in 1/65536
Return value: This function returns the AES handle of the window or 0 (error).
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Font selection
 
See also: Binding   fnts_close   xFSL interface
 

8.25.11.1 Bindings for fnts_open

C: int16_t fnts_open ( FNT_DIALOG *fnt_dialog, int16_t button_flags, int16_t x, int16_t y, int32_t id, fix31 pt, fix31 ratio );
 
Binding:
 
int16_t fnts_open ( FNT_DIALOG *fnt_dialog,
                     int16_t button_flags,
                    int16_t x, int16_t y, int32_t id,
                    fix31 pt, fix31 ratio )
{
   addr_in[0] = fnt_dialog;

   int_in[0]    = button_flags;
   int_in[1]    = x;
   int_in[2]    = y;
   int_in[3..4] = id;
   int_in[5..6] = pt;
   int_in[7..8] = ratio;
   crys_if (182);

   return ( int_out[0] );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 182 # Function opcode
control+2 control[1] 9 # Entry in int_in
control+4 control[2] 1 # Entry in int_out
control+6 control[3] 1 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] fnt_dialog
int_in int_in[0] button_flags
int_in+2 int_in[1] x
int_in+4 int_in[2] y
int_in+6 int_in[3..4] id
int_in+10 int_in[5..6] pt
int_in+14 int_in[7..8] ratio
int_out int_out[0] Return value

8.25.12 fnts_remove

Name: »Font selector remove user fonts« - Remove user's fonts from the font list.
 
Opcode: 185 (sub-opcode 1)
 
Syntax: void fnts_remove ( FNT_DIALOG *fnt_dialog );
 
Description: The call fnts_remove removes the fonts registered with fnts_add from the font list. The following applies:
 

Parameter Meaning
fnt_dialog Pointer to management structure

Hint: If a program's user fonts have been installed, then fnts_remove must be called before fnts_delete.
 
Return value: The function does not return a result.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Font selection
 
See also: Binding   fnts_delete   fnts_add   xFSL interface
 

8.25.12.1 Bindings for fnts_remove

C: void fnts_remove ( FNT_DIALOG *fnt_dialog );
 
Binding:
 
void fnts_remove ( FNT_DIALOG *fnt_dialog )
{
   addr_in[0] = fnt_dialog;
   int_in[0] = 1;
   crys_if (185);
}
GEM-Arrays:
 

Address Element Contents
control control[0] 185 # Function opcode
control+2 control[1] 1 # Entry in int_in
control+4 control[2] 0 # Entry in int_out
control+6 control[3] 1 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] fnt_dialog
int_in int_in[0] 1 # Sub-opcode

8.25.13 fnts_update

Name: »Font selector update window« - Update font selector.
 
Opcode: 185 (sub-opcode 2)
 
Syntax: int16_t fnts_update ( FNT_DIALOG *fnt_dialog, int16_t button_flags, int32_t id, fix31 pt, int32_t ratio );
 
Description: The call fnts_update ensures an update of the font selector. The following apply:
 
Parameter Meaning
   
fnt_dialog Pointer to management structure
button_flags Flags for supported buttons:
0x0001 = Select checkbox for the names
0x0002 = Select checkbox for the style
0x0004 = Select checkbox for the height
0x0008 = Select checkbox for the width/height ratio
0x0100 = Display checkbox for the names
0x0200 = Display checkbox for the style
0x0400 = Display checkbox for the height
0x0800 = Display checkbox for the width/height ratio
0x1000 = Width/height ratio adjustable
0x2000 = Button 'Set' selectable
0x4000 = Button 'Mark' selectable
id Font ID
pt Height in 1/65536 point
ratio Width/height ratio in 1/65536
Return value: The function returns one of the following values:
 

-1 = Function not present
0 = Error (insufficient memory), the font selector
    must then be closed with fnts_close().
1 = All OK
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
This function was not present in older versions of WDIALOG. The binding ensures that in that case intout[0] returns -1.
 
Group: Font selection
 
See also: Binding   fnts_close   xFSL interface
 

8.25.13.1 Bindings for fnts_update

C: int16_t fnts_update ( FNT_DIALOG *fnt_dialog, int16_t button_flags, int32_t id, fix31 pt, int32_t ratio );
 
Binding:
 
int16_t fnts_update ( FNT_DIALOG *fnt_dialog,
                      int16_t button_flags,
                      int32_t id, fix31 pt, int32_t ratio )
{
   addr_in[0] = fnt_dialog;

   int_in[0]    = 2;
   int_in[1]    = button_flags;
   int_in[2..3] = id;
   int_in[4..5] = pt;
   int_in[6..7] = ratio;
   crys_if (185);

   return ( int_out[0] );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 185 # Function opcode
control+2 control[1] 8 # Entry in int_in
control+4 control[2] 1 # Entry in int_out
control+6 control[3] 1 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] fnt_dialog
int_in int_in[0] 2
int_in+2 int_in[1] button_flags
int_in+4 int_in[2..3] id
int_in+8 int_in[4..5] pt
int_in+12 int_in[6..7] ratio
int_out int_out[0] Return value

8.25.14 Font selector in a window

Program start: fnts_create()
.
Calling the font selector: fnts_open()
.
Event loop: fnts_evnt()
.
......Possibly fnts_get_no_styles()/fnts_get_style()/...
(depending on the status of the checkboxes)
.
Closing the font selector: fnts_close()
.
Program end: fnts_delete()

8.25.15 Font selector in a modal dialog

Program start: fnts_create()
.
Calling the font selector: fnts_do()
.

......Possibly fnts_get_no_styles()/fnts_get_style()/...
(depending on status of the checkboxes)
.
Program end: fnts_delete()

Home AESAES Extended shell libraryExtended shell library AES function listAES function list