1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
//
// mxToolKit (c) 1999 by Mete Ciragan
//
// file: mxWidget.h
// implementation: all
// last modified: Apr 28 1999, Mete Ciragan
// copyright: The programs and associated files contained in this
// distribution were developed by Mete Ciragan. The programs
// are not in the public domain, but they are freely
// distributable without licensing fees. These programs are
// provided without guarantee or warrantee expressed or
// implied.
//
#ifndef INCLUDED_MXWIDGET
#define INCLUDED_MXWIDGET
#include "tier0/platform.h"
enum
{
MX_BUTTON,
MX_CHECKBOX,
MX_CHOICE,
MX_GLWINDOW,
MX_MATSYSWINDOW,
MX_GROUPBOX,
MX_LABEL,
MX_LINEEDIT,
MX_LISTBOX,
MX_MENU,
MX_MENUBAR,
MX_POPUPMENU,
MX_PROGRESSBAR,
MX_RADIOBUTTON,
MX_SLIDER,
MX_SCROLLBAR,
MX_TAB,
MX_TOGGLEBUTTON,
MX_TREEVIEW,
MX_WINDOW,
MX_LISTVIEW,
};
class mxWindow;
class mxWidget_i;
class mxWidget
{
mxWidget_i *d_this;
protected:
void setHandle (void *handle);
void setType (int type);
void setParent (mxWindow *parentWindow);
public:
// CREATORS
mxWidget (mxWindow *parent, int x, int y, int w, int h, const char *label = 0);
virtual ~mxWidget ();
// Called just before deletion during shutdown
// Closing of application aborted if any control returns false
virtual bool CanClose();
virtual void OnDelete();
// MANIPULATORS
// void setBounds (int x, int y, int w, int h);
//
//
void setBounds (int x, int y, int w, int h);
// void setLabel (const char *label);
//
//
void setLabel (PRINTF_FORMAT_STRING const char *format, ... );
void setVisible (bool b);
void setEnabled (bool b);
void setId (int id);
void setUserData (void *userData);
// ACCESSORS
void *getHandle () const;
int getType () const;
mxWindow *getParent () const;
int x () const;
int y () const;
int w () const;
int h () const;
int w2 () const;
int h2 () const;
const char *getLabel () const;
bool isVisible () const;
bool isEnabled () const;
int getId () const;
void *getUserData () const;
private:
// NOT IMPLEMENTED
mxWidget (const mxWidget&);
mxWidget& operator= (const mxWidget&);
};
#endif // INCLUDED_MXWIDGET
|