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 "G4OpenGLXmFramedBox.hh"
00034 #include "G4OpenGLXmBox.hh"
00035 #include "G4OpenGLXmVWidgetComponent.hh"
00036 #include "G4OpenGLXmVWidgetShell.hh"
00037 #include <Xm/RowColumn.h>
00038 #include <Xm/Xm.h>
00039
00040 G4OpenGLXmBox::G4OpenGLXmBox (const char* n,
00041 G4bool r)
00042 {
00043 name = n;
00044 radio = r;
00045 parent = NULL;
00046 box_row_col = NULL;
00047 }
00048
00049 G4OpenGLXmBox::~G4OpenGLXmBox ()
00050 {}
00051
00052 void G4OpenGLXmBox::AddChild (G4OpenGLXmVWidgetComponent* component)
00053 {
00054 component->AddYourselfTo(this);
00055 Cardinal num_children;
00056 XtVaGetValues (box_row_col,
00057 XmNnumChildren, &num_children,
00058 NULL);
00059
00060 }
00061
00062 void G4OpenGLXmBox::AddYourselfTo (G4OpenGLXmVWidgetShell* window)
00063 {
00064
00065 pView = window->GetView ();
00066 ProcesspView ();
00067 parent = window->GetPointerToWidget ();
00068
00069 box_row_col = XtVaCreateManagedWidget (name,
00070 xmRowColumnWidgetClass,
00071 *parent,
00072
00073 XmNadjustMargin, True,
00074 XmNisHomogeneous, False,
00075 XmNlabelString, (XmString)name,
00076 XmNradioAlwaysOne, radio,
00077 XmNradioBehavior, radio,
00078
00079 XtNvisual, visual,
00080 XtNdepth, depth,
00081 XtNcolormap, cmap,
00082 XtNborderColor, borcol,
00083 XtNbackground, bgnd,
00084
00085 NULL);
00086
00087 }
00088
00089 Widget* G4OpenGLXmBox::GetPointerToParent ()
00090 {
00091 return parent;
00092 }
00093
00094 Widget* G4OpenGLXmBox::GetPointerToWidget ()
00095 {
00096 return &box_row_col;
00097 }
00098
00099 const char* G4OpenGLXmBox::GetName ()
00100 {
00101 return name;
00102 }
00103
00104 void G4OpenGLXmBox::SetName (const char* n)
00105 {
00106 name = n;
00107 }
00108
00109 #endif