File: wx272.htm

package info (click to toggle)
wxwin2-doc 2.01-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,540 kB
  • ctags: 5,968
  • sloc: cpp: 15,157; makefile: 434; sh: 6
file content (247 lines) | stat: -rw-r--r-- 7,797 bytes parent folder | download
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<HTML>
<head><title>Macros</title></head>

<BODY BGCOLOR=#FFFFFF>
<A NAME="macros"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx264.htm#functions"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx271.htm#miscellany"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx273.htm#resourcefuncs"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>

<H2>Macros</H2>
<P>
These macros are defined in wxWindows.<P>
<A HREF="#classinfo">CLASSINFO</A><BR>
<A HREF="#debugnew">WXDEBUG_NEW</A><BR>
<A HREF="#topic1104">DECLARE_ABSTRACT_CLASS</A><BR>
<A HREF="#declareapp">DECLARE_APP</A><BR>
<A HREF="#topic1105">DECLARE_CLASS</A><BR>
<A HREF="#topic1106">DECLARE_DYNAMIC_CLASS</A><BR>
<A HREF="#topic1107">IMPLEMENT_ABSTRACT_CLASS</A><BR>
<A HREF="#topic1108">IMPLEMENT_ABSTRACT_CLASS2</A><BR>
<A HREF="#implementapp">IMPLEMENT_APP</A><BR>
<A HREF="#topic1109">IMPLEMENT_CLASS</A><BR>
<A HREF="#topic1110">IMPLEMENT_CLASS2</A><BR>
<A HREF="#topic1111">IMPLEMENT_DYNAMIC_CLASS</A><BR>
<A HREF="#topic1112">IMPLEMENT_DYNAMIC_CLASS2</A><BR>
<A HREF="#trace">WXTRACE</A><BR>
<A HREF="#tracelevel">WXTRACELEVEL</A><BR>
<P>

<HR>
<A NAME="classinfo"></A>
<H3>CLASSINFO</H3>
<P>
<B>wxClassInfo *</B> <B>CLASSINFO</B>(className)<P>
Returns a pointer to the wxClassInfo object associated with this class.<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/object.h&gt;<P>

<HR>
<A NAME="debugnew"></A>
<H3>WXDEBUG_NEW</H3>
<P>
<B></B> <B>WXDEBUG_NEW</B>(arg)<P>
This is defined in debug mode to be call the redefined new operator
with filename and line number arguments. The definition is:<P>
<PRE>
#define WXDEBUG_NEW new(__FILE__,__LINE__)
</PRE>
In non-debug mode, this is defined as the normal new operator.<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/object.h&gt;<P>

<HR>
<A NAME="topic1104"></A>
<H3>DECLARE_ABSTRACT_CLASS</H3>
<P>
<B></B> <B>DECLARE_ABSTRACT_CLASS</B>(className)<P>
Used inside a class declaration to declare that the class should be
made known to the class hierarchy, but objects of this class cannot be created
dynamically. The same as DECLARE_CLASS.<P>
Example:<P>
<PRE>
class wxCommand: public wxObject
{
  DECLARE_ABSTRACT_CLASS(wxCommand)

 private:
  ...
 public:
  ...
};
</PRE>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/object.h&gt;<P>

<HR>
<A NAME="declareapp"></A>
<H3>DECLARE_APP</H3>
<P>
<B></B> <B>DECLARE_APP</B>(className)<P>
This is used in headers to create a forward declaration of the wxGetApp function implemented
by IMPLEMENT_APP. It creates the declaration <TT>className&amp; wxGetApp(void)</TT>.<P>
Example:<P>
<PRE>
  DECLARE_APP(MyApp)
</PRE>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/app.h&gt;<P>

<HR>
<A NAME="topic1105"></A>
<H3>DECLARE_CLASS</H3>
<P>
<B></B> <B>DECLARE_CLASS</B>(className)<P>
Used inside a class declaration to declare that the class should be
made known to the class hierarchy, but objects of this class cannot be created
dynamically. The same as DECLARE_ABSTRACT_CLASS.<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/object.h&gt;<P>

<HR>
<A NAME="topic1106"></A>
<H3>DECLARE_DYNAMIC_CLASS</H3>
<P>
<B></B> <B>DECLARE_DYNAMIC_CLASS</B>(className)<P>
Used inside a class declaration to declare that the objects of this class should be dynamically
createable from run-time type information.<P>
Example:<P>
<PRE>
class wxFrame: public wxWindow
{
  DECLARE_DYNAMIC_CLASS(wxFrame)

 private:
  const wxString\& frameTitle;
 public:
  ...
};
</PRE>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/object.h&gt;<P>

