00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifdef G4VIS_BUILD_OPENGLXM_DRIVER
00032
00033 #include "G4OpenGLXmBox.hh"
00034 #include "G4OpenGLXmFramedBox.hh"
00035 #include "G4OpenGLXmVWidgetComponent.hh"
00036 #include "G4OpenGLXmVWidgetShell.hh"
00037 #include <Xm/RowColumn.h>
00038 #include <Xm/Frame.h>
00039
00040 G4OpenGLXmFramedBox::G4OpenGLXmFramedBox (const char* n,
00041 G4bool r) :
00042 G4OpenGLXmBox (n, r)
00043 {
00044 frame = NULL;
00045 }
00046
00047 G4OpenGLXmFramedBox::~G4OpenGLXmFramedBox ()
00048 {}
00049
00050 void G4OpenGLXmFramedBox::AddChild (G4OpenGLXmVWidgetComponent* component)
00051 {
00052 component->AddYourselfTo(this);
00053 Cardinal num_children;
00054 XtVaGetValues (box_row_col,
00055 XmNnumChildren, &num_children,
00056 NULL);
00057
00058 }
00059
00060 void G4OpenGLXmFramedBox::AddYourselfTo (G4OpenGLXmVWidgetShell* window)
00061 {
00062
00063 pView = window->GetView ();
00064 ProcesspView ();
00065 char framename[50];
00066 strcpy (framename, name);
00067 strcat (framename, "_frame");
00068
00069 parent = window->GetPointerToWidget ();
00070 frame = XtVaCreateManagedWidget (framename,
00071 xmFrameWidgetClass,
00072 *parent,
00073
00074 XtNvisual, visual,
00075 XtNdepth, depth,
00076 XtNcolormap, cmap,
00077 XtNborderColor, borcol,
00078 XtNbackground, bgnd,
00079
00080 NULL);
00081
00082
00083
00084 box_row_col = XtVaCreateManagedWidget (name,
00085 xmRowColumnWidgetClass,
00086 frame,
00087
00088 XmNadjustMargin, True,
00089 XmNisHomogeneous, False,
00090 XmNlabelString, (XmString)name,
00091 XmNradioAlwaysOne, radio,
00092 XmNradioBehavior, radio,
00093
00094 XtNvisual, visual,
00095 XtNdepth, depth,
00096 XtNcolormap, cmap,
00097 XtNborderColor, borcol,
00098 XtNbackground, bgnd,
00099
00100 NULL);
00101
00102 }
00103
00104 #endif