•  Back 
  •  Form Library 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-Fileform_do()
form_keybd()
Form Library
form_button()                                                           AES

Syntax

WORD form_button( tree, obj, clicks, newobj )
OBJECT *tree;
WORD obj, clicks, newobj;

Function       form_button() is a utility function designed to aid in the
               creation of a custom form_do() handler.

Opcode         56 (0x38)

Availability   All AES versions.

Parameters     tree is a pointer to a valid object tree in memory you wish
               to process button events for. obj is the object index into
               tree which was clicked on and which needs to be processed.
               clicks is the number of times the mouse button was
               clicked.
               newobj returns the next object to gain edit focus or 0 if
               there are no editable objects. If the top bit of newobj is
               set, this indicates that a TOUCHEXIT object was
               double-clicked.

Binding        intin[0] = obj;
               intin[1] = clicks;

               addrin[0] = tree;

               crys_if(0x38);

               *newobj = intout[1];

               return intout[0];

Return Value   form_button() returns a 0 if it exits finding an EXIT or
               TOUCHEXIT object selected or 1 otherwise.

Comments       To use this function properly, the application should take
               the following steps:

                 1. Monitor mouse clicks with
                    evnt_multi() or evnt_button().
                 2. When a click occurs, use objc_find() to determine if
                    the click occurred over the object.
                 3. If so, call form_button() with the appropriate
                    values.

               This function was not originally documented by Atari.
               You may have to add bindings for this function to some
               earlier 'C' compilers.

See Also       form_do(), form_keybd()

Group          Form Library