<HR>
<A NAME="topic1107"></A>
<H3>IMPLEMENT_ABSTRACT_CLASS</H3>
<P>
<B></B> <B>IMPLEMENT_ABSTRACT_CLASS</B>(className, baseClassName)<P>
Used in a C++ implementation file to complete the declaration of
a class that has run-time type information. The same as IMPLEMENT_CLASS.<P>
Example:<P>
<PRE>
IMPLEMENT_ABSTRACT_CLASS(wxCommand, wxObject)

wxCommand::wxCommand(void)
{
...
}
</PRE>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/object.h&gt;<P>

<HR>
<A NAME="topic1108"></A>
<H3>IMPLEMENT_ABSTRACT_CLASS2</H3>
<P>
<B></B> <B>IMPLEMENT_ABSTRACT_CLASS2</B>(className, baseClassName1, baseClassName2)<P>
Used in a C++ implementation file to complete the declaration of
a class that has run-time type information and two base classes. The same as IMPLEMENT_CLASS2.<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/object.h&gt;<P>

<HR>
<A NAME="implementapp"></A>
<H3>IMPLEMENT_APP</H3>
<P>
<B></B> <B>IMPLEMENT_APP</B>(className)<P>
This is used in the application class implementation file to make the application class known to
wxWindows for dynamic construction. You use this instead of<P>
Old form:<P>
<PRE>
  MyApp myApp;
</PRE>
New form:<P>
<PRE>
  IMPLEMENT_APP(MyApp)
</PRE>
See also <A HREF="wx272.htm#declareapp">DECLARE_APP</A>.<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/app.h&gt;<P>

<HR>
<A NAME="topic1109"></A>
<H3>IMPLEMENT_CLASS</H3>
<P>
<B></B> <B>IMPLEMENT_CLASS</B>(className, baseClassName)<P>
Used in a C++ implementation file to complete the declaration of
a class that has run-time type information. The same as IMPLEMENT_ABSTRACT_CLASS.<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/object.h&gt;<P>

<HR>
<A NAME="topic1110"></A>
<H3>IMPLEMENT_CLASS2</H3>
<P>
<B></B> <B>IMPLEMENT_CLASS2</B>(className, baseClassName1, baseClassName2)<P>
Used in a C++ implementation file to complete the declaration of a
class that has run-time type information and two base classes. The
same as IMPLEMENT_ABSTRACT_CLASS2.<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/object.h&gt;<P>

<HR>
<A NAME="topic1111"></A>
<H3>IMPLEMENT_DYNAMIC_CLASS</H3>
<P>
<B></B> <B>IMPLEMENT_DYNAMIC_CLASS</B>(className, baseClassName)<P>
Used in a C++ implementation file to complete the declaration of
a class that has run-time type information, and whose instances
can be created dynamically.<P>
Example:<P>
<PRE>
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)

wxFrame::wxFrame(void)
{
...
}
</PRE>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/object.h&gt;<P>

<HR>
<A NAME="topic1112"></A>
<H3>IMPLEMENT_DYNAMIC_CLASS2</H3>
<P>
<B></B> <B>IMPLEMENT_DYNAMIC_CLASS2</B>(className, baseClassName1, baseClassName2)<P>
Used in a C++ implementation file to complete the declaration of
a class that has run-time type information, and whose instances
can be created dynamically. Use this for classes derived from two
base classes.<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/object.h&gt;<P>

<HR>
<A NAME="trace"></A>
<H3>WXTRACE</H3>
<P>
<B></B> <B>WXTRACE</B>(formatString, ...)<P>
Calls wxTrace with printf-style variable argument syntax. Output
is directed to the current output stream (see <A HREF="wx295.htm#wxdebugcontextoverview">wxDebugContext</A>).<P>
This macro is now obsolete, replaced by <A HREF="wx274.htm#logfunctions">Log functions</A>.<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/memory.h&gt;<P>

<HR>
<A NAME="tracelevel"></A>
<H3>WXTRACELEVEL</H3>
<P>
<B></B> <B>WXTRACELEVEL</B>(level, formatString, ...)<P>
Calls wxTraceLevel with printf-style variable argument syntax. Output
is directed to the current output stream (see <A HREF="wx295.htm#wxdebugcontextoverview">wxDebugContext</A>).
The first argument should be the level at which this information is appropriate.
It will only be output if the level returned by wxDebugContext::GetLevel is equal to or greater than
this value.<P>
This function is now obsolete, replaced by <A HREF="wx274.htm#logfunctions">Log functions</A>.<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/memory.h&gt;<P>

</BODY></HTML>