
GL_Menu(3GL) GraphLib 0.5a GL_Menu(3GL) 9Jul91 NAME GL_Menu - Type to use to create menus. GL_AttachButtonMenu - Put a menu as the action of a button. SYNTAX (Window)GL_Create(GL_Menu, <option>, [args,] ..., GL_Done); int GL_AttachButtonMenu(menu,button) Window menu,button; ARGUMENTS GL_Menu Type specifier for the GL_Create call GL_Done Mark to terminater variable arguments list. menu The menu to install in the button. button The button to install into. DESCRIPTION The first call to GL_Create creates a menu with the options as specified. The second call will attach an already created menu to an already created button. This call will return a status -- 1 if it succeeds 0 if it fails. The install call will fail if the button already has an action. Menus are subclassed off of Windows, and all of those options can therefore be used. OPTIONS GL_Menu*Colors, <unsigned long fgcolor,bgcolor> These options are currently not supported because the text objects do not support alternative colors. This will be fixed in a future release. GL_MenuFrame, <int width> This specifies the width of the frame. This value defaults to 1. GL_MenuShadow, <int width> This specifies the width of the shadow. This defaults to 0, which causes no shadow to be used. Shadow support is currently slightly broken, this will be fixed when the shadow is created as its own window as it should be done. GL_MenuFrameCol, <int framecol> ??? GL_MenuShadowCol, <int shadowcol> ??? - 1 - Formatted: July 4, 2025 GL_Menu(3GL) GraphLib 0.5a GL_Menu(3GL) 9Jul91 GL_ComplexMenuItem, This specifies that a complex menu item is about to be created. The effect of this call is a recursive call to GL_Create, and therefore this command must be terminated by a GL_Done. Options to this are GL_MItem* or GL_MSubMenu. GL_MenuItem, <char *itemname>, <VPTF action_function> This creates a menu item with the given name, and action function which will be called if that menu item is selected. GL_MenuWindow, <Window attachwin> This is the window which the menu will be popped up in when a button is pressed. This has to be done because the stupid XGrabPointer call will flush out ButtonRelease events if you click too quickly. GL_MItemMenu, ??? It has no handling function, and therefore use will cause a program to exit. GL_MItemName, <char *name> Specifies the name of a complex menu item. GL_MItemH, <int height> Specifies the height of a complex menu item. GL_MItemW, <int width> Specifies the width of a complex menu item. GL_MItemAction, <VPTF action> Specifies the action which should be taken if this item is selected. GL_MSubMenu, Specifies that a submenu should occur for this menu item. This option must have a similar terminating GL_Done to terminate the submenu. GL_MItemDim, Specifies that the item is dimmed. GL_MItemTitle, Specifies that this item is a title, this causes a line to be placed under the item, and also that it will not invert when the pointer is over that item. GL_MItemSeperator, Places a seperator, which is currently a line after the current item. - 2 - Formatted: July 4, 2025 GL_Menu(3GL) GraphLib 0.5a GL_Menu(3GL) 9Jul91 FEATURES? The documentor also did not write this section of the code and therefore does not understand what some of the options do. This problem should be fixed in a future release. SEE ALSO GL_Create(3GL), GL_TextObject(3GL), GL_Window(3GL), GL_Button(3GL), GraphLib Programming Manual - 3 - Formatted: July 4, 2025