SimpleMenu.h

Go to the documentation of this file.
00001 /*
00002  * $XConsortium: SimpleMenu.h,v 1.22 94/04/17 20:12:47 kaleb Exp $
00003  *
00004 Copyright (c) 1989, 1994  X Consortium
00005 
00006 Permission is hereby granted, free of charge, to any person obtaining a copy
00007 of this software and associated documentation files (the "Software"), to deal
00008 in the Software without restriction, including without limitation the rights
00009 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00010 copies of the Software, and to permit persons to whom the Software is
00011 furnished to do so, subject to the following conditions:
00012 
00013 The above copyright notice and this permission notice shall be included in
00014 all copies or substantial portions of the Software.
00015 
00016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00017 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00018 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00019 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00020 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00021 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00022 
00023 Except as contained in this notice, the name of the X Consortium shall not be
00024 used in advertising or otherwise to promote the sale, use or other dealings
00025 in this Software without prior written authorization from the X Consortium.
00026  *
00027  * Author:  Chris D. Peterson, MIT X Consortium
00028  */
00029 
00030 /*
00031  * SimpleMenu.h - Public Header file for SimpleMenu widget.
00032  *
00033  * This is the public header file for the Athena SimpleMenu widget.
00034  * It is intended to provide one pane pulldown and popup menus within
00035  * the framework of the X Toolkit.  As the name implies it is a first and
00036  * by no means complete implementation of menu code. It does not attempt to
00037  * fill the needs of all applications, but does allow a resource oriented
00038  * interface to menus.
00039  *
00040  * Date:    April 3, 1989
00041  *
00042  * By:      Chris D. Peterson
00043  *          MIT X Consortium 
00044  *          kit@expo.lcs.mit.edu
00045  */
00046 
00047 #ifndef _SimpleMenu_h
00048 #define _SimpleMenu_h
00049 
00050 #include <X11/Shell.h>
00051 #include <X11/Xmu/Converters.h>
00052 
00053 /****************************************************************
00054  *
00055  * SimpleMenu widget
00056  *
00057  ****************************************************************/
00058 
00059 /* SimpleMenu Resources:
00060 
00061  Name                Class              RepType         Default Value
00062  ----                -----              -------         -------------
00063  background          Background         Pixel           XtDefaultBackground
00064  backgroundPixmap    BackgroundPixmap   Pixmap          None
00065  borderColor         BorderColor        Pixel           XtDefaultForeground
00066  borderPixmap        BorderPixmap       Pixmap          None
00067  borderWidth         BorderWidth        Dimension       1
00068  bottomMargin        VerticalMargins    Dimension       VerticalSpace
00069  columnWidth         ColumnWidth        Dimension       Width of widest text
00070  cursor              Cursor             Cursor          None
00071  destroyCallback     Callback           Pointer         NULL
00072  height              Height             Dimension       0
00073  label               Label              String          NULL (No label)
00074  labelClass          LabelClass         Pointer         smeBSBObjectClass
00075  mappedWhenManaged   MappedWhenManaged  Boolean         True
00076  rowHeight           RowHeight          Dimension       Height of Font
00077  sensitive           Sensitive          Boolean         True
00078  topMargin           VerticalMargins    Dimension       VerticalSpace
00079  width               Width              Dimension       0
00080  x                   Position           Position        0n
00081  y                   Position           Position        0
00082 
00083 */
00084 
00085 typedef struct _SimpleMenuClassRec*     SimpleMenuWidgetClass;
00086 typedef struct _SimpleMenuRec*          SimpleMenuWidget;
00087 
00088 extern WidgetClass simpleMenuWidgetClass;
00089 
00090 #define XtNcursor "cursor"
00091 #define XtNbottomMargin "bottomMargin"
00092 #define XtNcolumnWidth "columnWidth"
00093 #define XtNlabelClass "labelClass"
00094 #define XtNmenuOnScreen "menuOnScreen"
00095 #define XtNpopupOnEntry "popupOnEntry"
00096 #define XtNrowHeight "rowHeight"
00097 #define XtNtopMargin "topMargin"
00098 
00099 #define XtCColumnWidth "ColumnWidth"
00100 #define XtCLabelClass "LabelClass"
00101 #define XtCMenuOnScreen "MenuOnScreen"
00102 #define XtCPopupOnEntry "PopupOnEntry"
00103 #define XtCRowHeight "RowHeight"
00104 #define XtCVerticalMargins "VerticalMargins"
00105 
00106 /************************************************************
00107  *
00108  * Public Functions.
00109  *
00110  ************************************************************/
00111 
00112 _XFUNCPROTOBEGIN
00113 
00114 /*      Function Name: XawSimpleMenuAddGlobalActions
00115  *      Description: adds the global actions to the simple menu widget.
00116  *      Arguments: app_con - the appcontext.
00117  *      Returns: none.
00118  */
00119 
00120 extern void XawSimpleMenuAddGlobalActions(
00121 #if NeedFunctionPrototypes
00122     XtAppContext        /* app_con */
00123 #endif
00124 );
00125  
00126 /*      Function Name: XawSimpleMenuGetActiveEntry
00127  *      Description: Gets the currently active (set) entry.
00128  *      Arguments: w - the smw widget.
00129  *      Returns: the currently set entry or NULL if none is set.
00130  */
00131 
00132 extern Widget XawSimpleMenuGetActiveEntry(
00133 #if NeedFunctionPrototypes
00134     Widget              /* w */
00135 #endif
00136 );
00137 
00138 /*      Function Name: XawSimpleMenuClearActiveEntry
00139  *      Description: Unsets the currently active (set) entry.
00140  *      Arguments: w - the smw widget.
00141  *      Returns: none.
00142  */
00143 
00144 extern void XawSimpleMenuClearActiveEntry(
00145 #if NeedFunctionPrototypes
00146     Widget              /* w */
00147 #endif
00148 );
00149 
00150 _XFUNCPROTOEND
00151 
00152 #endif /* _SimpleMenu_h */

Generated on Sun Mar 4 15:03:55 2007 for Scilab [trunk] by  doxygen 1.5.1