35#include <X11/Intrinsic.h>
48 initial =
new char[50];
49 snprintf (initial, 50,
"%6.2f", *val);
61 initial =
new char[50];
62 snprintf (initial, 50,
"%s", val);
76 XmString text_string = XmStringCreateLocalized ((
char*)name);
77 XtVaSetValues (text_label,
78 XmNlabelString, text_string,
80 XmStringFree (text_string);
90 snprintf (initial, 50,
"%6.2f", val);
92 XtVaSetValues (text_field,
93 XmNvalue, (String)initial,
100 snprintf (initial, 50,
"%s", val);
103 XtVaSetValues (text_field,
104 XmNvalue, (String)initial,
121 char local_w_text[50];
122 strcpy (local_w_text, name);
125 strcpy (label_name, name);
126 strcat (label_name,
"_label");
128 char text_field_name[50];
129 strcpy (text_field_name, name);
130 strcat (text_field_name,
"_text_field");
132 XmString local_text = XmStringCreateLocalized (local_w_text);
133 text_label = XtVaCreateManagedWidget (label_name,
137 XmNlabelString, local_text,
146 XmStringFree (local_text);
148 text_field = XtVaCreateManagedWidget (text_field_name,
149 xmTextFieldWidgetClass,
152 XmNvalue, (String)initial,
163 XtAddCallback (text_field,
164 XmNvalueChangedCallback,
168 XtAddCallback (text_field,
169 XmNvalueChangedCallback,
void AddYourselfTo(G4OpenGLXmVWidgetContainer *)
Widget * GetPointerToWidget()
Widget * GetPointerToParent()
void SetName(const char *)
virtual ~G4OpenGLXmTextField()
G4OpenGLXmTextField(const char *, G4double *)
static void get_double_value_callback(Widget w, XtPointer clientData, XtPointer callData)
static void get_text_callback(Widget w, XtPointer clientData, XtPointer callData)