1 /* $XConsortium: Button.h /main/3 1995/11/06 09:39:10 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 Button : public MotifUI {
18 ButtonCallback _callback;
19 void * _callback_data;
20 static void ActivateCB(Widget, XtPointer, XtPointer);
21 ButtonType _button_type;
23 void CreateButton(MotifUI *, char *, char *, ButtonType, ButtonCallback,
24 void *, char *, char *, char *, char *);
28 // If the callback_data is NULL, the this pointer will be the callback data
29 Button(MotifUI *parent,
31 ButtonType button_type = PUSH_BUTTON,
32 ButtonCallback callback = NULL,
33 void * callback_data = NULL,
34 char *mnemonic = NULL,
35 char *acceleratorText = NULL,
36 char *accelerator = NULL,
37 char *iconFile = NULL);
39 Button(char *category,
42 ButtonType button_type = PUSH_BUTTON,
43 ButtonCallback callback = NULL,
44 void * callback_data = NULL,
45 char *mnemonic = NULL,
46 char *acceleratorText = NULL,
47 char *accelerator = NULL,
48 char *iconFile = NULL);
52 void Callback(ButtonCallback cb) { _callback = cb; }
53 void CallbackData(void *data) { _callback_data = data; }
54 ButtonCallback Callback() { return _callback; }
55 void * CallbackData() { return _callback_data; }
56 const char *IconFile() { return _iconFile; }
57 void IconFile(char *);
59 const UI_Class UIClass() { return BUTTON; }
60 const int UISubClass() { return _button_type; }
61 const char *const UIClassName() { return "Button"; }