dtcalc: change from obsoleted MAXFLOAT to FLT_MAX from std C
[oweals/cde.git] / cde / lib / DtWidget / Icon.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: Icon.h /main/4 1995/10/26 09:32:37 rswiston $ */
24 /**---------------------------------------------------------------------
25 ***     
26 ***     file:           Icon.h
27 ***
28 ***     project:        MotifPlus Widgets
29 ***
30 ***     description:    Public include file for DtIcon gadget class.
31 ***     
32 ***     
33 ***                     (c) Copyright 1990 by Hewlett-Packard Company.
34 ***
35 ***
36 ***-------------------------------------------------------------------*/
37
38
39 #ifndef _DtIcon_h
40 #define _DtIcon_h
41
42 #include <Xm/Xm.h>
43 #include <Dt/DtStrDefs.h>
44
45 #ifndef DtIsIcon
46 #define DtIsIcon(w) XtIsSubclass(w, dtIconGadgetClass)
47 #endif /* DtIsIcon */
48
49 typedef struct _DtIconClassRec * DtIconGadgetClass;
50 typedef struct _DtIconRec      * DtIconGadget;
51 typedef struct _DtIconCacheObjRec   * DtIconCacheObject;
52
53
54 extern Widget _DtCreateIcon( 
55                         Widget parent,
56                         String name,
57                         ArgList arglist,
58                         Cardinal argcount) ;
59 extern Boolean _DtIconGetState( 
60                         Widget w) ;
61 extern void _DtIconSetState( 
62                         Widget w,
63                         Boolean state,
64                         Boolean notify) ;
65 extern Drawable _DtIconDraw( 
66                         Widget widget,
67                         Drawable drawable,
68                         Position x,
69                         Position y,
70                         Boolean fill) ;
71 extern Widget _DtDuplicateIcon( 
72                         Widget parent,
73                         Widget widget,
74                         XmString string,
75                         String pixmap,
76                         XtPointer user_data,
77                         Boolean underline) ;
78 extern Boolean _DtIconSelectInTitle( 
79                         Widget widget,
80                         Position pt_x,
81                         Position pt_y) ;
82 extern XRectangle * _DtIconGetTextExtent( 
83                         Widget widget) ;
84 extern void _DtIconGetIconRects( 
85                         DtIconGadget g,
86                         unsigned char *flags,
87                         XRectangle *rect1,
88                         XRectangle *rect2) ;
89
90
91
92 extern WidgetClass dtIconGadgetClass;
93
94
95 #define XmCR_SELECT     XmCR_SINGLE_SELECT
96 #define XmCR_DROP       50
97 #define XmCR_POPUP      51
98 #define XmCR_HIGHLIGHT  52
99 #define XmCR_UNHIGHLIGHT        53
100 #define XmCR_SHADOW     54
101
102 typedef struct
103 {
104         int             reason;
105         XEvent *        event;
106         Boolean         set;
107 } DtIconCallbackStruct;
108
109
110 #define XmPIXMAP_TOP    0
111 #define XmPIXMAP_BOTTOM 1
112 #define XmPIXMAP_LEFT   2
113 #define XmPIXMAP_RIGHT  3
114 #define XmPIXMAP_MIDDLE 4
115
116 #define XmSTRING_BOTTOM 0
117 #define XmSTRING_TOP    1
118 #define XmSTRING_RIGHT  2
119 #define XmSTRING_LEFT   3
120
121 #define XmICON_LABEL    0
122 #define XmICON_BUTTON   1
123 #define XmICON_TOGGLE   2
124 #define XmICON_DRAG     3
125
126 #define XmFILL_NONE     0
127 #define XmFILL_PARENT   1
128 #define XmFILL_SELF     2
129 #define XmFILL_TRANSPARENT      3
130
131 #define XmPIXMAP_RECT  0x01
132 #define XmLABEL_RECT   0x02
133
134 #define DtRECTANGLE     0
135 #define DtNON_RECTANGLE 1
136
137
138 #endif /* _XmIcon_h */
139
140 /* DON'T ADD ANYTHING AFTER THIS #endif */