34#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
36#ifndef G4OPENGLXMVIEWER_HH
37#define G4OPENGLXMVIEWER_HH
44class G4OpenGLXmTopLevelShell;
45class G4OpenGLXmRadioButton;
46class G4OpenGLXmPushButton;
47class G4OpenGLXmSliderBar;
49class G4OpenGLXmTextField;
50class G4OpenGLXmFramedBox;
51class G4OpenGLXmFourArrowButtons;
52class G4OpenGLXmSeparator;
54class G4OpenGLXmViewer:
public G4OpenGLXViewer {
57 G4OpenGLXmViewer (G4OpenGLSceneHandler& scene);
58 virtual ~G4OpenGLXmViewer ();
61 virtual void ShowView ();
63 void GetXmConnection ();
64 virtual void CreateMainWindow ();
77 drawing_style_pullright,
78 background_color_pullright,
79 transparency_pullright,
135 XtIntervalId rotation_timer,
143 G4OpenGLXmTopLevelShell* fprotation_top;
144 G4OpenGLXmBox* fprotation_button_box;
145 G4OpenGLXmRadioButton* fprotation_button1;
146 G4OpenGLXmRadioButton* fprotation_button2;
147 G4OpenGLXmBox* fprotation_slider_box;
148 G4OpenGLXmSliderBar* fprotation_slider;
149 G4OpenGLXmBox* fprotation_arrow_box;
150 G4OpenGLXmFourArrowButtons* fprotation_arrow;
152 G4OpenGLXmTopLevelShell* fppanning_top;
153 G4OpenGLXmFramedBox* fppanning_box;
154 G4OpenGLXmFourArrowButtons* fppanning_arrows;
155 G4OpenGLXmSliderBar* fppanning_slider;
156 G4OpenGLXmFramedBox* fpzoom_box;
157 G4OpenGLXmSliderBar* fpzoom_slider;
158 G4OpenGLXmFramedBox* fpdolly_box;
159 G4OpenGLXmSliderBar* fpdolly_slider;
161 G4OpenGLXmTopLevelShell* fpsetting_top;
162 G4OpenGLXmFramedBox* fpsetting_box;
163 G4OpenGLXmTextField* fppan_set;
164 G4OpenGLXmTextField* fprot_set;
165 G4OpenGLXmTextField* fpzoom_upper;
166 G4OpenGLXmTextField* fpzoom_lower;
167 G4OpenGLXmTextField* fpdolly_upper;
168 G4OpenGLXmTextField* fpdolly_lower;
169 G4OpenGLXmPushButton* fpok_button;
171 G4OpenGLXmTopLevelShell* fpmiscellany_top;
172 G4OpenGLXmFramedBox* fpwobble_box;
173 G4OpenGLXmPushButton* fpwobble_button;
174 G4OpenGLXmSliderBar* fpwobble_slider;
175 G4OpenGLXmFramedBox* fpreset_box;
176 G4OpenGLXmPushButton* fpreset_button;
177 G4OpenGLXmFramedBox* fpproj_style_box;
178 G4OpenGLXmRadioButton* fporthogonal_button;
179 G4OpenGLXmRadioButton* fpperspective_button;
180 G4OpenGLXmTextField* fpfov_text;
182 G4OpenGLXmTopLevelShell* fpprint_top;
183 G4OpenGLXmFramedBox* fpprint_box;
184 G4OpenGLXmFramedBox* fpprint_col_box;
185 G4OpenGLXmFramedBox* fpprint_style_box;
186 G4OpenGLXmTextField* fpprint_text;
187 G4OpenGLXmPushButton* fpprint_button;
188 G4OpenGLXmSeparator* fpprint_line;
189 G4OpenGLXmRadioButton* fpprint_col_radio1;
190 G4OpenGLXmRadioButton* fpprint_col_radio2;
191 G4OpenGLXmRadioButton* fpprint_style_radio1;
192 G4OpenGLXmRadioButton* fpprint_style_radio2;
196 static void expose_callback (Widget w,
197 XtPointer clientData,
200 static void resize_callback (Widget w,
201 XtPointer clientData,
204 static void actions_callback (Widget w,
205 XtPointer clientData,
208 static void misc_callback (Widget w,
209 XtPointer clientData,
212 static void Add_set_field (
char* widget,
217 G4OpenGLXmViewer* pView);
219 static void zoom_callback (Widget w,
220 XtPointer clientData,
223 static void dolly_callback (Widget w,
224 XtPointer clientData,
227 static void pan_left_right_callback (Widget w,
228 XtPointer clientData,
231 static void left_right_pan_callback (XtPointer clientData,
232 XtIntervalId* timer_id);
234 static void theta_rotation_callback (Widget w,
235 XtPointer clientData,
238 static void phi_rotation_callback (Widget w,
239 XtPointer clientData,
242 static void pan_up_down_callback (Widget w,
243 XtPointer clientData,
246 static void up_down_pan_callback (XtPointer clientData,
247 XtIntervalId* timer_id);
249 static void drawing_style_callback (Widget w,
250 XtPointer clientData,
253 static void rep_style_callback (Widget w,
254 XtPointer clientData,
257 static void background_color_callback (Widget w,
258 XtPointer clientData,
261 static void set_rot_subject_callback (Widget w,
262 XtPointer clientData,
265 static void set_rot_sens_callback (Widget w,
266 XtPointer clientData,
269 static void set_pan_sens_callback (Widget w,
270 XtPointer clientData,
273 static void set_wob_sens_callback (Widget w,
274 XtPointer clientData,
277 static void projection_callback (Widget w,
278 XtPointer clientData,
281 static void wobble_callback (Widget w,
282 XtPointer clientData,
285 static void reset_callback (Widget w,
286 XtPointer clientData,
289 static void update_panels_callback (Widget w,
290 XtPointer clientData,
293 static void wobble_timer_callback (XtPointer clientData,
294 XtIntervalId* timerid);
296 static void Add_radio_box (
char* label_string,
297 Widget* parent_frame_widget,
298 XtCallbackRec* radio_box_cb,
300 G4int default_button,
301 char* radio_box_name,
303 G4OpenGLXmViewer* pView);
305 static void Add_four_arrow_buttons (G4OpenGLXmViewer* pView,
306 XtCallbackRec** arrow_callbacks,
307 Widget* parent_widget);
309 static void Add_slider_box (
char* label_string,
312 G4OpenGLXmViewer* pView,
318 unsigned char* orientation,
319 unsigned char* direction,
320 XtCallbackRec** slider_box_cb,
321 Widget* parent_frame_widget);
323 static void rotate_in_theta (XtPointer clientData,
324 XtIntervalId* timer_id);
326 static void rotate_in_phi (XtPointer clientData,
327 XtIntervalId* timer_id);
329 static void get_double_value_callback (Widget w,
330 XtPointer clientData,
333 static void get_text_callback (Widget w,
334 XtPointer clientData,
337 static void transparency_callback (Widget w,
338 XtPointer clientData,
341 static void antialias_callback (Widget w,
342 XtPointer clientData,
345 static void haloing_callback (Widget w,
346 XtPointer clientData,
349 static void aux_edge_callback (Widget w,
350 XtPointer clientData,
353 static void set_print_colour_callback (Widget w,
354 XtPointer clientData,
357 static void set_print_style_callback (Widget w,
358 XtPointer clientData,
361 static void print_callback (Widget w,
362 XtPointer clientData,
365 static G4bool get_boolean_userData (Widget w);
367 static G4int get_int_userData (Widget w);
369 friend class G4OpenGLXmVWidgetObject;
370 friend class G4OpenGLXmViewerMessenger;
373 G4OpenGLXmViewer (
const G4OpenGLXmViewer&);
374 G4OpenGLXmViewer& operator = (
const G4OpenGLXmViewer&);
375 void UpdateControlPanel();