source: trunk/source/interfaces/html/classG4Win32.html @ 828

Last change on this file since 828 was 571, checked in by garnier, 17 years ago

r581@mac-90108: laurentgarnier | 2007-08-17 17:30:26 +0200
deplacement de frame

  • Property svn:mime-type set to text/html
File size: 17.7 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>G4Win32 class Reference</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5</head><body>
6<!-- Generated by Doxygen 1.3.4 -->
7<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8<h1>G4Win32 Class Reference</h1><code>#include &lt;<a class="el" href="G4Win32_8hh-source.html">G4Win32.hh</a>&gt;</code>
9<p>
10Inheritance diagram for G4Win32:<p><center><img src="classG4Win32__inherit__graph.png" border="0" usemap="#G4Win32__inherit__map" alt="Inheritance graph"></center>
11<map name="G4Win32__inherit__map">
12<area href="classG4VInteractorManager.html" shape="rect" coords="7,8,229,744" alt="">
13</map>
14<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for G4Win32:<p><center><img src="classG4Win32__coll__graph.png" border="0" usemap="#G4Win32__coll__map" alt="Collaboration graph"></center>
15<map name="G4Win32__coll__map">
16<area href="classG4VInteractorManager.html" shape="rect" coords="7,8,229,744" alt="">
17</map>
18<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classG4Win32-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
19<tr><td></td></tr>
20<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
21<tr><td class="memItemLeft" nowrap align=right valign=top>G4bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4Win32.html#a0">Inited</a> ()</td></tr>
22
23<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4Win32.html#a1">GetEvent</a> ()</td></tr>
24
25<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4Win32.html#a2">FlushAndWaitExecution</a> ()</td></tr>
26
27<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4Win32.html#a3">~G4Win32</a> ()</td></tr>
28
29<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
30<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classG4Win32.html">G4Win32</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4Win32.html#e0">getInstance</a> ()</td></tr>
31
32<tr><td class="memItemLeft" nowrap align=right valign=top>G4bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4Win32.html#e1">dispatchWin32Event</a> (void *)</td></tr>
33
34<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
35<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4Win32.html#d0">G4Win32</a> ()</td></tr>
36
37<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr>
38<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classG4Win32.html">G4Win32</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classG4Win32.html#v0">instance</a> = NULL</td></tr>
39
40</table>
41<hr><h2>Constructor &amp; Destructor Documentation</h2>
42<a class="anchor" name="a3" doxytag="G4Win32::~G4Win32" ></a><p>
43<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
44  <tr>
45    <td class="mdRow">
46      <table cellpadding="0" cellspacing="0" border="0">
47        <tr>
48          <td class="md" nowrap valign="top"> G4Win32::~<a class="el" href="classG4Win32.html">G4Win32</a> </td>
49          <td class="md" valign="top">(&nbsp;</td>
50          <td class="mdname1" valign="top" nowrap>          </td>
51          <td class="md" valign="top">&nbsp;)&nbsp;</td>
52          <td class="md" nowrap><code> [virtual]</code></td>
53        </tr>
54
55      </table>
56    </td>
57  </tr>
58</table>
59<table cellspacing=5 cellpadding=0 border=0>
60  <tr>
61    <td>
62      &nbsp;
63    </td>
64    <td>
65
66<p>
67!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
68<p>
69Definition at line <a class="el" href="G4Win32_8cc-source.html#l00095">95</a> of file <a class="el" href="G4Win32_8cc-source.html">G4Win32.cc</a>.
70<p>
71References <a class="el" href="G4Win32_8cc-source.html#l00041">instance</a>.
72<p>
73<div class="fragment"><pre>00099 {
7400100   <span class="keywordflow">if</span>(<span class="keyword">this</span>==<a class="code" href="classG4Win32.html#v0">instance</a>) {
7500101     <a class="code" href="classG4Win32.html#v0">instance</a> = NULL;
7600102   }
7700103 }
78</pre></div>    </td>
79  </tr>
80</table>
81<a class="anchor" name="d0" doxytag="G4Win32::G4Win32" ></a><p>
82<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
83  <tr>
84    <td class="mdRow">
85      <table cellpadding="0" cellspacing="0" border="0">
86        <tr>
87          <td class="md" nowrap valign="top"> G4Win32::G4Win32 </td>
88          <td class="md" valign="top">(&nbsp;</td>
89          <td class="mdname1" valign="top" nowrap>          </td>
90          <td class="md" valign="top">&nbsp;)&nbsp;</td>
91          <td class="md" nowrap><code> [private]</code></td>
92        </tr>
93
94      </table>
95    </td>
96  </tr>
97</table>
98<table cellspacing=5 cellpadding=0 border=0>
99  <tr>
100    <td>
101      &nbsp;
102    </td>
103    <td>
104
105<p>
106!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
107<p>
108Definition at line <a class="el" href="G4Win32_8cc-source.html#l00057">57</a> of file <a class="el" href="G4Win32_8cc-source.html">G4Win32.cc</a>.
109<p>
110References <a class="el" href="G4VInteractorManager_8cc-source.html#l00152">G4VInteractorManager::AddDispatcher()</a>, <a class="el" href="G4Win32_8cc-source.html#l00039">className</a>, <a class="el" href="G4Win32_8cc-source.html#l00136">dispatchWin32Event()</a>, <a class="el" href="G4VInteractorManager_8hh-source.html#l00039">G4DispatchFunction</a>, <a class="el" href="G4VInteractorManager_8cc-source.html#l00119">G4VInteractorManager::SetMainInteractor()</a>, <a class="el" href="G4Win32_8cc-source.html#l00044">topWindow</a>, and <a class="el" href="G4Win32_8cc-source.html#l00043">Win32Inited</a>.
111<p>
112Referenced by <a class="el" href="G4Win32_8cc-source.html#l00046">getInstance()</a>.
113<p>
114<div class="fragment"><pre>00061 {
11500062   <span class="keywordflow">if</span>(<a class="code" href="G4Win32_8cc.html#a1">Win32Inited</a>==FALSE) { <span class="comment">// Should be Done once.</span>
11600063
11700064     WNDCLASS         wc;
11800065     wc.style         = CS_HREDRAW | CS_VREDRAW;
11900066     wc.lpfnWndProc   = (WNDPROC)DefWindowProc;
12000067     wc.cbClsExtra    = 0;
12100068     wc.cbWndExtra    = 0;
12200069     wc.hInstance     = ::GetModuleHandle(NULL);
12300070     wc.hIcon         = LoadIcon  (NULL,IDI_APPLICATION);
12400071     wc.hCursor       = LoadCursor(NULL,IDC_ARROW);
12500072     wc.hbrBackground = GetStockBrush(BLACK_BRUSH);
12600073     wc.lpszMenuName  = <a class="code" href="G4Win32_8cc.html#a0">className</a>;
12700074     wc.lpszClassName = <a class="code" href="G4Win32_8cc.html#a0">className</a>;
12800075     ::RegisterClass  (&amp;wc);
12900076     
13000077     <a class="code" href="G4Win32_8cc.html#a2">topWindow</a>   = ::CreateWindow(<a class="code" href="G4Win32_8cc.html#a0">className</a>,<a class="code" href="G4Win32_8cc.html#a0">className</a>,
13100078                                  WS_OVERLAPPEDWINDOW,
13200079                                  CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
13300080                                  NULL, NULL,
13400081                                  ::GetModuleHandle(NULL),
13500082                                  NULL);
13600083     
13700084     <span class="keywordflow">if</span>(<a class="code" href="G4Win32_8cc.html#a2">topWindow</a>==NULL) {
13800085       G4cout &lt;&lt; <span class="stringliteral">"G4Win32 : Unable to create Win32 window."</span> &lt;&lt; G4endl;
13900086     }
14000087
14100088     <a class="code" href="G4Win32_8cc.html#a1">Win32Inited</a> = TRUE;
14200089   }
14300090
14400091   <a class="code" href="classG4VInteractorManager.html#a6">AddDispatcher</a>((<a class="code" href="G4VInteractorManager_8hh.html#a1">G4DispatchFunction</a>)G4Win32::dispatchWin32Event);
14500092   <a class="code" href="classG4VInteractorManager.html#a4">SetMainInteractor</a>(topWindow);
14600093 }
147</pre></div>    </td>
148  </tr>
149</table>
150
151<p>
152Here is the call graph for this function:<p><center><img src="classG4Win32_d0_cgraph.png" border="0" usemap="#classG4Win32_d0_cgraph_map" alt=""></center>
153<map name="classG4Win32_d0_cgraph_map">
154<area href="classG4VInteractorManager.html#a6" shape="rect" coords="206,8,459,34" alt="">
155<area href="classG4Win32.html#e1" shape="rect" coords="229,58,437,85" alt="">
156<area href="classG4VInteractorManager.html#a4" shape="rect" coords="198,109,467,136" alt="">
157</map>
158<hr><h2>Member Function Documentation</h2>
159<a class="anchor" name="e1" doxytag="G4Win32::dispatchWin32Event" ></a><p>
160<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
161  <tr>
162    <td class="mdRow">
163      <table cellpadding="0" cellspacing="0" border="0">
164        <tr>
165          <td class="md" nowrap valign="top"> G4bool G4Win32::dispatchWin32Event </td>
166          <td class="md" valign="top">(&nbsp;</td>
167          <td class="md" nowrap valign="top">void *&nbsp;</td>
168          <td class="mdname1" valign="top" nowrap> <em>a_event</em>          </td>
169          <td class="md" valign="top">&nbsp;)&nbsp;</td>
170          <td class="md" nowrap><code> [static]</code></td>
171        </tr>
172
173      </table>
174    </td>
175  </tr>
176</table>
177<table cellspacing=5 cellpadding=0 border=0>
178  <tr>
179    <td>
180      &nbsp;
181    </td>
182    <td>
183
184<p>
185!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
186<p>
187Definition at line <a class="el" href="G4Win32_8cc-source.html#l00136">136</a> of file <a class="el" href="G4Win32_8cc-source.html">G4Win32.cc</a>.
188<p>
189Referenced by <a class="el" href="G4Win32_8cc-source.html#l00057">G4Win32()</a>.
190<p>
191<div class="fragment"><pre>00141 {
19200142   ::TranslateMessage((MSG*)a_event);
19300143   ::DispatchMessage ((MSG*)a_event);
19400144   <span class="keywordflow">return</span> TRUE;
19500145 }
196</pre></div>    </td>
197  </tr>
198</table>
199<a class="anchor" name="a2" doxytag="G4Win32::FlushAndWaitExecution" ></a><p>
200<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
201  <tr>
202    <td class="mdRow">
203      <table cellpadding="0" cellspacing="0" border="0">
204        <tr>
205          <td class="md" nowrap valign="top"> void G4Win32::FlushAndWaitExecution </td>
206          <td class="md" valign="top">(&nbsp;</td>
207          <td class="mdname1" valign="top" nowrap>          </td>
208          <td class="md" valign="top">&nbsp;)&nbsp;</td>
209          <td class="md" nowrap><code> [virtual]</code></td>
210        </tr>
211
212      </table>
213    </td>
214  </tr>
215</table>
216<table cellspacing=5 cellpadding=0 border=0>
217  <tr>
218    <td>
219      &nbsp;
220    </td>
221    <td>
222
223<p>
224!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
225<p>
226Implements <a class="el" href="classG4VInteractorManager.html#a23">G4VInteractorManager</a>.
227<p>
228Definition at line <a class="el" href="G4Win32_8cc-source.html#l00124">124</a> of file <a class="el" href="G4Win32_8cc-source.html">G4Win32.cc</a>.
229<p>
230<div class="fragment"><pre>00128 {
23100129   MSG event;
23200130   <span class="keywordflow">while</span> ( ::PeekMessage(&amp;event, NULL, 0, 0, PM_REMOVE) ) {
23300131     ::TranslateMessage(&amp;event);
23400132     ::DispatchMessage (&amp;event);
23500133   }
23600134 }
237</pre></div>    </td>
238  </tr>
239</table>
240<a class="anchor" name="a1" doxytag="G4Win32::GetEvent" ></a><p>
241<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
242  <tr>
243    <td class="mdRow">
244      <table cellpadding="0" cellspacing="0" border="0">
245        <tr>
246          <td class="md" nowrap valign="top"> void * G4Win32::GetEvent </td>
247          <td class="md" valign="top">(&nbsp;</td>
248          <td class="mdname1" valign="top" nowrap>          </td>
249          <td class="md" valign="top">&nbsp;)&nbsp;</td>
250          <td class="md" nowrap><code> [virtual]</code></td>
251        </tr>
252
253      </table>
254    </td>
255  </tr>
256</table>
257<table cellspacing=5 cellpadding=0 border=0>
258  <tr>
259    <td>
260      &nbsp;
261    </td>
262    <td>
263
264<p>
265!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
266<p>
267Implements <a class="el" href="classG4VInteractorManager.html#a22">G4VInteractorManager</a>.
268<p>
269Definition at line <a class="el" href="G4Win32_8cc-source.html#l00113">113</a> of file <a class="el" href="G4Win32_8cc-source.html">G4Win32.cc</a>.
270<p>
271<div class="fragment"><pre>00117 {
27200118   <span class="keyword">static</span> MSG event;
27300119   BOOL status = ::GetMessage(&amp;event, NULL, 0, 0);
27400120   <span class="keywordflow">if</span>(status==FALSE) <span class="keywordflow">return</span> NULL;
27500121   <span class="keywordflow">return</span> &amp;event;
27600122 }
277</pre></div>    </td>
278  </tr>
279</table>
280<a class="anchor" name="e0" doxytag="G4Win32::getInstance" ></a><p>
281<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
282  <tr>
283    <td class="mdRow">
284      <table cellpadding="0" cellspacing="0" border="0">
285        <tr>
286          <td class="md" nowrap valign="top"> <a class="el" href="classG4Win32.html">G4Win32</a> * G4Win32::getInstance </td>
287          <td class="md" valign="top">(&nbsp;</td>
288          <td class="mdname1" valign="top" nowrap>          </td>
289          <td class="md" valign="top">&nbsp;)&nbsp;</td>
290          <td class="md" nowrap><code> [static]</code></td>
291        </tr>
292
293      </table>
294    </td>
295  </tr>
296</table>
297<table cellspacing=5 cellpadding=0 border=0>
298  <tr>
299    <td>
300      &nbsp;
301    </td>
302    <td>
303
304<p>
305!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
306<p>
307Definition at line <a class="el" href="G4Win32_8cc-source.html#l00046">46</a> of file <a class="el" href="G4Win32_8cc-source.html">G4Win32.cc</a>.
308<p>
309References <a class="el" href="G4Win32_8cc-source.html#l00057">G4Win32()</a>, and <a class="el" href="G4Win32_8cc-source.html#l00041">instance</a>.
310<p>
311Referenced by <a class="el" href="G4UIWin32_8cc-source.html#l00182">G4UIWin32::G4UIWin32()</a>.
312<p>
313<div class="fragment"><pre>00050 {
31400051   <span class="keywordflow">if</span> (<a class="code" href="classG4Win32.html#v0">instance</a>==NULL) {
31500052     <a class="code" href="classG4Win32.html#v0">instance</a> = <span class="keyword">new</span> <a class="code" href="classG4Win32.html#d0">G4Win32</a>();
31600053   }
31700054   <span class="keywordflow">return</span> <a class="code" href="classG4Win32.html#v0">instance</a>;
31800055 }
319</pre></div>    </td>
320  </tr>
321</table>
322
323<p>
324Here is the call graph for this function:<p><center><img src="classG4Win32_e0_cgraph.png" border="0" usemap="#classG4Win32_e0_cgraph_map" alt=""></center>
325<map name="classG4Win32_e0_cgraph_map">
326<area href="classG4Win32.html#d0" shape="rect" coords="210,58,352,85" alt="">
327<area href="classG4VInteractorManager.html#a6" shape="rect" coords="409,8,662,34" alt="">
328<area href="classG4Win32.html#e1" shape="rect" coords="432,58,640,85" alt="">
329<area href="classG4VInteractorManager.html#a4" shape="rect" coords="401,109,670,136" alt="">
330</map>
331<a class="anchor" name="a0" doxytag="G4Win32::Inited" ></a><p>
332<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
333  <tr>
334    <td class="mdRow">
335      <table cellpadding="0" cellspacing="0" border="0">
336        <tr>
337          <td class="md" nowrap valign="top"> G4bool G4Win32::Inited </td>
338          <td class="md" valign="top">(&nbsp;</td>
339          <td class="mdname1" valign="top" nowrap>          </td>
340          <td class="md" valign="top">&nbsp;)&nbsp;</td>
341          <td class="md" nowrap><code> [virtual]</code></td>
342        </tr>
343
344      </table>
345    </td>
346  </tr>
347</table>
348<table cellspacing=5 cellpadding=0 border=0>
349  <tr>
350    <td>
351      &nbsp;
352    </td>
353    <td>
354
355<p>
356!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
357<p>
358Implements <a class="el" href="classG4VInteractorManager.html#a21">G4VInteractorManager</a>.
359<p>
360Definition at line <a class="el" href="G4Win32_8cc-source.html#l00105">105</a> of file <a class="el" href="G4Win32_8cc-source.html">G4Win32.cc</a>.
361<p>
362References <a class="el" href="G4Win32_8cc-source.html#l00043">Win32Inited</a>.
363<p>
364<div class="fragment"><pre>00109 {
36500110   <span class="keywordflow">return</span> <a class="code" href="G4Win32_8cc.html#a1">Win32Inited</a>;
36600111 }
367</pre></div>    </td>
368  </tr>
369</table>
370<hr><h2>Member Data Documentation</h2>
371<a class="anchor" name="v0" doxytag="G4Win32::instance" ></a><p>
372<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
373  <tr>
374    <td class="mdRow">
375      <table cellpadding="0" cellspacing="0" border="0">
376        <tr>
377          <td class="md" nowrap valign="top"> <a class="el" href="classG4Win32.html">G4Win32</a> * <a class="el" href="classG4Win32.html#v0">G4Win32::instance</a> = NULL<code> [static, private]</code>
378      </table>
379    </td>
380  </tr>
381</table>
382<table cellspacing=5 cellpadding=0 border=0>
383  <tr>
384    <td>
385      &nbsp;
386    </td>
387    <td>
388
389<p>
390
391<p>
392Definition at line <a class="el" href="G4Win32_8cc-source.html#l00041">41</a> of file <a class="el" href="G4Win32_8cc-source.html">G4Win32.cc</a>.
393<p>
394Referenced by <a class="el" href="G4Win32_8cc-source.html#l00046">getInstance()</a>, and <a class="el" href="G4Win32_8cc-source.html#l00095">~G4Win32()</a>.    </td>
395  </tr>
396</table>
397<hr>The documentation for this class was generated from the following files:<ul>
398<li><a class="el" href="G4Win32_8hh-source.html">G4Win32.hh</a><li><a class="el" href="G4Win32_8cc-source.html">G4Win32.cc</a></ul>
399<hr size="1"><address style="align: right;"><small>Generated on Fri Jun 22 11:08:06 2007 by
400<a href="http://www.doxygen.org/index.html">
401<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
402</a>1.3.4 </small></address>
403</body>
404</html>
Note: See TracBrowser for help on using the repository browser.