•  Back 
  •  Menu library 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
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.15.2  menu_bar                                                   TOS

 Name:         »Menu bar« - Display, delete or install a menu bar.

 Opcode:       30

 Syntax:       int16_t menu_bar ( OBJECT *me_btree, int16_t me_bshow 
               );

 Description:  The call menu_bar performs various operations, depen- 
               ding on the parameter me_bshow:

                me_bshow  Meaning

                -3        Inquire low-WORD of an application's menu 
                          bar
                -2        Inquire high-WORD of an application's menu 
                          bar
                -1        Inquire owner (application) of the menu bar; 
                          as this can change continuously, the screen 
                          must be locked with wind_update to make a 
                          safe inquiry
                0         Delete menu bar specified in me_btree
                1         Draw menu bar specified in me_btree
                100       Install menu bar, without forcing a change- 
                          over of the top application

               Definitions:

               MENU_HIDE = 0
               MENU_SHOW = 1
               MENU_INSTL = 100

               Note: The parameter me_btree is a pointer to the object 
               tree of the corresponding menu. At termination of the 
               program one must not forget to remove the menu bar 
               again.

               With menu_bar(-2/-3) one can inquire the tree address 
               of an application's menu bar. menu_bar(-2) returns the 
               high-WORD and menu_bar(-3) the low-WORD. Only available 
               if the cookie 'MbAr' or 'AmAN' is present.

               OBJECT *get_menu(int apid)
               {
                 unsigned int hi = menu_bar((OBJECT *)apid, -2);
                 unsigned int lo = menu_bar((OBJECT *)apid, -3);
                 OBJECT *tree = (OBJECT *)(((unsigned long)hi << 16) | lo);
                 return tree;
               }

               The presence of the extended possibilities can be 
               checked for with appl_getinfo (opcode 6).

 Return value: An error has arisen only if the value 0 is returned. A 
               value of -1 signals that there is no owner of the menu 
               bar.

 Availability: All AES versions.

 Group:        Menu library

 See Also:     Binding   OBJECT