Home AESAES Event libraryEvent library Window libraryWindow library

8.8 Window-dialogs

The following functions were introduced with MagiC 4 and WDIALOG. They permit simple construction of dialog boxes in windows:

wdlg_close Closes a window-dialog
wdlg_create Creates a window-dialog
wdlg_delete Releases memory of closed window-dialog
wdlg_evnt Evaluates the dialog-events
wdlg_get_edit Obtains current editable field
wdlg_get_handle Obtains window ID of a dialog
wdlg_get_tree Obtains object tree of the window
wdlg_get_udata Obtains user data
wdlg_open Opens a window-dialog
wdlg_redraw Draws an object in a window-dialog
wdlg_set_edit Activates editable field in the dialog
wdlg_set_iconify Iconifies a window-dialog
wdlg_set_size Alters the size of a dialog
wdlg_set_tree Anchors a new object tree in the dialog
wdlg_set_uniconify Uniconifies a window-dialog

Note: The existence of these functions can be checked for with appl_getinfo (opcode 7).

See also: Window management   Style guidelines   WDIALOG

8.8.1 wdlg_close

Name: »Window-dialog close« - Close a window-dialog
 
Opcode: 162
 
Syntax: int16_t wdlg_close ( DIALOG *dialog, int16_t *x, int16_t *y );
 
Description: The function wdlg_close closes the window-dialog dialog. The following apply:
 
Parameter Meaning
   
dialog Pointer to the dialog structure
x Last X-coordinate, and
y Last Y-coordinate of the dialog's top left corner

Note: 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: The function always returns the value 1.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Window-dialogs
 
See also: Binding   wdlg_open
 

8.8.1.1 Bindings for wdlg_close

C: int16_t wdlg_close ( DIALOG *dialog, int16_t *x, int16_t *y );
 
Binding:
 
