home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / XfeWidgets / Xfe / MenuUtil.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  5.1 KB  |  137 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. /*-----------------------------------------*/
  19. /*                                                                        */
  20. /* Name:        <Xfe/MenuUtil.h>                                        */
  21. /* Description:    Menu/RowColum misc utilities header.                    */
  22. /* Author:        Ramiro Estrugo <ramiro@netscape.com>                    */
  23. /*                                                                        */
  24. /*----------------------------------------------------------------------*/
  25.  
  26.  
  27. #ifndef _XfeMenuUtil_h_                            /* start MenuUtil.h        */
  28. #define _XfeMenuUtil_h_
  29.  
  30. #include <Xm/Xm.h>                                /* Motif public defs    */
  31.  
  32. #ifdef __cplusplus                                /* start C++            */
  33. extern "C" {
  34. #endif
  35.  
  36. /*----------------------------------------------------------------------*/
  37. /*                                                                        */
  38. /* Menus                                                                */
  39. /*                                                                        */
  40. /*----------------------------------------------------------------------*/
  41. extern void
  42. XfeMenuPositionXY                (Widget            menu,
  43.                                  Position        x_root,
  44.                                  Position        y_root);
  45. /*----------------------------------------------------------------------*/
  46. extern int
  47. XfeMenuItemPositionIndex        (Widget            item);
  48. /*----------------------------------------------------------------------*/
  49. extern Widget
  50. XfeMenuItemAtPosition            (Widget            menu,
  51.                                  int            position);
  52. /*----------------------------------------------------------------------*/
  53. extern Boolean
  54. XfeMenuIsFull                    (Widget            menu);
  55. /*----------------------------------------------------------------------*/
  56. extern Widget
  57. XfeMenuFindLastMoreMenu            (Widget            menu,
  58.                                  String            more_button_name);
  59. /*----------------------------------------------------------------------*/
  60. extern Widget
  61. XfeMenuGetMoreButton            (Widget            menu,
  62.                                  String            more_button_name);
  63. /*----------------------------------------------------------------------*/
  64. extern Widget
  65. XfeCascadeGetSubMenu            (Widget            w);
  66. /*----------------------------------------------------------------------*/
  67. extern unsigned char
  68. XfeMenuType                        (Widget            menu);
  69. /*----------------------------------------------------------------------*/
  70.  
  71.  
  72. /*----------------------------------------------------------------------*/
  73. /*                                                                        */
  74. /* Option menus                                                            */
  75. /*                                                                        */
  76. /*----------------------------------------------------------------------*/
  77. extern Boolean
  78. XfeMenuIsOptionMenu                (Widget            menu);
  79. /*----------------------------------------------------------------------*/
  80. extern void
  81. XfeOptionMenuSetItem            (Widget            menu,
  82.                                  Cardinal        i);
  83. /*----------------------------------------------------------------------*/
  84.  
  85. /*----------------------------------------------------------------------*/
  86. /*                                                                        */
  87. /* Menu item functions.                                                    */
  88. /*                                                                        */
  89. /*----------------------------------------------------------------------*/
  90. extern Widget
  91. XfeMenuItemNextItem                (Widget            item);
  92. /*----------------------------------------------------------------------*/
  93. extern Widget
  94. XfeMenuItemPreviousItem            (Widget            item);
  95.  
  96. /*----------------------------------------------------------------------*/
  97. /*                                                                        */
  98. /* Public accent drawing functions.                                        */
  99. /*                                                                        */
  100. /*----------------------------------------------------------------------*/
  101. extern void
  102. XfeMenuItemDrawAccent            (Widget            item,
  103.                                  unsigned char    accent_type,
  104.                                  Dimension        offset_left,
  105.                                  Dimension        offset_right,
  106.                                  Dimension        shadow_thickness,
  107.                                  Dimension        accent_thickness);
  108. /*----------------------------------------------------------------------*/
  109. extern void
  110. XfeMenuItemEraseAccent            (Widget            item,
  111.                                  unsigned char    accent_type,
  112.                                  Dimension        offset_left,
  113.                                  Dimension        offset_right,
  114.                                  Dimension        shadow_thickness,
  115.                                  Dimension        accent_thickness);
  116. /*----------------------------------------------------------------------*/
  117.  
  118. /*----------------------------------------------------------------------*/
  119. /*                                                                        */
  120. /* Display grabbed access.                                                */
  121. /*                                                                        */
  122. /*----------------------------------------------------------------------*/
  123. extern Boolean
  124. XfeDisplayIsUserGrabbed            (Widget                w);
  125. /*----------------------------------------------------------------------*/
  126. extern void
  127. XfeDisplaySetUserGrabbed        (Widget                w,
  128.                                  Boolean            grabbed);
  129. /*----------------------------------------------------------------------*/
  130.  
  131.  
  132. #ifdef __cplusplus                                /* end C++                */
  133. }
  134. #endif
  135.  
  136. #endif                                            /* end MenuUtil.h        */
  137.