•  Back 
  •  XCONTROL Utility Functions 
  •  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-FileXCONTROL Utility Functions
Popup()                                                            XCONTROL

Syntax

WORD (*xcpb->Popup)( items, num_items, default, font, button, world );
CHAR *items[];
WORD num_items, default, font;
GRECT *button, *world;

Function      Popup() displays and controls user interaction with a popup
              menu.

Parameters    items points to an array of character pointers pointing to
              the text of the items. Each string must be padded in front
              with at least 2 spaces and should be of equal length (at
              least as long as the longest string). num_items specifies
              the number of items to display in the popup. If num_items
              exceeds five, the popup will only show three items with two
              arrows to allow scrolling. default indicates the default item
              (the default item is displayed with a checkmark) or -1 to
              indicate no default item. font specifies the font size
              (3 = large, 5 = small) of the items in the popup.
              button points to a GRECT containing the rectangular
              extent of the button pressed to call the popup. world points
              to a GRECT containing the current extent of the CPX work area.

Binding       ret = (*xcpb->Popup)( items, num_items, default, font,
                                    button, world );

Return Value  Popup() returns the item selected (0 based ) or -1 if no
              selection was made (the user clicked outside of the popup
              area).

Comments      This function is unique to CPX's and is not the same as
              menu_popup(). Button objects which are to be used as popups
              should be TOUCHEXIT objects. In addition, as a matter of
              style, popup buttons should be SHADOWED.

Group         XCONTROL Utility Functions