int16_t wdlg_close ( DIALOG *dialog, int16_t *x, int16_t *y )
{
  int_out[1] = -1;
  int_out[2] = -1;

  addr_in[0] = dialog;
  crys_if (162);

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

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

Address Element Contents
control control[0] 162 # 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] dialog
int_out int_out[0] Return value

8.8.2 wdlg_create

Name: »Window-dialog create« - Create a window-dialog
 
Opcode: 160
 
Syntax: DIALOG *wdlg_create ( HNDL_OBJ handle_exit, OBJECT *tree, void *user_data, int16_t code, void *data, int16_t flags );
 
Description: The function wdlg_create allocates memory for a dialog structure and initializes it. The following apply:
 
Parameter Meaning
   
handle_exit Pointer to the service function
tree Pointer to the object tree
user_data Pointer to user info
code Passed to handle_exitin HNDL_OBJ clicks
data Passed to handle_exitin HNDL_OBJ data
flags Various flags:
1 = Enable background operation
Return value: Pointer to the dialog structure.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Window-dialogs
 
See also: Binding   wdlg_open   wdlg_close
 

8.8.2.1 Bindings for wdlg_create

C: DIALOG *wdlg_create ( HNDL_OBJ handle_exit, OBJECT *tree, void *user_data, int16_t code, void *data, int16_t flags );
 
Binding:
 
DIALOG *wdlg_create ( HNDL_OBJ handle_exit, OBJECT *tree,
                      void *user_data, int16_t code,
                      void *data, int16_t flags )
{
   addr_in[0] = handle_exit;
   addr_in[1] = tree;
   addr_in[2] = user_data;
   addr_in[3] = data;

   int_in[0] = code
   int_in[1] = flags;

   crys_if (160);

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

Address Element Contents
control control[0] 160 # Function opcode
control+2 control[1] 2 # Entry in int_in
control+4 control[2] 0 # Entry in int_out
control+6 control[3] 4 # Entry in addr_in
control+8 control[4] 1 # Entry in addr_out
addr_in addr_in[0] handle_exit
addr_in+4 addr_in[1] tree
addr_in+8 addr_in[2] user_data
addr_in+12 addr_in[3] data
int_in int_in[0] code
int_in+2 int_in[1] flags
addr_out addr_out[0] Return value

8.8.3 wdlg_delete

Name: »Window-dialog delete« - Release memory used by a closed window-dialog
 
Opcode: 163
 
Syntax: int16_t wdlg_delete ( DIALOG *dialog );
 
Description: The function wdlg_delete releases the memory allocated for a window-dialog that has been closed. The following applies:
 

Parameter Meaning
dialog Pointer to the dialog structure
Return value: The function always returns the value 1.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Window-dialogs
 
See also: Binding   wdlg_close
 

8.8.3.1 Bindings for wdlg_delete

C: int16_t wdlg_delete ( DIALOG *dialog );
 
Binding:
 
int16_t wdlg_delete ( DIALOG *dialog )
{
   addr_in[0] = dialog;
   crys_if (163);

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

Address Element Contents
control control[0] 163 # Function opcode
control+2 control[1] 0 # 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] dialog
int_out int_out[0] Return value

8.8.4 wdlg_evnt

Name: »Window-dialog event« - Evaluate dialog-events
 
Opcode: 166
 
Syntax: int16_t wdlg_evnt ( DIALOG *dialog, EVNT *events );
 
Description: The call wdlg_evnt serves for evaluating or handling events in a window-dialog. The following apply:
 

Parameter Meaning
dialog Pointer to the dialog structure
events Pointer to the EVNT-structure

Note: This function must be called in an event-loop. The event-bits that refer to the window-dialog are cleared in the bit-vector mwhich. Following wdlg_evnt the EVNT-structure of the application can be used to evaluate the events intended for it.
 
If wdlg_evnt returns a 0, the window-dialog has to be closed (call (wdlg_close).
 
Note: The iconify-event is not supported by wdlg_evnt. Those wanting to install the Iconifier icon as a window object during wdlg_open therefore have to evaluate this event and process it themselves. The same applies if one wants to install the Sizer icon as an object.
 
Return value: The function returns the value 1 if no error has arisen. With a return value of 0, the dialog must be closed.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Window-dialogs
 
See also: Binding   wdlg_open   wdlg_close
 

8.8.4.1 Bindings for wdlg_evnt

C: int16_t wdlg_evnt ( DIALOG *dialog, EVNT *events );
 
Binding:
 
int16_t wdlg_evnt ( DIALOG *dialog, EVNT *events )
{
   addr_in[0] = dialog;
   addr_in[1] = events;

   crys_if (166);

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

Address Element Contents
control control[0] 166 # Function opcode
control+2 control[1] 0 # 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] dialog
addr_in+4 addr_in[1] events
int_out int_out[0] Return value

8.8.5 wdlg_get_edit

Name: »Window-dialog get edit« - Obtain current editable field
 
Opcode: 164 (sub-opcode 1)
 
Syntax: int16_t wdlg_get_edit ( DIALOG *dialog, int16_t *cursor );
 
Description: The function wdlg_get_edit returns the index of the current editable object. The following apply:
 
Parameter Meaning
   
dialog Pointer to the dialog structure
cursor Index of the character

Note: With old WDIALOG versions cursor is not returned. The binding ensures that -1 is entered in this case.
 
Return value: This function returns the index of the current editable object. If the result is 0, then no editable object is active at the present time.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Window-dialogs
 
See also: Binding   wdlg_open   wdlg_close
 

8.8.5.1 Bindings for wdlg_get_edit

C: int16_t wdlg_get_edit ( DIALOG *dialog, int16_t *cursor );
 
Binding:
 
int16_t wdlg_get_edit ( DIALOG *dialog, int16_t *cursor )
{
   addr_in[0] = dialog;

   int_in[0] = 1;

   int_out[1] = -1;

   crys_if (164);

   *cursor = int_out[1];

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

Address Element Contents
control control[0] 164 # Function opcode
control+2 control[1] 1 # 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] dialog
int_in int_in[0] 1 # Sub-opcode
int_out int_out[0] Return value
int_out+2 int_out[1] cursor

8.8.6 wdlg_get_handle

Name: »Window-dialog get window handle« - Obtain window ID of a dialog
 
Opcode: 164 (sub-opcode 3)
 
Syntax: int16_t wdlg_get_handle ( DIALOG *dialog );
 
Description: The call wdlg_get_handle obtains the window ID (the window-handle) of a window-dialog. The following apply:
 

Parameter Meaning
dialog Pointer to the dialog structure
Return value: The function returns the AES handle of the dialog-window.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Window-dialogs
 
See also: Binding   wind_find
 

8.8.6.1 Bindings for wdlg_get_handle

C: int16_t wdlg_get_handle ( DIALOG *dialog );
 
Binding:
 
int16_t wdlg_get_handle ( DIALOG *dialog )
{
   addr_in[0] = dialog;
   int_in[0] = 3;
   crys_if (164);

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

Address Element Contents
control control[0] 164 # 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] dialog
int_in int_in[0] 3 # Sub-opcode
int_out int_out[0] Return value

8.8.7 wdlg_get_tree

Name: »Window-dialog get tree« - Obtain object tree of the window
 
Opcode: 164 (sub-opcode 0)
 
Syntax: int16_t wdlg_get_tree ( DIALOG *dialog, OBJECT **tree, GRECT *r );
 
Description: The call wdlg_get_tree obtains the address of the object-tree displayed in the window. The following apply:
 

Parameter Meaning
dialog Pointer to the dialog structure
tree Pointer to object tree
r Pointer to GRECT

Note: In addition, the function returns the size of the working area of the window. If the dialog size has not been altered with wdlg_set_size, then the working area corresponds to the GRECT of the root object.
 
Return value: The function always returns the value 1.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Window-dialogs
 
See also: Binding   wdlg_get_handle
 

8.8.7.1 Bindings for wdlg_get_tree

C: int16_t wdlg_get_tree ( DIALOG *dialog, OBJECT **tree, GRECT *r );
 
Binding:
 
int16_t wdlg_get_tree ( DIALOG *dialog, OBJECT **tree,
                        GRECT *r )
{
   addr_in[0] = dialog;
   addr_in[1] = tree;
   addr_in[2] = r;

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

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

Address Element Contents
control control[0] 164 # Function opcode
control+2 control[1] 1 # Entry in int_in
control+4 control[2] 1 # Entry in int_out
control+6 control[3] 3 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] dialog
addr_in+4 addr_in[1] tree
addr_in+8 addr_in[2] r
int_in int_in[0] 0 # Sub-opcode
int_out int_out[0] Return value

8.8.8 wdlg_get_udata

Name: »Window-dialog get user data« - Obtain the user-data of a window-dialog
 
Opcode: 164 (sub-opcode 2)
 
Syntax: void *wdlg_get_udata ( DIALOG *dialog );
 
Description: The call wdlg_get_udata obtains the user data of a window-dialog. The following applies:
 

Parameter Meaning
dialog Pointer to the dialog structure
Return value: This function returns the variable user_data that was passed at the wdlg_create call.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Window-dialogs
 
See also: Binding   wdlg_get_handle
 

8.8.8.1 Bindings for wdlg_get_udata

C: void *wdlg_get_udata ( DIALOG *dialog );
 
Binding:
 
void *wdlg_get_udata ( DIALOG *dialog )
{
   addr_in[0] = dialog;
   int_in[0] = 2;
   crys_if (164);

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

Address Element Contents
control control[0] 164 # 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] 1 # Entry in addr_out
addr_in addr_in[0] dialog
int_in int_in[0] 2 # Sub-opcode
addr_out addr_out[0] Return value

8.8.9 wdlg_open

Name: »Window-dialog open« - Opens a window-dialog
 
Opcode: 161
 
Syntax: int16_t wdlg_open ( DIALOG *dialog, int8_t *title, int16_t kind, int16_t x, int16_t y, int16_t code, void *data );
 
Description: The call wdlg_open opens a window-dialog on the screen. The following apply:
 

Parameter Meaning
dialog Pointer to the dialog structure
title Pointer to the window name or 0L
kind Window components (NAME/MOVER/CLOSER)
x X-coord. of top L of dialog, or -1 (centred)
y Y-coord. of top L of dialog, or -1 (centred)
code Passed to handle_exit() in HNDL_OBJ clicks
data Passed to handle_exit() in HNDL_OBJ data

Note: Before wdlg_open returns to the caller, the service routine handle_exit() (see above) is called with the function number HNDL_OPEN.
 
Return value: Handle of the dialog window (0: Error)
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Window-dialogs
 
See also: Binding   wdlg_close   wdlg_delete
 

8.8.9.1 Bindings for wdlg_open

C: int16_t wdlg_open ( DIALOG *dialog, int8_t *title, int16_t kind, int16_t x, int16_t y, int16_t code, void *data );
 
Binding:
 
int16_t wdlg_open ( DIALOG *dialog, int8_t *title,
                    int16_t kind, int16_t x,
                    int16_t y, int16_t code, void *data )
{
   addr_in[0] = dialog;
   addr_in[1] = title;
   addr_in[2] = data;

   int_in[0] = kind;
   int_in[1] = x;
   int_in[2] = y;
   int_in[3] = code;

   crys_if (161);

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

Address Element Contents
control control[0] 161 # Function opcode
control+2 control[1] 4 # Entry in int_in
control+4 control[2] 1 # Entry in int_out
control+6 control[3] 3 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] dialog
addr_in+4 addr_in[1] title
addr_in+8 addr_in[2] data
int_in int_in[0] kind
int_in+2 int_in[1] x
int_in+4 int_in[2] y
int_in+6 int_in[3] code
int_out int_out[0] Return value

8.8.10 wdlg_redraw

Name: »Window-dialog redraw« - Draw an object in a window-dialog.
 
Opcode: 167
 
Syntax: void wdlg_redraw ( DIALOG *dialog, GRECT *rect, int16_t obj, int16_t depth );
 
Description: The call wdlg_redraw draws an object in a window-dialog while respecting the rectangle list of the window. The following apply:
 

Parameter Meaning
dialog Pointer to the dialog structure
rect Pointer to the bounding GRECT
obj Index of the start object
depth Index of the plane/depth

Note: If one wants to draw an object within the dialog then one should always use wdlg_redraw and not objc_draw. Before calling wdlg_redraw, just as before and after objc_draw, a wind_update call is necessary.
 
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: Window-dialogs
 
See also: Binding   objc_draw   WM_REDRAW
 

8.8.10.1 Bindings for wdlg_redraw

C: void wdlg_redraw ( DIALOG *dialog, GRECT *rect, int16_t obj, int16_t depth );
 
Binding:
 
void wdlg_redraw ( DIALOG *dialog, GRECT *rect, int16_t obj,
                   int16_t depth )
{
   addr_in[0] = dialog;
   addr_in[1] = rect;

   int_in[0] = obj;
   int_in[1] = depth;
   crys_if (167);
}
GEM-Arrays:
 

Address Element Contents
control control[0] 167 # Function opcode
control+2 control[1] 2 # 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] 0 # Entry in addr_out
addr_in addr_in[0] dialog
addr_in+4 addr_in[1] rect
int_in int_in[0] obj
int_in+2 int_in[1] depth

8.8.11 wdlg_set_edit

Name: »Window-dialog set edit object« - Activate editable field in the window-dialog
 
Opcode: 165 (sub-opcode 0)
 
Syntax: int16_t wdlg_set_edit ( DIALOG *dialog, int16_t obj );
 
Description: The call wdlg_set_edit activates an editable object. The following apply:
 

Parameter Meaning
dialog Pointer to the dialog structure
obj Index of the new editable object (or 0, if none is to be active)

Note: Activates an editable object, i.e. the cursor will be drawn in the specified object and deleted from any previously active object.
 
Return value: The function returns the number of the current edit object. The value 0 means that none ist active.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Window-dialogs
 
See also: Binding   wdlg_open   wdlg_close
 

8.8.11.1 Bindings for wdlg_set_edit

C: int16_t wdlg_set_edit ( DIALOG *dialog, int16_t obj );
 
Binding:
 
int16_t wdlg_set_edit ( DIALOG *dialog, int16_t obj )
{
   addr_in[0] = dialog;

   int_in[0] = 0;
   int_in[1] = obj;

   crys_if (165);

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

Address Element Contents
control control[0] 165 # Function opcode
control+2 control[1] 2 # 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] dialog
int_in int_in[0] 0 # Sub-opcode
int_in+2 int_in[1] obj
int_out int_out[0] Return-Wert

8.8.12 wdlg_set_iconify

Name: »Window-dialog iconify« - Iconify a window-dialog
 
Opcode: 165 (sub-opcode 3)
 
Syntax: int16_t wdlg_set_iconify ( DIALOG *dialog, GRECT *g, int8_t *title, OBJECT *tree, int16_t obj );
 
Description: The call wdlg_set_iconify permits the iconifying of a window-dialog. The following apply:
 

Parameter Meaning
dialog Pointer to the dialog structure
g Pointer to GRECT
title New window title, or NULL
tree New window tree, or NULL
obj Object to be centred or -1

Note: The new position of the window will be adopted normally from the message WM_ICONIFY; but it is also possible to let MagiC obtain this directly by passing coordinates of -1,-1,-1,-1.
 
The function alters the position and size of the root object. As, in general, one would like to display a different object tree for an iconified window, this can be specified in the parameter tree. The object tree normally consists of a root object (G_BOX) and an icon to be displayed of the type G_ICON or G_CICON. If the icon is to be displayed centred in the window, then one passes its object index in parameter obj.
 
When setting a new window title, one must bear in mind that at a later uniconify the user must restore the old title himself.
 
Return value: The function always returns the value 1.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7). This function is only present from WDIALOG 1.05 onwards. If it is not present, intout[0] contains a 0.
 
Group: Window-dialogs
 
See also: Binding   wdlg_set_uniconify
 

8.8.12.1 Bindings for wdlg_set_iconify

C: int16_t wdlg_set_iconify ( DIALOG *dialog, GRECT *g, int8_t *title, OBJECT *tree, int16_t obj );
 
Binding:
 
int16_t wdlg_set_iconify ( DIALOG *dialog, GRECT *g,
                           int8_t *title,
                           OBJECT *tree, int16_t obj )
{
   addr_in[0] = dialog;
   addr_in[1] = g;
   addr_in[2] = title;
   addr_in[3] = tree;

   int_in[0] = 3;
   int_in[1] = obj;

   crys_if (165);

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

Address Element Contents
control control[0] 165 # Function opcode
control+2 control[1] 2 # 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] dialog
addr_in+4 addr_in[1] g
addr_in+8 addr_in[2] title
addr_in+12 addr_in[3] tree
int_in int_in[0] 3 # Sub-opcode
int_in+2 int_in[1] obj
int_out int_out[0] Return value

8.8.13 wdlg_set_size

Name: »Window-dialog set size« - Alter the size of a window-dialog
 
Opcode: 165 (sub-opcode 2)
 
Syntax: int16_t wdlg_set_size ( DIALOG *dialog, GRECT *new_size );
 
Description: The call wdlg_set_size makes it possible to alter the size of a window-dialog. The following apply:
 
Parameter Meaning
   
dialog Pointer to the dialog structure
new_size New position and size of the window's working area

Note: The function can alter position or size of a window-dialog. If the root object is to be moved or enlarged then the object dimensions have to be altered before calling wdlg_set_size.
 
The buttons must always lie completely within the window's working area, as form_button pays no regard to the rectangle list. The normal use for wdlg_set_size are enlargeable dialogs that have a Sizer object at the bottom right corner.
 
Return value: The function always returns the value 1.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Window-dialogs
 
See also: Binding   wdlg_open   wdlg_close
 

8.8.13.1 Bindings for wdlg_set_size

C: int16_t wdlg_set_size ( DIALOG *dialog, GRECT *new_size );
 
Binding:
 
int16_t wdlg_set_size ( DIALOG *dialog, GRECT *new_size )
{
   addr_in[0] = dialog;
   addr_in[1] = new_size;

   int_in[0] = 2;
   crys_if (165);

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

Address Element Contents
control control[0] 165 # 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] dialog
addr_in+4 addr_in[1] new_size
int_in int_in[0] 2 # Sub-opcode
int_out int_out[0] Return value

8.8.14 wdlg_set_tree

Name: »Window-dialog set tree« - Anchor a new object tree in the window-dialog
 
Opcode: 165 (sub-opcode 1)
 
Syntax: int16_t wdlg_set_tree ( DIALOG *dialog, OBJECT *new_tree );
 
Description: The call wdlg_set_tree anchors a new object tree in a window-dialog. The following apply:
 

Parameter Meaning
dialog Pointer to the dialog
new_tree New object tree

Note: If the new root object has a different size, then the window size will be adapted automatically; the window contents will be updated in every case.
 
Return value: The function always returns the value 1.
 
Availability: The presence of this call should be checked for using appl_getinfo (Opcode 7).
 
Group: Window-dialogs
 
See also: Binding   wdlg_open   wdlg_close
 

8.8.14.1 Bindings for wdlg_set_tree

C: int16_t wdlg_set_tree ( DIALOG *dialog, OBJECT *new_tree );
 
Binding:
 
int16_t wdlg_set_tree ( DIALOG *dialog, OBJECT *new_tree )
{
   addr_in[0] = dialog;
   addr_in[1] = new_tree;

   int_in[0] = 1;
   crys_if (165);

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

Address Element Contents
control control[0] 165 # 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] dialog
addr_in+4 addr_in[1] new_tree
int_in int_in[0] 1 # Sub-opcode
int_out int_out[0] Return value

8.8.15 wdlg_set_uniconify

Name: »Window-dialog uniconify« - Uniconify a window-dialog
 
Opcode: 165 (sub-opcode 4)
 
Syntax: int16_t wdlg_set_uniconify ( DIALOG *dialog, GRECT *g, int8_t *title, OBJECT *tree );
 
Description: The call wdlg_set_uniconify makes it possible to uniconify a window-dialog. The following apply:
 

Parameter Meaning
dialog Pointer to the dialog
g New position of the window
title New window title, or NULL
tree New window tree, or NULL

Note: The new position of the window will be adopted normally from the message WM_UNICONIFY.
 
The function alters the position and size of the root object. As, in general, one has displayed a different object tree for an iconified window, the original tree can be specified in the parameter tree and so restored. With the parameter title one can set the old window title that was valid before the iconification.
 
Return value: The function always returns the value 1.
 
Availability: The presence of this function can be ascertained with appl_getinfo (opcode 7). This function is only present from WDIALOG 1.05 onwards. If it is not present, then intout[0] contains a 0.
 
Group: Window-dialogs
 
See also: Binding   wdlg_set_iconify
 

8.8.15.1 Bindings for wdlg_set_uniconify

C: int16_t wdlg_set_uniconify ( DIALOG *dialog, GRECT *g, int8_t *title, OBJECT *tree );
 
Binding:
 
int16_t wdlg_set_uniconify ( DIALOG *dialog, GRECT *g,
                             int8_t *title, OBJECT *tree )
{
   addr_in[0] = dialog;
   addr_in[1] = g;
   addr_in[2] = title;
   addr_in[3] = tree;

   int_in[0] = 4;

   crys_if (165);

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

Address Element Contents
control control[0] 165 # Function opcode
control+2 control[1] 1 # 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] dialog
addr_in+4 addr_in[1] g
addr_in+8 addr_in[2] title
addr_in+12 addr_in[3] tree
int_in int_in[0] 4 # Sub-opcode
int_out int_out[0] Return value

Home AESAES Event libraryEvent library Window libraryWindow library