3c0 #include #include #include #include "sample.h" //XtAppContext context; //XmStringCharSet char_set = XmSTRING_DEFAULT_CHARSET; //XmStringCharSet char_set = "misco"; //char *char_set = "XmS"; //Widget toplevel, label; void pushed_fn(Widget w, XtPointer client_data, XmPushButtonCallbackStruct *cbs) { printf("Don't push me!\n"); } main(int argc, char **argv) { Widget top_wid, frame, button; XtAppContext app; top_wid = XtVaAppInitialize(&app, "Push", NULL, 0, &argc, argv, NULL, NULL); frame = XtVaCreateManagedWidget("frame", xmFrameWidgetClass, top_wid, XmNshadowType, XmSHADOW_OUT, NULL); button = XmCreatePushButton(frame, "Push_me", NULL, 0); XtManageChild(button); XtAddCallback(button, XmNactivateCallback, (XtCallbackProc)pushed_fn, NULL); XtRealizeWidget(top_wid); XtAppMainLoop(app); } . 0