home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / bgui.lzx / bgui / Classes / PopButtonClass / popbuttonclass.doc < prev    next >
Encoding:
Text File  |  1995-08-19  |  4.9 KB  |  161 lines

  1.  
  2.            File: popbuttonclass.doc
  3.     Description: PopButtonClass documentation.
  4.       Copyright: (C) Copyright 1995 Jaba Development.
  5.              (C) Copyright 1995 Jan van den Baard.
  6.              All Rights Reserved.
  7.  
  8. ------------------------------------------------------------------------------
  9.  
  10. TABLE OF CONTENTS
  11.  
  12. popbuttonclass/--background--
  13. popbuttonclass/Methods
  14. popbuttonclass/Attributes
  15.  
  16. popbuttonclass/--background--             popbuttonclass/--background--
  17.  
  18.     NAME
  19.     Class:        popbuttonclass
  20.     Superclass:    baseclass
  21.     Include File:    "PopButtonClass.h"
  22.  
  23.     FUNCTION
  24.     To provide you with a class simular  to the  cycle  class in  pop-menu
  25.     mode. This class however appears to be a button gadget which will snap
  26.     down a menu for the user to select an entry without  changing anything
  27.     to the apperance of the object itself.
  28.  
  29.     Also a checkable (toggle)  mode  with or  without mutual  exclusion is
  30.     supported.
  31.  
  32.     Sunmouse/Sunkey/AutoPopWindowToFront etc. tools  may  cause  confusion
  33.     in combination with this class. When another window is activated while
  34.     the popmenu is up  intuition will  automatically  deactivate  the menu
  35.     selection.
  36.  
  37.     Objects  from  this  class  send out  the following attribute pairs in
  38.     their notification messages:
  39.  
  40.     GA_ID            - Gadget object ID.
  41.     PMB_MenuNumber        - Number of the selected menu.
  42.  
  43.     Also your program must open the following libraries:
  44.  
  45.     intuition.library    - V37 or better.
  46.     graphics.library    - V37 or better.
  47.     utility.library         - V37 or better.
  48.     bgui.library        - V39 or better.
  49.  
  50.     Ofcourse these libraries must remain open until you are done using the
  51.     class.
  52.  
  53. popbuttonclass/Methods                    popbuttonclass/Methods
  54.  
  55.     NEW METHODS
  56.     PMBM_CHECK_STATUS -- This method must  be  used to  see if  a  menu is
  57.         checked or not.   The  following  custom  message structure is
  58.         used:
  59.  
  60.         struct pmbmCommand {
  61.             ULONG        MethodID;
  62.             ULONG        pmbm_MenuNumber;
  63.         };
  64.  
  65.         pmbm_MenuNumber -- This must be the ordinal number of the menu
  66.             on which the action is done. Please note that you must
  67.             make sure that this value  is in  range  otherwise you
  68.             definitly will get enforcer hits.
  69.  
  70.         Returns TRUE when the menu is checked and FALSE if not.
  71.  
  72.     PMBM_CHECK_MENU -- Use this method to check a menu.   It uses the same
  73.         message structure as PMB_CHECK_STATUS.
  74.  
  75.     PMBM_UNCHECK_MENU -- Use this method to un-check a menu.  It  uses the
  76.         same message structure as PMB_CHECK_STATUS.
  77.  
  78.     CHANGED METHODS
  79.     None.
  80.  
  81. popbuttonclass/Attributes                 popbuttonclass/Attributes
  82.  
  83.     NOTE
  84.     All  baseclass    attributes  are  also  valid  for this class. Also the
  85.     vectorclass attributes can be used with  OM_SET on objects  from  this
  86.     class.
  87.  
  88.     NAME
  89.     PMB_Image -- ( struct Image * )
  90.  
  91.     FUNCTION
  92.     To provide the object with a standard Intuition image or BOOPSI image.
  93.     The image will be centered inside the object it's hitbox.   This  will
  94.     override any vectorclass image.
  95.  
  96.     Default is NULL. Applicability is (IS).
  97.  
  98.     NAME
  99.     PMB_MenuEntries -- ( UBYTE ** )
  100.  
  101.     FUNCTION
  102.     To   specify  the  actual  menu  entries.     This  must  point  to an
  103.     array of PopMenu structures. The array must be terminated with    a NULL
  104.     pm_Label entry.
  105.  
  106.     struct PopMenu {
  107.         UBYTE        *pm_label;
  108.         UWORD         pm_Flags;
  109.         ULONG         pm_MutualExclude;
  110.     };
  111.  
  112.     pm_Label -- This should be a pointer to  a  0-terminated  string which
  113.         contains the text for this menu.  You can specify PMB_BARLABEL
  114.         here to get a seperator bar simular to the seperator  bar used
  115.         by gadtools. If you make this NULL the array is terminated.
  116.  
  117.     pm_Flags -- The following two flags are supported:
  118.  
  119.         PMF_CHECKIT -- When set, this flag tell's the class  that this
  120.             menu should toggle it's selected  status.  A checkmark
  121.             image is shown when the menu is selected.
  122.  
  123.         PMF_CHECKED -- When set the menu is selected.
  124.  
  125.     pm_MutualExclude -- This 32 bit value can  hold bits  which  represent
  126.         menus which should be de-selected when this menu is checked.
  127.  
  128.         Each set bit means to  exclude    a menu.  I.E. When bit four is
  129.         set the fourth menu is de-selected if it is a  checkable item.
  130.  
  131.         NOTE: Mutually-excluded   items   will     *not*     trigger   any
  132.         notification so you are responsible to keep track of this.
  133.  
  134.         Please take a look at the supplied demo for a working example.
  135.  
  136.     The class will make a private copy of the PopMenu  array so  the menus
  137.     may be used on more than one object.
  138.  
  139.     Default is NULL. Applicability is (IS).
  140.  
  141.     NAME
  142.     PMB_MenuNumber -- ( ULONG )
  143.  
  144.     FUNCTION
  145.     This  attribute  holds    the  ordinal number of the last selected menu.
  146.     When your application is notified  by the  gadget  you    should    OM_GET
  147.     this attribute to find out which menu was selected.
  148.  
  149.     Applicability is (GN).
  150.  
  151.     NAME
  152.     PMB_PopPosition -- ( ULONG )
  153.  
  154.     FUNCTION
  155.     To make the class pop the menu    with a    specific  entry as  the  first
  156.     one activated. When the object is activated by a mouse-click  the menu
  157.     will try to open with the specified item under the mouse pointer. Key-
  158.     board activation will simple pop the menu with the item selected.
  159.  
  160.     Applicability is (I).
  161.