31 #ifdef G4VIS_BUILD_OPENGLXM_DRIVER
36 #include <X11/Intrinsic.h>
41 G4OpenGLXmPushButton::G4OpenGLXmPushButton (
const char*
n,
48 G4OpenGLXmPushButton::~G4OpenGLXmPushButton ()
51 void G4OpenGLXmPushButton::SetName (
const char*
n)
54 XmString button_string = XmStringCreateLocalized ((
char*)
name);
55 XtVaSetValues (button,
56 XmNlabelString, button_string,
58 XmStringFree (button_string);
61 const char* G4OpenGLXmPushButton::GetName ()
66 void G4OpenGLXmPushButton::AddYourselfTo (G4OpenGLXmVWidgetContainer* container)
69 pView = container->GetView ();
71 parent = container->GetPointerToWidget ();
73 XmString button_str = XmStringCreateLocalized ((
char*)
name);
74 button = XtVaCreateManagedWidget
76 xmPushButtonWidgetClass,
78 XmNlabelString, button_str,
79 XmNalignment, XmALIGNMENT_CENTER,
85 XtNborderColor, borcol,
90 XtAddCallbacks (button,
94 XmStringFree (button_str);
97 Widget* G4OpenGLXmPushButton::GetPointerToParent ()
102 Widget* G4OpenGLXmPushButton::GetPointerToWidget ()