2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* util.h 1.5 - Fujitsu source for CDEnext 96/09/18 13:59:22 */
24 /* $XConsortium: util.h /main/5 1996/09/19 19:42:11 cde-fuj $ */
26 * (c) Copyright 1995 FUJITSU LIMITED
27 * This is source code modified by FUJITSU LIMITED under the Joint
28 * Development Agreement for the CDEnext PST.
29 * This is unpublished proprietary source code of FUJITSU LIMITED
34 extern Widget GetMenuWidget();
35 extern Widget CreateFrame();
36 extern Widget CreateControlArea();
37 extern Widget CreateScrollBar();
38 extern Widget CreateDrawingArea();
39 extern Widget CreateExclusive();
40 extern Widget CreateLabel();
41 extern Widget CreateDialogAndButtons();
49 extern Widget CreateTemplateDialog();
50 extern Widget CreateScrollBase();
51 extern Widget CreateForm();
54 #include <Xm/XmStrDefs.h>
56 Widget CreateCaptionFrame();
63 void CreateTextField();
65 void CreateMenuButtons();
66 void LayoutButtonsEH();
67 Widget CreateLayoutButtons();
68 Widget CreateDialogAndButtons();
69 Widget GuiInitialize();
70 Widget CreateDrawingArea();
72 void AddLeftAttachWidget();
73 void AddLeftAttachForm();
74 void AddTopAttachWidget();
75 void AddTopAttachForm();
76 void AddRightAttachWidget();
77 void AddRightAttachForm();
78 void AddBottomAttachForm();
81 void ForcePopdownDialog();
82 void SetLabelString();
83 void SetFooterString();
86 Widget CreateMenuBarAndFooterMessageForm();
87 Widget GetMenuWidget();
91 Widget CreateRowColumn();
92 Widget CreateScrollBar();
96 #define RowMarginWidth 11
97 #define MarginHeight 11
99 #define MinimumSpace 4
101 /***** Exclusive Set *****/
103 typedef struct _ToggleButt {
106 XtPointer clientdata;
113 #define EXARGS( clientdata, name, sensitive, cb, set ){ \
116 (XtPointer) clientdata, \
118 (XtArgVal) sensitive, \
119 (XtCallbackProc) cb, \
123 typedef struct _RadioButt {
133 #define EXCLUSIVE(a) { 0, a, XtNumber(a), 0, 0, 0 }
135 #define ExclusiveItems ToggleButt
136 #define Exclusive RadioButt
138 #define SetItemLabel(b,n,l) (b)->items[(n)].label = (l)
140 /***** PushButton Set *****/
142 typedef struct _ButtonItems {
145 XtPointer clientdata;
151 #define BTNARGS( cb, clientdata, mnumonic, sensitive, deflt ) { \
153 (XtCallbackProc) cb, \
154 (XtPointer) clientdata, \
155 (XtArgVal) mnumonic, \
156 (XtArgVal) sensitive, \
160 typedef struct _Button {
166 #define BUTTONS( items ) { 0, items, XtNumber(items) }
168 /***** MenuButton Set *****/
170 typedef struct _menuButtonItems {
176 #define MENUBTNARGS( mnumonic ) { \
182 typedef struct _MButton {
183 menuButtonItems *items;
187 #define MBUTTONS(items) {items,XtNumber((items))}
190 /***** NoticeButton Set *****/
192 typedef struct _NoticeButton {
197 #define NBTNARGS( cb, clientdata, mnumonic, sensitive, deflt) { \
202 typedef struct _NButton {
207 #define NBUTTONS(items) {items,XtNumber((items))}
210 /***** TextField Set *****/
212 typedef struct _TextField {
219 /***** Function Type *****/
221 #define D_WARNING XmDIALOG_WARNING
222 #define D_QUESTION XmDIALOG_QUESTION
223 #define D_ERROR XmDIALOG_ERROR
224 #define D_TEMPLATE XmDIALOG_TEMPLATE
225 #define L_VERTICAL XmVERTICAL
226 #define L_HORIZONTAL XmHORIZONTAL
230 #define AddLeftAttachWidget( w, ref, offset ) XtVaSetValues( w, \
231 XmNleftAttachment, XmATTACH_WIDGET, \
232 XmNleftWidget, ref, \
233 XmNleftOffset, offset, \
236 #define AddLeftAttachForm( w, offset ) XtVaSetValues( w, \
237 XmNleftAttachment, XmATTACH_FORM, \
238 XmNleftOffset, offset, \
241 #define AddTopAttachWidget( w, ref, offset ) XtVaSetValues( w, \
242 XmNtopAttachment, XmATTACH_WIDGET, \
244 XmNtopOffset, offset, \
247 #define AddTopAttachForm( w, offset ) XtVaSetValues( w, \
248 XmNtopAttachment, XmATTACH_FORM, \
249 XmNtopOffset, offset, \
252 #define AddRightAttachWidget( w, ref, offset ) XtVaSetValues( w, \
253 XmNrightAttachment, XmATTACH_WIDGET, \
254 XmNrightWidget, ref, \
255 XmNrightOffset, offset, \
258 #define AddRightAttachForm( w, offset ) XtVaSetValues( w, \
259 XmNrightAttachment, XmATTACH_FORM, \
260 XmNrightOffset, offset, \
263 #define AddBottomAttachForm( w, offset ) XtVaSetValues( w, \
264 XmNbottomAttachment, XmATTACH_FORM, \
265 XmNbottomOffset, offset, \
267 #endif /* USE_MACRO */