home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / Vk / VkMenuItem.z / VkMenuItem
Encoding:
Text File  |  2002-10-03  |  12.4 KB  |  331 lines

  1.  
  2.  
  3.  
  4. VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))                                                  VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      VkMenuItem - Abstract base class for all ViewKit menu classes
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      VkComponent : VkCallbackObject
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <Vk/VkMenuItem.h>
  16.  
  17.  
  18. PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  19.    MMMMaaaannnniiiippppuuuullllaaaattttiiiinnnngggg MMMMeeeennnnuuuu IIIItttteeeemmmmssss
  20.            void activate();
  21.            void deactivate();
  22.            int remove();
  23.            void show();
  24.            void hide();
  25.            virtual void setLabel(const char * str);
  26.            void setPosition(int pos);
  27.  
  28.  
  29.  
  30.    AAAAcccccccceeeessssssss FFFFuuuunnnnccccttttiiiioooonnnnssss
  31.            virtual const char* className();
  32.            virtual Boolean isContainer();
  33.  
  34.  
  35. SSSSUUUUBBBBCCCCLLLLAAAASSSSSSSS PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  36.    CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr////DDDDeeeessssttttrrrruuuuccccttttoooorrrr
  37.            VkMenuItem( );
  38.            VkMenuItem(const char * itemName);
  39.  
  40.  
  41.    MMMMaaaannnnaaaaggggiiiinnnngggg eeeennnnttttrrrriiiieeeessss
  42.            static  void    manageAll();
  43.  
  44.  
  45.  
  46. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  47.      VkMenuItem is an abstract class that defines the basic behavior of all
  48.      menu objects supported by the ViewKit. There are two types of classes
  49.      derived from VkMenuItem. The first serve as containers. These correspond
  50.      to the menu types supported by Motif: popup menus, pulldown menu panes,
  51.      menubars, and option menus. The second type of derived classes can be
  52.      used as individually selectable items in a menu. These include actions,
  53.      toggles, labels, separators, and so on.
  54.  
  55.      For the most part, the classes derived from VkMenuItem have a direct
  56.      correspondence to a Motif widget. An action (a VkMenuAction object)
  57.      represents an XmPushButton gadget along with an associated callback.
  58.      However, the ViewKit menus offer several advantages over directly using
  59.      Motif widgets. First, all menu items can be manipulated more easily than
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))                                                  VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))
  71.  
  72.  
  73.  
  74.      widgets. All items can be displayed, activated, or deactivated with a
  75.      single function call.  Items can also be moved, or replaced by other
  76.      items easily. For example an action item in a menu pane can be replaced
  77.      by a cascading pulldown menu with a single function call.
  78.  
  79.      The various VkMenuItem classes also hide the somewhat confusing
  80.      organization of Motif cascade and option menus. For example, a menu pane
  81.      is just a type of menu item that can contain other items. The items in a
  82.      menu pane might include actions, toggles, labels, or other menu panes.
  83.      There are not confusing submenu id's to work with.
  84.  
  85.      Menus are also constructed in the most efficient manner possible. Widgets
  86.      within a menu hierarchy are managed in groups in a completely transparent
  87.      way.
  88.  
  89.      VkMenuItem is derived from VkComponent, and follows most of the
  90.      conventions associated with component. However, unlike most components,
  91.      all menu items defer the creation of widgets. When constructing menus,
  92.      objects are instantiated and organized into a hierarchy, but no widgets
  93.      are created.  When the menu is to be displayed, applications must call
  94.      the _b_u_i_l_d() member function for the top of the menu hierarchy. This
  95.      creates and manages all widgets at once.
  96.  
  97.    DDDDeeeerrrriiiivvvviiiinnnngggg SSSSuuuubbbbccccllllaaaasssssssseeeessss
  98.      Most common types of menu items are already defined within the ViewKit,
  99.      and it is not recommended that new classes be derived directly from
  100.      VkMenuItem.  Various classes derived from VkMenuItem may be candidates
  101.      for further derivation. See the individual derived classes for more
  102.      information.
  103.  
  104. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  105.    sssshhhhoooowwww
  106.            void show(Widget parent);
  107.            void show();
  108.  
  109.  
  110.           Like most components, all menu items are displayed by calling _s_h_o_w()
  111.           at the desired time. For VkMenuItems, _s_h_o_w() works slightly
  112.           differently. Because the construction of the widgets associated with
  113.           menu items is delayed, show may take an argument that specifies the
  114.           parent of the menu hierarchy to be built. It is only necessary to
  115.           call _s_h_o_w() for the top-most object in a menu hierarchy. All other
  116.           objects will be constructed automatically. The parent argument to
  117.           _s_h_o_w() is only effective the first time it is called. Menus cannot
  118.           be reparented after they are constructed.
  119.  
  120.           When called after the menu has been created or with no arguments,
  121.           _s_h_o_w() simply sets the state of an item such that it is, or will be
  122.           visible. By default, all items will be visible when they are first
  123.           constructed. See _h_i_d_e() for more information.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))                                                  VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))
  137.  
  138.  
  139.  
  140.    aaaaccccttttiiiivvvvaaaatttteeee
  141.            void activate();
  142.  
  143.  
  144.           Makes an item active so that it accepts input.
  145.  
  146.    ddddeeeeaaaaccccttttiiiivvvvaaaatttteeee
  147.            void deactivate();
  148.  
  149.  
  150.           Make an item inactive so that it cannot be selected. Any item can be
  151.           active or inactive.
  152.  
  153.    rrrreeeemmmmoooovvvveeee
  154.            int remove();
  155.  
  156.  
  157.           Removes the item from the menu hierarchy that contains it. The item
  158.           is not destroyed.
  159.  
  160.    hhhhiiiiddddeeee
  161.            void hide();
  162.  
  163.  
  164.           Marks an item as not visible Calling _h_i_d_e() on a currently visible
  165.           item unmanages the widget associated with the item. Calling _h_i_d_e()
  166.           for an item before the menu has been constructed marks the item so
  167.           that it will not appear when _b_u_i_l_d() is called. Calling _s_h_o_w()
  168.           reverses the effects of _h_i_d_e().
  169.  
  170.    sssseeeettttLLLLaaaabbbbeeeellll
  171.            virtual void setLabel(const char *str);
  172.  
  173.  
  174.           It is sometimes necessary to programmatically set the label of an
  175.           item.  (Generally labels are retrieved from the item's
  176.           XmNlabelString resource in the resource database.) This function
  177.           allows labels to be set programmatically, without losing the ability
  178.           to set labels in the resource file. The given string is treated as
  179.           the name of a resource to be retrieved from the resource database.
  180.           If no such resource is found, the string is treated as the actual
  181.           label to be displayed.
  182.  
  183.    sssseeeettttPPPPoooossssiiiittttiiiioooonnnn
  184.            void setPosition(int pos);
  185.  
  186.      Specify a specific position within a menu pane or menubar at which this
  187.      item should appear.
  188.  
  189.    ccccllllaaaassssssssNNNNaaaammmmeeee
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))                                                  VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))
  203.  
  204.  
  205.  
  206.            virtual const char* className();
  207.  
  208.  
  209.           The class name of this class is "VkMenuItem".
  210.  
  211.    iiiissssCCCCoooonnnnttttaaaaiiiinnnneeeerrrr
  212.            virtual Boolean isContainer();
  213.  
  214.  
  215.           This function returns TRUE if an object is one of the container
  216.           types of menu items.
  217.  
  218.    VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm
  219.            VkMenuItem();
  220.            VkMenuItem(const char* itemName);
  221.  
  222.  
  223.           Initialize the data members of a VkMenuItem object.
  224.  
  225.    ~~~~VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm
  226.            ~VkMenuItem();
  227.  
  228.  
  229.           Frees all memory associated with a VkMenuItem object. If the object
  230.           is a member of a menu, the object is removed from that menu.
  231.  
  232.    mmmmaaaannnnaaaaggggeeeeAAAAllllllll
  233.            static  void    manageAll();
  234.  
  235.  
  236.  
  237.  
  238. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  239.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
  240.           installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
  241.           setDefaultResources(), getResources(), manage(), unmanage(),
  242.           baseWidget(), okToQuit(), _name, _baseWidget, _w, deleteCallback
  243.  
  244.  
  245.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCaaaallllllllbbbbaaaacccckkkkOOOObbbbjjjjeeeecccctttt
  246.           callCallbacks(), addCallback(), removeCallback(),
  247.           removeAllCallbacks()
  248.  
  249.  
  250.  
  251. KKKKNNNNOOOOWWWWNNNN DDDDEEEERRRRIIIIVVVVEEEEDDDD CCCCLLLLAAAASSSSSSSSEEEESSSS
  252.      VkMenuAction, VkMenuConfirmFirstAction, VkMenuActionObject,
  253.      VkMenuActionWidget, VkMenuToggle, VkMenuUndoManager, VkMenuLabel,
  254.      VkMenuSeparator, VkMenu, VkOptionMenu, VkSubMenu, VkHelpPane,
  255.      VkRadioSubMenu, VkMenuBar VkPopupMenu,
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))                                                  VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))
  269.  
  270.  
  271.  
  272. CCCCLLLLAAAASSSSSSSSEEEESSSS UUUUSSSSEEEEDDDD BBBBYYYY TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  273.      VkMenu
  274.  
  275. KKKKNNNNOOOOWWWWNNNN CCCCLLLLAAAASSSSSSSSEEEESSSS TTTTHHHHAAAATTTT UUUUSSSSEEEE TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  276.      VkGraph, VkMenu, VkMenuBar, VkMenuItem, VkMenuUndoManager, VkOptionMenu,
  277.      VkPopupMenu, VkSubMenu, VkWindow
  278.  
  279. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  280.      VkComponent, VkGraph, VkMenu, VkMenuBar, VkMenuUndoManager, VkOptionMenu,
  281.      VkPopupMenu, VkSubMenu, VkWindow
  282.      _V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
  283.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
  284.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
  285.      _T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.