1 | #include <X11/Wc/COPY.h> |
---|
2 | /* |
---|
3 | * SCCS_data: %Z% %M% %I% %E% %U% |
---|
4 | * |
---|
5 | * This module contains registration routine for all Motif |
---|
6 | * widget/gadget constructors and classes. |
---|
7 | * |
---|
8 | * Module_interface_summary: |
---|
9 | * |
---|
10 | * All are exactly equivalent. Register all Motif widgets and Xmp widgets. |
---|
11 | * |
---|
12 | * void XmpRegisterMotif ( XtAppContext app ) |
---|
13 | * void XmpRegisterAll ( XtAppContext app ) |
---|
14 | * void MriRegisterMotif ( XtAppContext app ) |
---|
15 | * |
---|
16 | ******************************************************************************* |
---|
17 | */ |
---|
18 | |
---|
19 | #include <X11/IntrinsicP.h> |
---|
20 | |
---|
21 | #ifdef sun |
---|
22 | #include <X11/ObjectP.h> /* why don't they just use X from mit!?! */ |
---|
23 | #include <X11/RectObjP.h> |
---|
24 | #endif |
---|
25 | |
---|
26 | #include <X11/StringDefs.h> |
---|
27 | #include <Xm/Xm.h> |
---|
28 | |
---|
29 | #include <X11/Wc/WcCreate.h> |
---|
30 | #include <X11/Xmp/XmpP.h> |
---|
31 | |
---|
32 | #ifdef DEBUG |
---|
33 | #include <X11/Xmp/XmpMotifP.h> |
---|
34 | #else |
---|
35 | #include <X11/Xmp/XmpMotif.h> |
---|
36 | #endif |
---|
37 | |
---|
38 | |
---|
39 | /* -- Register all Motif widgets, converters, callbacks, actions. |
---|
40 | ******************************************************************************* |
---|
41 | */ |
---|
42 | |
---|
43 | void MriRegisterMotif ( app ) |
---|
44 | XtAppContext app; |
---|
45 | { |
---|
46 | XmpRegisterMotif(app); |
---|
47 | } |
---|
48 | |
---|
49 | void XmpRegisterAll ( app ) |
---|
50 | XtAppContext app; |
---|
51 | { |
---|
52 | XmpRegisterMotif(app); |
---|
53 | } |
---|
54 | |
---|
55 | void XmpRegisterMotif ( app ) |
---|
56 | XtAppContext app; |
---|
57 | { |
---|
58 | ONCE_PER_XtAppContext( app ); |
---|
59 | |
---|
60 | /* -- Register Motif specific action and callback procedures */ |
---|
61 | XmpAddActionsAndCallbacks( app ); |
---|
62 | |
---|
63 | /* -- Force Motif to load all of its converters */ |
---|
64 | XmpAddMotifConverters( app ); |
---|
65 | |
---|
66 | /* -- Register Motif specific converters */ |
---|
67 | XmpAddConverters( app ); |
---|
68 | |
---|
69 | /* -- Make sure the Wcl converters win over all the Motif converters */ |
---|
70 | WcAddConverters( app ); |
---|
71 | |
---|
72 | #define RCO( name, func ) WcRegisterConstructor ( app, name, func ) |
---|
73 | #define RCP( name, class ) WcRegisterClassPtr ( app, name, class ) |
---|
74 | |
---|
75 | /* -- register all Xmp widget constructors */ |
---|
76 | RCO( "XmpCreateTable", XmpCreateTable ); |
---|
77 | RCO( "XmpCreateTableDialog", XmpCreateTableDialog ); |
---|
78 | RCO( "XmpCreateTableTransient", XmpCreateTableTransient ); |
---|
79 | |
---|
80 | /* -- register all Xmp widget classes */ |
---|
81 | RCP( "XmpTable", xmpTableWidgetClass ); |
---|
82 | RCP( "xmpTableWidgetClass", xmpTableWidgetClass ); |
---|
83 | |
---|
84 | /* -- register all Motif constructors */ |
---|
85 | RCO( "XmCreateArrowButton", XmCreateArrowButton ); |
---|
86 | RCO( "XmCreateArrowButtonGadget", XmCreateArrowButtonGadget ); |
---|
87 | RCO( "XmCreateBulletinBoard", XmCreateBulletinBoard ); |
---|
88 | RCO( "XmCreateBulletinBoardDialog", XmCreateBulletinBoardDialog ); |
---|
89 | RCO( "XmCreateCascadeButton", XmCreateCascadeButton ); |
---|
90 | RCO( "XmCreateCascadeButtonGadget", XmCreateCascadeButtonGadget ); |
---|
91 | #ifndef _OLD_MOTIF |
---|
92 | RCO( "XmCreateCheckBox", XmCreateSimpleCheckBox ); |
---|
93 | #endif |
---|
94 | RCO( "XmCreateCommand", XmCreateCommand ); |
---|
95 | RCO( "XmCreateDialogShell", XmCreateDialogShell ); |
---|
96 | RCO( "XmCreateDrawingArea", XmCreateDrawingArea ); |
---|
97 | RCO( "XmCreateDrawnButton", XmCreateDrawnButton ); |
---|
98 | RCO( "XmCreateErrorDialog", XmCreateErrorDialog ); |
---|
99 | RCO( "XmCreateFileSelectionBox", XmCreateFileSelectionBox ); |
---|
100 | RCO( "XmCreateFileSelectionDialog", XmCreateFileSelectionDialog ); |
---|
101 | RCO( "XmCreateForm", XmCreateForm ); |
---|
102 | RCO( "XmCreateFormDialog", XmCreateFormDialog ); |
---|
103 | RCO( "XmCreateFrame", XmCreateFrame ); |
---|
104 | RCO( "XmCreateInformationDialog", XmCreateInformationDialog ); |
---|
105 | #if defined(XmREVISION) && XmREVISION >= 2 |
---|
106 | RCO( "XmCreateTemplateDialog", XmCreateTemplateDialog ); |
---|
107 | #endif |
---|
108 | RCO( "XmCreateLabel", XmCreateLabel ); |
---|
109 | RCO( "XmCreateLabelGadget", XmCreateLabelGadget ); |
---|
110 | RCO( "XmCreateList", XmCreateList ); |
---|
111 | RCO( "XmCreateMainWindow", XmCreateMainWindow ); |
---|
112 | RCO( "XmCreateMenuBar", XmCreateMenuBar ); |
---|
113 | RCO( "XmCreateMenuShell", XmCreateMenuShell ); |
---|
114 | RCO( "XmCreateMessageBox", XmCreateMessageBox ); |
---|
115 | RCO( "XmCreateMessageDialog", XmCreateMessageDialog ); |
---|
116 | RCO( "XmCreateOptionMenu", XmCreateOptionMenu ); |
---|
117 | RCO( "XmCreatePanedWindow", XmCreatePanedWindow ); |
---|
118 | RCO( "XmCreatePopupMenu", XmCreatePopupMenu ); |
---|
119 | RCO( "XmCreatePromptDialog", XmCreatePromptDialog ); |
---|
120 | RCO( "XmCreatePulldownMenu", XmCreatePulldownMenu ); |
---|
121 | RCO( "XmCreatePushButton", XmCreatePushButton ); |
---|
122 | RCO( "XmCreatePushButtonGadget", XmCreatePushButtonGadget ); |
---|
123 | RCO( "XmCreateQuestionDialog", XmCreateQuestionDialog ); |
---|
124 | RCO( "XmCreateRadioBox", XmCreateRadioBox ); |
---|
125 | RCO( "XmCreateRowColumn", XmCreateRowColumn ); |
---|
126 | RCO( "XmCreateScale", XmCreateScale ); |
---|
127 | RCO( "XmCreateScrollBar", XmCreateScrollBar ); |
---|
128 | RCO( "XmCreateScrolledList", XmCreateScrolledList ); |
---|
129 | RCO( "XmCreateScrolledText", XmCreateScrolledText ); |
---|
130 | RCO( "XmCreateScrolledWindow", XmCreateScrolledWindow ); |
---|
131 | RCO( "XmCreateSelectionBox", XmCreateSelectionBox ); |
---|
132 | RCO( "XmCreateSelectionDialog", XmCreateSelectionDialog ); |
---|
133 | RCO( "XmCreateSeparator", XmCreateSeparator ); |
---|
134 | RCO( "XmCreateSeparatorGadget", XmCreateSeparatorGadget ); |
---|
135 | #ifndef _OLD_MOTIF |
---|
136 | RCO( "XmCreateSimpleCheckBox", XmCreateSimpleCheckBox ); |
---|
137 | #endif |
---|
138 | RCO( "XmCreateText", XmCreateText ); |
---|
139 | #ifndef _OLD_MOTIF |
---|
140 | RCO( "XmCreateTextField", XmCreateTextField ); |
---|
141 | RCO( "XmCreateToggleButton", XmCreateToggleButton ); |
---|
142 | #endif |
---|
143 | RCO( "XmCreateToggleButtonGadget", XmCreateToggleButtonGadget ); |
---|
144 | RCO( "XmCreateWarningDialog", XmCreateWarningDialog ); |
---|
145 | RCO( "XmCreateWorkingDialog", XmCreateWorkingDialog ); |
---|
146 | |
---|
147 | /* -- register Motif widget classes */ |
---|
148 | RCP("xmArrowButtonWidgetClass", xmArrowButtonWidgetClass ); |
---|
149 | RCP("XmArrowButton", xmArrowButtonWidgetClass ); |
---|
150 | RCP("xmArrowButtonGadgetClass", xmArrowButtonGadgetClass ); |
---|
151 | RCP("XmArrowButtonGadget", xmArrowButtonGadgetClass ); |
---|
152 | RCP("xmBulletinBoardWidgetClass", xmBulletinBoardWidgetClass ); |
---|
153 | RCP("XmBulletinBoard", xmBulletinBoardWidgetClass ); |
---|
154 | RCP("xmCascadeButtonWidgetClass", xmCascadeButtonWidgetClass ); |
---|
155 | RCP("XmCascadeButton", xmCascadeButtonWidgetClass ); |
---|
156 | RCP("xmCascadeButtonGadgetClass", xmCascadeButtonGadgetClass ); |
---|
157 | RCP("XmCascadeButtonGadget", xmCascadeButtonGadgetClass ); |
---|
158 | RCP("xmCommandWidgetClass", xmCommandWidgetClass ); |
---|
159 | RCP("XmCommand", xmCommandWidgetClass ); |
---|
160 | RCP("xmDialogShellWidgetClass", xmDialogShellWidgetClass ); |
---|
161 | RCP("XmDialogShell", xmDialogShellWidgetClass ); |
---|
162 | RCP("xmDrawingAreaWidgetClass", xmDrawingAreaWidgetClass ); |
---|
163 | RCP("XmDrawingArea", xmDrawingAreaWidgetClass ); |
---|
164 | RCP("xmDrawnButtonWidgetClass", xmDrawnButtonWidgetClass ); |
---|
165 | RCP("XmDrawnButton", xmDrawnButtonWidgetClass ); |
---|
166 | RCP("xmFileSelectionBoxWidgetClass", xmFileSelectionBoxWidgetClass ); |
---|
167 | RCP("XmFileSelectionBox", xmFileSelectionBoxWidgetClass ); |
---|
168 | RCP("xmFormWidgetClass", xmFormWidgetClass ); |
---|
169 | RCP("XmForm", xmFormWidgetClass ); |
---|
170 | RCP("xmFrameWidgetClass", xmFrameWidgetClass ); |
---|
171 | RCP("XmFrame", xmFrameWidgetClass ); |
---|
172 | RCP("xmGadgetClass", xmGadgetClass ); |
---|
173 | RCP("XmGadget", xmGadgetClass ); |
---|
174 | RCP("xmLabelWidgetClass", xmLabelWidgetClass ); |
---|
175 | RCP("XmLabel", xmLabelWidgetClass ); |
---|
176 | RCP("xmLabelGadgetClass", xmLabelGadgetClass ); |
---|
177 | RCP("XmLabelGadget", xmLabelGadgetClass ); |
---|
178 | RCP("xmListWidgetClass", xmListWidgetClass ); |
---|
179 | RCP("XmList", xmListWidgetClass ); |
---|
180 | RCP("xmMainWindowWidgetClass", xmMainWindowWidgetClass ); |
---|
181 | RCP("XmMainWindow", xmMainWindowWidgetClass ); |
---|
182 | RCP("xmManagerWidgetClass", xmManagerWidgetClass ); |
---|
183 | RCP("XmManager", xmManagerWidgetClass ); |
---|
184 | RCP("xmMenuShellWidgetClass", xmMenuShellWidgetClass ); |
---|
185 | RCP("XmMenuShell", xmMenuShellWidgetClass ); |
---|
186 | RCP("xmMessageBoxWidgetClass", xmMessageBoxWidgetClass ); |
---|
187 | RCP("XmMessageBox", xmMessageBoxWidgetClass ); |
---|
188 | RCP("xmPanedWindowWidgetClass", xmPanedWindowWidgetClass ); |
---|
189 | RCP("XmPanedWindow", xmPanedWindowWidgetClass ); |
---|
190 | RCP("xmPrimitiveWidgetClass", xmPrimitiveWidgetClass ); |
---|
191 | RCP("XmPrimitive", xmPrimitiveWidgetClass ); |
---|
192 | RCP("xmPushButtonWidgetClass", xmPushButtonWidgetClass ); |
---|
193 | RCP("XmPushButton", xmPushButtonWidgetClass ); |
---|
194 | RCP("xmPushButtonGadgetClass", xmPushButtonGadgetClass ); |
---|
195 | RCP("XmPushButtonGadget", xmPushButtonGadgetClass ); |
---|
196 | RCP("xmRowColumnWidgetClass", xmRowColumnWidgetClass ); |
---|
197 | RCP("XmRowColumn", xmRowColumnWidgetClass ); |
---|
198 | RCP("xmScaleWidgetClass", xmScaleWidgetClass ); |
---|
199 | RCP("XmScale", xmScaleWidgetClass ); |
---|
200 | RCP("xmScrollBarWidgetClass", xmScrollBarWidgetClass ); |
---|
201 | RCP("XmScrollBar", xmScrollBarWidgetClass ); |
---|
202 | RCP("xmScrolledWindowWidgetClass", xmScrolledWindowWidgetClass ); |
---|
203 | RCP("XmScrolledWindow", xmScrolledWindowWidgetClass ); |
---|
204 | RCP("xmSelectionBoxWidgetClass", xmSelectionBoxWidgetClass ); |
---|
205 | RCP("XmSelectionBox", xmSelectionBoxWidgetClass ); |
---|
206 | RCP("xmSeparatorWidgetClass", xmSeparatorWidgetClass ); |
---|
207 | RCP("XmSeparator", xmSeparatorWidgetClass ); |
---|
208 | RCP("xmSeparatorGadgetClass", xmSeparatorGadgetClass ); |
---|
209 | RCP("XmSeparatorGadget", xmSeparatorGadgetClass ); |
---|
210 | RCP("xmTextWidgetClass", xmTextWidgetClass ); |
---|
211 | RCP("XmText", xmTextWidgetClass ); |
---|
212 | #ifndef _OLD_MOTIF |
---|
213 | RCP("xmTextFieldWidgetClass", xmTextFieldWidgetClass ); |
---|
214 | RCP("XmTextField", xmTextFieldWidgetClass ); |
---|
215 | #endif |
---|
216 | RCP("xmToggleButtonWidgetClass", xmToggleButtonWidgetClass ); |
---|
217 | RCP("XmToggleButton", xmToggleButtonWidgetClass ); |
---|
218 | RCP("xmToggleButtonGadgetClass", xmToggleButtonGadgetClass ); |
---|
219 | RCP("XmToggleButtonGadget", xmToggleButtonGadgetClass ); |
---|
220 | } |
---|