1 /* $XConsortium: MainWindow.h /main/3 1995/11/06 09:42:47 rswiston $ */
3 * (c) Copyright 1993, 1994 Hewlett-Packard Company *
4 * (c) Copyright 1993, 1994 International Business Machines Corp. *
5 * (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
6 * (c) Copyright 1993, 1994 Novell, Inc. *
14 class PopupMenuContainer;
17 class MainWindow : public MotifUI {
19 friend void KeyboardPopupMenu(Widget, XEvent *, String *, Cardinal *);
20 friend void PopupMenu(Widget, XtPointer, XEvent *, Boolean *);
24 static XtActionsRec actions[];
25 static void KeyboardPopupMenu(Widget, XEvent *, String *, Cardinal *);
26 static void PopupMenu(Widget, XtPointer, XEvent *, Boolean *);
28 void PostMenu(MotifUI *, XEvent *);
29 PopupMenuContainer *popups;
35 // Derived classes must define Initialize
36 virtual void Initialize() = 0;
38 void CreateMainWindow(MotifUI *parent, char *name, char *widgetName,
39 char *icon, char *icon_name);
43 MainWindow(MotifUI *parent,
47 char *icon_name = NULL);
49 MainWindow(char *category,
54 char *icon_name = NULL);
55 virtual ~MainWindow();
57 void IconFile(char *icon);
58 void IconName(char *icon_name);
59 char *IconFile() { return icon; }
60 char *IconName() { return icon_name; }
62 Button *AddAction(char *name, char *category, ButtonCallback callback,
63 void *callback_data, char *mnemonic = NULL,
64 char *acceleratorText = NULL, char *accelerator = NULL);
65 void RegisterPopup(MotifUI *object);
66 void AddSep(char *category);
68 void SetWorkWindow(MotifUI *obj);
71 int PopupObjectUniqueID;
73 const UI_Class UIClass() { return MAIN_WINDOW; }
74 const char *const UIClassName() { return "MainWindow"; }
78 #endif /* MAINWINDOW_H */