16 #error only compiles in ARB_OPENGL mode
19 #define GLX_GLXEXT_PROTOTYPES
26 #include <Xm/RowColumn.h>
27 #include <Xm/DrawingA.h>
29 #include <Xm/Separator.h>
31 #include <Xm/CascadeB.h>
32 #include <Xm/MenuShell.h>
33 #include <Xm/ScrollBar.h>
35 #include <X11/IntrinsicP.h>
36 #include <X11/StringDefs.h>
51 const char *windowname,
int width,
int height) {
59 const char *help_button =
"HELP";
60 const char *help_mnemonic =
"H";
62 #if defined(DUMP_MENU_LIST)
63 initMenuListing(windowname);
64 #endif // DUMP_MENU_LIST
74 main_window = XtVaCreateManagedWidget(
"mainWindow1",
78 p_w->
menu_bar[0] = XtVaCreateManagedWidget(
"menu1", xmRowColumnWidgetClass,
80 XmNrowColumnType, XmMENU_BAR,
84 help_popup = XtVaCreatePopupShell(
"menu_shell", xmMenuShellWidgetClass,
88 XmNallowShellResize,
true,
89 XmNoverrideRedirect,
true,
94 xmRowColumnWidgetClass, help_popup,
95 XmNrowColumnType, XmMENU_PULLDOWN,
99 help_label = XtVaCreateManagedWidget(
"menu1_top_b1",
108 form1 = XtVaCreateManagedWidget(
"form1",
111 XmNresizePolicy, XmRESIZE_NONE,
115 xmDrawingAreaWidgetClass,
117 XmNresizePolicy, XmRESIZE_NONE,
124 XmNbottomAttachment, XmATTACH_FORM,
125 XmNleftAttachment, XmATTACH_POSITION,
126 XmNtopAttachment, XmATTACH_POSITION,
131 separator = XtVaCreateManagedWidget(
"separator",
132 xmSeparatorWidgetClass,
135 XmNshadowThickness, 4,
136 XmNorientation, XmVERTICAL,
137 XmNbottomAttachment, XmATTACH_FORM,
138 XmNtopAttachment, XmATTACH_FORM,
139 XmNleftAttachment, XmATTACH_NONE,
141 XmNrightAttachment, XmATTACH_NONE,
146 form2 = XtVaCreateManagedWidget(
"form2",
155 XmNrightAttachment, XmATTACH_FORM,
156 XmNbottomAttachment, XmATTACH_FORM,
157 XmNleftAttachment, XmATTACH_WIDGET,
158 XmNleftWidget, separator,
159 XmNtopAttachment, XmATTACH_POSITION,
160 XmNresizePolicy, XmRESIZE_NONE,
166 xmDrawingAreaWidgetClass,
169 XmNbottomAttachment, XmATTACH_NONE,
170 XmNtopAttachment, XmATTACH_FORM,
171 XmNleftAttachment, XmATTACH_FORM,
172 XmNrightAttachment, XmATTACH_FORM,
179 xmDrawingAreaWidgetClass,
182 XmNbottomAttachment, XmATTACH_FORM,
183 XmNtopAttachment, XmATTACH_NONE,
184 XmNleftAttachment, XmATTACH_FORM,
185 XmNrightAttachment, XmATTACH_FORM,
189 xmScrollBarWidgetClass,
196 XmNrightAttachment, XmATTACH_FORM,
197 XmNbottomAttachment, XmATTACH_FORM,
199 XmNleftAttachment, XmATTACH_FORM,
200 XmNtopAttachment, XmATTACH_NONE,
201 XmNorientation, XmHORIZONTAL,
206 xmScrollBarWidgetClass,
213 XmNrightAttachment, XmATTACH_FORM,
214 XmNbottomAttachment, XmATTACH_WIDGET,
219 XmNleftAttachment, XmATTACH_NONE,
220 XmNtopAttachment, XmATTACH_WIDGET,
224 p_w->
frame = XtVaCreateManagedWidget(
"draw_area",
227 XmNshadowType, XmSHADOW_IN,
228 XmNshadowThickness, 2,
241 XtSetArg(args[n], (
char *)
GLwNrgba, True); n++;
250 static int alpha_Attributes[] = { GLX_RGBA,
258 Widget tmp = XtCreateWidget(
"glw", glwMDrawingAreaWidgetClass,
263 dpy = XtDisplay(tmp);
264 vi = glXChooseVisual(dpy, DefaultScreen(dpy), alpha_Attributes);
268 printf(
"Alpha channel supported\n");
272 printf(
"Alpha channel NOT supported\n");
275 XtSetArg(args[n], XmNmarginHeight, 0); n++;
276 XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
277 XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++;
279 XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++;
280 XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++;
282 glw = XtCreateManagedWidget(
"glw", glwMDrawingAreaWidgetClass,
void aw_realize_widget(AW_window *aww)
Widget menu_bar[AW_MAX_MENU_DEEP]
bool AW_alpha_Size_Supported
char * GBS_string_2_key(const char *str)
char * window_defaults_name
window title
void create_window_variables()
Widget scroll_bar_horizontal
#define GLwNallocateOtherColors
AW_area_management * areas[AW_MAX_AREA]
Widget scroll_bar_vertical
Widget aw_create_shell(AW_window *aww, bool allow_resize, bool allow_close, int width, int height, int posx, int posy)
#define GLwNallocateBackground
#define RES_CONVERT(res_name, res_value)
void make_sensitive(Widget w, AW_active mask)
void aw_insert_default_help_entries(AW_window *aww)
struct _WidgetRec * Widget