Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File8.11.14 xfrm_popup TOS Name: »XForm popup« - Manage a popup menu (extended MagiC version). Opcode: 135 Syntax: int16_t xfrm_popup( OBJECT *tree, int16_t x, int16_t y, int16_t firstscrlob, int16_t lastscrlob, int16_t nlines, void cdecl (*init)(OBJECT *tree, int16_t scrollpos, int16_t nlines, void *param), void *param, int16_t *lastscrlpos ) Description: The call xfrm_popup displays a popup menu on the screen, and takes on its management. The followiong apply: Parameter Meaning tree Address of the object tree x X-coordinate, and y Y-coordinate around which the box is to be centered firstscrlob Object index of the first scrollable object lastscrlob Object index of the last scrollable object nlines Number of lines actually present init Callback routine for translating the objects. tree, param and nlines are the parameters that were passed in xfrm_popup. scrollpos specifies the current scroll position. It lies at: 0..(nlines- (lastscrlob-firstscrlob+1). If the popup should not scroll, init == NULL must be passed. param User-defined parameter lastscrlpos Last scroll position Note: If the parameters x and y have the value 0, then the corresponding values from the object structure will be respected, and the centering is abandoned. At all times the function ensures that the complete popup is displayed on the screen. Selectable objects must have the status SELECTABLE and non-selectable objects the status DISABLED assigned. The object with the index 0 in the object tree should be of the type G_BOX or G_IBOX. 1. The object tree is initialized automatically by a call of the init routine before the first drawing action. 2. The variable scrollpos need not be initialized, as the system always start at scrollpos 0. 3. The init routine is responsible for initializing the first and/or last scroll object with an arrow. 4. The scrollable objects are firstscrlob ... lastscrlob. The object indices must be consecutive numbers. The objects must lie directly below each other and all must have the same size. Return value: The function returns the index of the selected object from the popup menu, else the value -1. Availability: The function is available as of MagiC 5.03. Group: Form library See Also: Binding OBJECT form_popup