PullDMenu.st
changeset 586 032b3245e53a
parent 572 121735c2aff6
child 593 86dd024ed773
equal deleted inserted replaced
585:8f395aba0173 586:032b3245e53a
    50     a pulled menu when clicked. Entries may be empty (i.e. have no menu)
    50     a pulled menu when clicked. Entries may be empty (i.e. have no menu)
    51     and empty entries may (optionally) also perform some action when clicked.
    51     and empty entries may (optionally) also perform some action when clicked.
    52     An entries selector is used as the key to define and access submenus
    52     An entries selector is used as the key to define and access submenus
    53     and (for empty entries:) the selector sent to the receiver of the menu.
    53     and (for empty entries:) the selector sent to the receiver of the menu.
    54 
    54 
    55     Instance variables:
    55     [Instance variables:]
    56 
    56 
    57       menus                   <Collection>    the sub menus
    57       menus                   <Collection>    the sub menus
    58 
    58 
    59       titles                  <Collection>    the strings in the menu
    59       titles                  <Collection>    the strings in the menu
    60 
    60 
    61       selectors               <Collection>    the selectors to send to the menu-
    61       selectors               <Collection>    the selectors to send to the menu-
    62 					      receiver (for empty pull-menus)
    62                                               receiver (for empty pull-menus)
    63 					      if nil (the default), title entries
    63                                               if nil (the default), title entries
    64 					      do not send anything.
    64                                               do not send anything.
    65 
    65 
    66       activeMenuNumber        <Number>        the index of the currently active menu
    66       activeMenuNumber        <Number>        the index of the currently active menu
    67 
    67 
    68       showSeparatingLines     <Boolean>       show separating lines between my menu-strings
    68       showSeparatingLines     <Boolean>       show separating lines between my menu-strings
    69 
    69 
    79       offLevel                <Integer>       3D level of entry-buttons when released
    79       offLevel                <Integer>       3D level of entry-buttons when released
    80 
    80 
    81       edgeStyle               <Symbol>        how to draw edges
    81       edgeStyle               <Symbol>        how to draw edges
    82 
    82 
    83       keepmenu                <Boolean>       if on, pulled menu stays on click,
    83       keepmenu                <Boolean>       if on, pulled menu stays on click,
    84 					      till clicked again (motif & windows behavior)
    84                                               till clicked again (motif & windows behavior)
    85 
    85 
    86       toggleKeep              <Boolean>       if on and keepMenu is on,
    86       toggleKeep              <Boolean>       if on and keepMenu is on,
    87 					      clicking again on label closes menu
    87                                               clicking again on label closes menu
    88 
    88 
    89      except menus, titles and selectors, instvars are usually defined from
    89      except menus, titles and selectors, instvars are usually defined from
    90      defaults in the styleSheet; you should not care for them.
    90      defaults in the styleSheet; you should not care for them.
    91 
    91 
    92 
    92 
    93     StyleSheet values:
    93     [StyleSheet values:]
    94 
    94 
    95       pullDownMenuViewBackground              view background Color for the menu bar
    95       pullDownMenuViewBackground              view background Color for the menu bar
    96 					      default: menuViewBackground
    96                                               default: menuViewBackground
    97 
    97 
    98       pullDownMenuForegroundColor             foreground drawing color for the menu bar
    98       pullDownMenuForegroundColor             foreground drawing color for the menu bar
    99 					      default: menuForegroundColor
    99                                               default: menuForegroundColor
   100 
   100 
   101       pullDownMenuBackgroundColor             background drawing color for the menu bar
   101       pullDownMenuBackgroundColor             background drawing color for the menu bar
   102 					      default: menuBackgroundColor
   102                                               default: menuBackgroundColor
   103 
   103 
   104       pullDownMenuHilightForegroundColor      active foreground drawing color for the menu bar
   104       pullDownMenuHilightForegroundColor      active foreground drawing color for the menu bar
   105 					      default: menuHilightForegroundColor
   105                                               default: menuHilightForegroundColor
   106 
   106 
   107       pullDownMenuHilightBackgroundColor      active background drawing color for the menu bar
   107       pullDownMenuHilightBackgroundColor      active background drawing color for the menu bar
   108 					      default: menuHilightBackgroundColor
   108                                               default: menuHilightBackgroundColor
   109 
   109 
   110       pullDownMenuHilightLevel                level (3D only) when active
   110       pullDownMenuHilightLevel                level (3D only) when active
   111 					      default: menuHilightLevel
   111                                               default: menuHilightLevel
   112 
   112 
   113       pullDownMenuEdgeStyle                   edge style (nil or #soft)
   113       pullDownMenuEdgeStyle                   edge style (nil or #soft)
   114 
   114 
   115       pullDownMenuKeepMenu                    if true, pulled menu stays open until button
   115       pullDownMenuKeepMenu                    if true, pulled menu stays open until button
   116 					      is pressed again outside of the item-area (motif behavior)
   116                                               is pressed again outside of the item-area (motif behavior)
   117 					      if false, menu closes on release (default)
   117                                               if false, menu closes on release (default)
   118 
   118 
   119       pullDownMenuToggleKeep                  if true, pulled menu closes when an entry is pressed
   119       pullDownMenuToggleKeep                  if true, pulled menu closes when an entry is pressed
   120 					      again. Otherwise, only press outside of the items area
   120                                               again. Otherwise, only press outside of the items area
   121 					      hides it. default is false
   121                                               hides it. default is false
   122 
   122 
   123       pullDownMenuLevel                       level (3D only)
   123       pullDownMenuLevel                       level (3D only)
   124 
   124 
   125       pullDownMenuFont                        font to use for the menu bar
   125       pullDownMenuFont                        font to use for the menu bar
   126 					      default: menuFont
   126                                               default: menuFont
   127 
   127 
   128       pullDownMenuShowSeparatingLines         if true, lines are drawn between items.
   128       pullDownMenuShowSeparatingLines         if true, lines are drawn between items.
   129 					      default: false
   129                                               default: false
   130 
   130 
   131       pullDownMenuRaiseTop                    if true, topview is raised whenever an entry
   131       pullDownMenuRaiseTop                    if true, topview is raised whenever an entry
   132 					      is activated.
   132                                               is activated.
   133 					      default: true
   133                                               default: true
       
   134 
       
   135     [author:]
       
   136         Claus Gittinger
   134 "
   137 "
   135 !
   138 !
   136 
   139 
   137 examples 
   140 examples 
   138 "
   141 "
  1484 ! !
  1487 ! !
  1485 
  1488 
  1486 !PullDownMenu class methodsFor:'documentation'!
  1489 !PullDownMenu class methodsFor:'documentation'!
  1487 
  1490 
  1488 version
  1491 version
  1489     ^ '$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.47 1996-04-22 22:19:32 cg Exp $'
  1492     ^ '$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.48 1996-04-25 17:30:34 cg Exp $'
  1490 ! !
  1493 ! !