dtcalc: change from obsoleted MAXFLOAT to FLT_MAX from std C
[oweals/cde.git] / cde / lib / DtWidget / MenuButtonP.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: MenuButtonP.h /main/3 1995/10/26 09:33:17 rswiston $ */
24 /*
25  *        Copyright (C) 1986,1991  Sun Microsystems, Inc
26  *                    All rights reserved.
27  *          Notice of copyright on this source code
28  *          product does not indicate publication.
29  *
30  * RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by
31  * the U.S. Government is subject to restrictions as set forth
32  * in subparagraph (c)(1)(ii) of the Rights in Technical Data
33  * and Computer Software Clause at DFARS 252.227-7013 (Oct. 1988)
34  * and FAR 52.227-19 (c) (June 1987).
35  *
36  *    Sun Microsystems, Inc., 2550 Garcia Avenue,
37  *    Mountain View, California 94043.
38  *
39  */
40
41 #ifndef  _DtMenuButtonP_h
42 #define  _DtMenuButtonP_h
43
44 #include "MenuButton.h"
45 #include <Xm/LabelP.h>
46
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50
51 /****************************************************************
52  *
53  *      Message Defines
54  *
55  ****************************************************************/
56  
57 #define MB_POST         DTWIDGET_GETMESSAGE( \
58                         MS_MenuButton, MENU_POST, _DtMsgMenuButton_0000)
59  
60 #define MB_PARENT       DTWIDGET_GETMESSAGE( \
61                         MS_MenuButton, MENU_PARENT, _DtMsgMenuButton_0001)
62  
63 #define MB_SUBMENU      DTWIDGET_GETMESSAGE( \
64                         MS_MenuButton, MENU_SUBMENU, _DtMsgMenuButton_0002)
65  
66
67 /* The MenuButton instance record */
68
69 typedef struct 
70 {       /* resources */
71     XtCallbackList      cascading_callback;     /* Cascading callback  */
72     Widget              submenu;        /* the menu to pull down */
73     Pixmap              menu_pixmap;    /* pixmap for the menu */
74
75         /* internal fields */
76
77     Boolean     armed;          /* armed flag */
78     Boolean     popped_up;      /* submenu popped up flag*/
79     XRectangle  menu_rect;      /* location of menu*/
80     Time        last_timestamp; /* last time submenu popped down */
81     Boolean     private_submenu;
82     GC          gc;
83 } DtMenuButtonPart;
84
85
86 /* Full instance record declaration */
87
88 typedef struct _DtMenuButtonRec
89 {
90     CorePart            core;
91         XmPrimitivePart primitive;
92         XmLabelPart             label;
93         DtMenuButtonPart        menu_button;
94 } DtMenuButtonRec;
95
96
97 /* MenuButton class structure */
98
99 typedef struct {
100         XtPointer       extension;      /* Pointer to extension record */
101 } DtMenuButtonClassPart;
102
103
104 /* Full class record declaration for MenuButton class */
105
106 typedef struct _DtMenuButtonClassRec {
107         CoreClassPart       core_class;
108         XmPrimitiveClassPart    primitive_class;
109         XmLabelClassPart                label_class;
110         DtMenuButtonClassPart menu_button_class;
111 } DtMenuButtonClassRec;
112
113
114 extern DtMenuButtonClassRec   dtMenuButtonClassRec;
115
116
117 #ifdef __cplusplus
118 }  /* Close scope of 'extern "C"' declaration which encloses file. */
119 #endif
120
121 #endif  /* _DtMenuButtonP_h */
122 /* DON'T ADD STUFF AFTER THIS #endif */
123