// UILApp #include #define ADD_CALLBACK(n) AddCallback(#n, (void (*)())&n) #define DECLARE_CALLBACK(n) static void n(Widget w, XtPointer client_data, XtPointer call_data); #define DEFINE_CALLBACK(app, n) void app::n(Widget w, XtPointer client_data, XtPointer call_data) class UILApp { private: XtAppContext app_context; Widget toplevel; Widget root_widget; Cardinal status; MrmHierarchy hierarchy; MrmType class_code; protected: void AddCallback(char*, void (*)()); int nCallbacks; int nModules; public: void AddUILModule(char*); void run(int, char* []); private: static MrmRegisterArg* callback_list; typedef struct { String root_widget_name; } app_data_t; static app_data_t app_data; static XtResource resources[]; static XrmOptionDescRec options[]; static String* UIDModules; };