source: trunk/documents/UserDoc/UsersGuides/ForApplicationDeveloper/html/GettingStarted/graphicalUserInterface.html @ 1358

Last change on this file since 1358 was 1208, checked in by garnier, 15 years ago

CVS update

File size: 19.6 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4  <title>2.8 How to specify a user interface</title>
5   
6  <style>
7v\:* {behavior:url(#default#VML);}
8o\:* {behavior:url(#default#VML);}
9w\:* {behavior:url(#default#VML);}
10.shape {behavior:url(#default#VML);}
11</style>  <!-- Changed by: Katsuya Amako, 16-Nov-1998 --> <!-- Proof read by: Joe Chuma,   9-Jun-1999 -->
12 <!-- Changed by: Hajime Yoshida 15-Nov-2001 --> <!-- Changed by: Dennis Wright, 29-Nov-2001 -->
13 <!-- Changed by: Hajime Yoshida 15-Jun-2002 -->
14</head>
15  <body>
16 
17<table width="100%">
18  <tbody>
19    <tr>
20 <td> <a href="../../../../Overview/html/index.html"> <img src="../../../../resources/html/IconsGIF/Overview.gif" alt="Overview">
21      </a> <a href="index.html"> <img src="../../../../resources/html/IconsGIF/Contents.gif" alt="Contents">
22      </a> <a href="makeFile.html"> <img src="../../../../resources/html/IconsGIF/Previous.gif" alt="Previous">
23      </a> <a href="executeProgram.html"> <img src="../../../../resources/html/IconsGIF/Next.gif" alt="Next">
24      </a> </td>
25 <td align="Right"> <font size="-1" color="#238e23"> <b>Geant4 User's Guide</b>
26 <br>
27 <b>For Application Developers</b> <br>
28 <b>Getting Started with Geant4</b> </font> </td>
29 </tr>
30  </tbody>
31</table>
32 <br>
33<br>
34 
35<p align="Center"> <font size="+3" color="#238e23"> <b> 2.8 How to Set Up
36an Interactive Session  </b> </font> <br>
37<br>
38  </p>
39<hr align="Center" size="7"> 
40<p>  <a name="2.8.1"> 
41<h2>2.8.1 Introduction</h2>
42</a> </p>
43<p> <b>Roles of the "intercoms" category</b>  </p>
44<div class="MsoNormal">&nbsp;The&nbsp; "intercoms" category provides an expandable
45command interpreter. It is the key mechanism of Geant4 to realize user interactions
46of all categories without being annoyed by the dependencies among categories.
47The direct use of Geant4 classes in a C++ program offers a first ground level
48of interactivity, i.e., the batch session. As seen in the examples/novice/N01,
49Geant4 commands and macros are to be hard-coded in the program.</div>
50 
51<p>  <b>User Interfaces to steer the simulation</b>  </p>
52<div class="MsoNormal">&nbsp;To avoid too much programming, the "intercoms"
53category provides the abstract class <i>G4UIsession </i>that captures interactive
54commands . The concrete implementation of the user interface and Graphical
55User Interfaces (GUI) is left to the&nbsp; interfaces category. This interfacing
56strategy opens an important door towards various user interface tools and
57allows Geant4 to utilize the state-of-the-art GUI tools such as Motif and
58Java, etc..The richness of the collaboration has permitted for different groups
59to offer various user interfaces to the Geant4 command system. Currently available
60are the following;
61<ol>
62 
63  <li> Character terminal (dumb terminal and tcsh(bash)-like terminal), the
64default user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; interface of Geant4,</li>
65 
66  <li> Xm, Xaw, Qt, Win32, variations of the upper terminal by using a Motif,
67Athena, Qt or Windows widget to retrieve commands, and</li>
68 
69  <li> GAG, a fully Graphical User Interface and its extension GainServer
70 of the client/server type.</li>
71 
72</ol>
73 </div>
74 
75<div class="MsoNormal">Full implementation of the character terminals (1 and
762) is included in the standard Geant4 distribution in the  <tt>source/interfaces/basic</tt>
77directory.&nbsp; As for GAG with rich GUI functionalities,
78its front-end classes are included in the Geant4 distribution in the source/interfaces/GAG
79directory. The corresponding GUI package is available either from the author's
80Web pages (see URL below) or in the distributed package under the <tt>environments/MOMO</tt>
81directory.</div>
82 
83<table border="0" cellpadding="0" style="mso-cellspacing:1.5pt;mso-padding-alt:
84 0cm 0cm 0cm 0cm">
85 <caption>&nbsp;</caption>  <tbody>
86    <tr>
87 <td valign="Top" style="padding-top: 0.75pt; padding-right: 0.75pt; padding-bottom: 0.75pt; padding-left: 0.75pt; ">
88 
89      <div class="MsoNormal"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
90GAG, GainServer's client GUI Gain&nbsp;</tt></div>
91 </td>
92  <td style="padding-top: 0.75pt; padding-right: 0.75pt; padding-bottom: 0.75pt; padding-left: 0.75pt; ">
93 
94      <div class="MsoNormal"><a href="http://erpc1.naruto-u.ac.jp/%7Egeant4">
95http://erpc1.naruto-u.ac.jp/~geant4</a></div>
96 </td>
97 </tr>
98 
99  </tbody>
100</table>
101 
102<div class="MsoNormal" style="text-align: center; "> 
103<center> 
104<hr size="2" width="100%" align="Center"></center>
105 </div>
106  <a name="2.8.2"> 
107<h2>2.8.2 A Short Description of Available Interface Classes</h2>
108</a> 
109<p> </p>
110<h3 style="margin-left: 36pt; text-indent: -18pt; "> 1. <i>G4U<b>I</b>terminal</i>
111 and <i>G4UItcsh </i>classes</h3>
112 
113<div class="MsoNormal" style="margin-left: 36pt; text-indent: 3pt; ">&nbsp;These
114interfaces open a session on the character terminal. <i>G4UIterminal</i> runs
115on all platform supported by Geant4, including <i>cygwin</i> on Windows, while
116<i>G4UItcsh</i> runs on Solaris and Linux. G4UItcsh supports user-friendly
117key bindings a-la-tcsh (or bash);</div>
118 
119<div class="MsoNormal" style="margin-left: 36pt; text-indent: 3pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
120^A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; move cursor to the top</div>
121 
122<div class="MsoNormal" style="margin-left: 36pt; text-indent: 3pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
123^B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; backward cursor ([LEFT]
124cursor)</div>
125 
126<div class="MsoNormal" style="margin-left: 36pt; text-indent: 3pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
127^D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delete/exit/show matched list</div>
128 
129<div class="MsoNormal" style="margin-left: 36pt; text-indent: 3pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
130^E&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; move cursor to the end</div>
131 
132<div class="MsoNormal" style="margin-left: 36pt; text-indent: 3pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
133^F&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; forward
134cursor ([RIGHT] cursor)</div>
135 
136<div class="MsoNormal" style="margin-left: 36pt; text-indent: 3pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
137^K&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clear after the cursor</div>
138 
139<div class="MsoNormal" style="margin-left: 36pt; text-indent: 3pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
140^N&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next command ([DOWN] cursor)</div>
141 
142<div class="MsoNormal" style="margin-left: 36pt; text-indent: 3pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
143^P&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; previous command
144([UP] cursor)</div>
145 
146<div class="MsoNormal" style="margin-left: 36pt; text-indent: 3pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
147TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; command completion</div>
148 
149<div class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
150&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
151backspace</div>
152 
153<div class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
154&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; BS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
155backspace</div>
156 
157<div class="MsoNormal">&nbsp; In addition, the following string substitutions
158are supported;</div>
159 
160<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
161%s&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; current application status</div>
162 
163<div class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
164%/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; current working directory</div>
165 
166<div class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
167%h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; history number</div>
168 
169<h3 style="margin-left: 36pt; text-indent: -18pt; "> <b>2. <i>G4UIXm</i>,
170<i>G4UIXaw</i>, <i>G4UIQt</i> and <i>G4UIWin32</i> classes</b></h3>
171 
172<div class="MsoNormal" style="margin-left: 36pt; ">&nbsp; These interfaces
173are versions of <i>G4UIterminal</i> implemented over libraries Motif, Athena
174and WIN32 respectively. <i>G4UIXm</i> uses the Motif XmCommand widget, <i>
175G4UIXaw</i> the Athena dialog widget, <i>G4UIQt</i> the Qt toolkit and <i>G4UIWin32</i> the Windows "edit"
176component to do the command capturing. These interfaces are useful if working
177in conjunction with visualization drivers that use the Xt library or the
178WIN32 one.</div>
179 
180<div class="MsoNormal" style="margin-left: 36pt; ">&nbsp; A command box is
181at disposal for entering or recalling Geant4 commands. Command completion
182by typing &amp;ldquo;TAB&amp;rdquo; key is available on the command line.
183The&nbsp; shellcommands "exit, cont, help, ls, cd..." are also supported.
184A menu bar could be customized through the <i>AddMenu</i> and <i>AddButton</i>
185 method.</div>
186 
187<div class="MsoNormal" style="margin-left: 36pt; ">&nbsp; Ex:</div>
188 
189<div class="MsoNormal" style="margin-left: 36pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
190/gui/addMenu&nbsp;&nbsp;&nbsp; test Test</div>
191 
192<div class="MsoNormal" style="margin-left: 36pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
193/gui/addButton&nbsp;&nbsp;&nbsp; test Init /run/initialize</div>
194 
195<div class="MsoNormal" style="margin-left: 36pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
196/gui/addButton&nbsp;&nbsp;&nbsp; test&nbsp;&nbsp;&nbsp;&nbsp; "Set gun"&nbsp;&nbsp;&nbsp;&nbsp; 
197"/control/execute gun.g4m"</div>
198 
199<div class="MsoNormal" style="margin-left: 36pt; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
200/gui/addButton&nbsp;&nbsp;&nbsp;&nbsp; test&nbsp;&nbsp;&nbsp;&nbsp; "Run one
201event"&nbsp;&nbsp;&nbsp; "/run/beamOn 1"</div>
202 
203<div class="MsoNormal" style="margin-left: 36pt; "><i>&nbsp; G4UIXm </i>runs
204on Unix/Linux with Motif. <i>G4UIXaw</i>, less user friendly, runs on Unix
205with Athena widgets. <i>G4UIQt</i> run everywhere and <i>G4UIWin32</i> runs on Windows.</div>
206 
207<h3 style="margin-left: 36pt; text-indent: -18pt; "> <b>3. <i>G4UIGAG</i>
208 and G4UIGainServer classes</b></h3>
209 
210<div style="margin-left: 36pt; text-indent: -18pt; ">They are the front-end
211classes of Geant4 which interface with their respective<br>
212graphical user interfaces, GAG (Geant4 Adaptive GUI) and Gain (Geant4 adaptive<br>
213interface for network). While GAG must run on the same system (Windows or
214Unixen) as a Geant4 application, Gain can run on a remote system (Windows,
215Linux, etc.) to which JVM (Java Virtual Machine) is installed. A Geant4 application
216is invoked on a Unix (Linux) system and behaves as a network server. It opens
217a port, waiting the connection from the Gain. Gain is capable to connect
218to multiple Geant4 "servers" on Unixen systems at different institutes.<br>
219<br>
220Client GUI, GAG and Gain have almost similar look-and-feel. So, GAG's functionalities
221are briefly introduced here. Please refer to the above URL for details and
222to download the client GUIs.<br>
223<br>
224&nbsp; GAG is a Graphical User&nbsp; Interface tool with which user can set
225parameters and execute commands. It is adaptive, since GAG reflects the internal
226states of Geant4 that is a state machine. GAG is based on the server-client
227model; GAG is the server, while Geant4 executables are clients. Hence, GAG
228does nothing by itself and it must invoke an executable simulation program.
229Geant4's front-end class <i>G4UIGAG </i>must be instantiated to communicate
230with GAG. This runs on Linux and Windows 2000.</div>
231 
232<div style="margin-left: 36pt; ">&nbsp;GAG is written in Java and its Jar
233(Java Archive) file is available from the above URL. See the same pages to
234know how to install and run Java programs.</div>
235 
236<p><br>
237&nbsp;&nbsp;&nbsp;&nbsp; GAG has following functions. </p>
238<div class="MsoNormal" style="margin-left: 72pt; text-indent: -18pt; "> 
239<ul>
240  <li> GAG Menu:&nbsp;&nbsp;<b>&nbsp;&nbsp; </b>The menus are to choose and
241run a GEANT4 executable file, to kill or exit&nbsp; a&nbsp; GEANT4 process
242and to exit GAG. Upon the normal exit or an unexpected death of the Geant4
243process, GAG window are automatically reset to accept another GEANT4 executable.</li>
244 
245  <li> GEANT4 Command tree:&nbsp;<b>&nbsp;&nbsp;&nbsp;&nbsp; </b>Upon the
246establishment of the pipe with the GEANT4 process, GAG displays the command
247menu tree whose look and feel is quite similar to Windows' file browser.
248Disabled commands are shown opaque. GAG doesn&amp;rsquo;t display commands
249that are just below the root of the command hierarchy. Direct type-in field
250is available for such input. Guidance of command categories and commands are
251displayed upon focusing .&nbsp; GAG has a command history function. User
252can re-execute a command with old parameters, edit the history, or save the
253history to create a macro file.</li>
254 
255  <li> Command Parameter panel:<b> </b>GAG's parameter panel is the user-friendliest
256part. It displays parameter name, its guidance, its type(s) (integer, double,
257Boolean or string), omittable, default value(s), expression(s) of its range
258and candidate list(s) (for example, of units). Range check is done by&nbsp; 
259intercoms and the error message from it is shown in the pop-up dialog box.
260When a parameter component has a candidate list, a list box is automatically
261displayed . When a file is requested by a command, the file chooser is available.</li>
262 
263  <li> Logging:<b> </b>Log can be redirected to the terminal (xterm or cygwin
264window) from which GAG is invoked. It can be interrupted as will, in the middle
265of long session of execution. Log can be saved to a file independent of the
266above redirection . GAG displays warning or error messages from GEANT4 in
267a pop-up warning widget.</li>
268 
269</ul>
270 </div>
271 
272<div class="MsoNormal" style="text-align: center; "> 
273<center> 
274<hr size="2" width="100%" align="Center"></center>
275 </div>
276  <a name="2.8.3"> 
277<h2>2.8.3 Building the Interface Libraries</h2>
278</a> 
279<p> &nbsp; The libraries that don't depend on external packages are made
280by default. They include <i>G4UIterminal</i>, <i>G4UItcsh</i> and <i>G4UIGAG</i>
281 in libraries <i>libG4UIbasic.a/so </i>and <i>libG4UIGAG.a/so</i>. &nbsp;<i>
282G4UIGainServer.o</i> is packed in the <i>libG4UIGAG</i>.<br>
283&nbsp; To make the libraries of <i>G4UIXm</i>, <i>G4UIXaw</i>, <i>G4UIQt</i> and <i>G4UIWin32</i>
284, respective environment variables <b>G4UI_BUILD_XM_SESSION</b> , <b>G4UI_BUILD_XAW_SESSION</b>, <b>G4UI_BUILD_QT_SESSION</b> or <b>G4UI_BUILD_WIN32_SESSION</b> must be set explicitly. </p>
285<p>&nbsp; However, if the environment variable <b>G4UI_NONE</b> is set, no
286interface libraries are built at all. </p>
287<p>&nbsp;&nbsp; Build scheme of the user interface libraries is specified
288in "$G4INSTALL/config/G4UI_BUILD.gmk" makefile and the dependencies on the
289external packages are specified in&nbsp; "$G4INSTALL/config/interactivity.gmk".
290</p>
291<div class="MsoNormal" style="text-align: center; "> 
292<center> 
293<hr size="2" width="100%" align="Center"></center>
294 </div>
295  <a name="2.8.4"> 
296<h2>2.8.4 How to Use the Interface</h2>
297</a> 
298<p> </p>
299<div class="MsoNormal">&nbsp;To use a given interface (<tt>G4UIxxx</tt> where&nbsp;
300<tt>xxx = terminal,Xm, Xaw, Qt, Win32, GAG, GainServer</tt>) in a user's program,
301he has the following lines in his main program;</div>
302 
303<ul type="Disc">
304 
305  <li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
306     mso-list:l0 level1 lfo9;tab-stops:list 36.0pt">
307 // to include the class definition in his main&nbsp; program:</li>
308 
309  <li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
310     mso-list:l0 level1 lfo9;tab-stops:list 36.0pt">
311 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #include
312"G4Uixxx.hh"</li>
313 
314  <li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
315     mso-list:l0 level1 lfo9;tab-stops:list 36.0pt">
316 // to instantiate a session of his choice and start the session</li>
317 
318  <li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
319     mso-list:l0 level1 lfo9;tab-stops:list 36.0pt">
320 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; G4UIsession*
321session = new G4UIxxx;</li>
322 
323  <li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
324     mso-list:l0 level1 lfo9;tab-stops:list 36.0pt">
325 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session-&gt;SessionStart();</li>
326 
327  <li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
328     mso-list:l0 level1 lfo9;tab-stops:list 36.0pt">
329 / /the line next to the "SessionStart" is usually to finish the session</li>
330 
331  <li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
332     mso-list:l0 level1 lfo9;tab-stops:list 36.0pt">
333 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delete
334session;</li>
335 
336</ul>
337 
338<div style="margin-left: 36pt; text-indent: -18pt; ">&nbsp;For a tcsh session,
339the second line must be :</div>
340 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; G4UIsession*
341session = new G4UIterminal(new G4UItcsh); 
342<p style="tab-stops:list 36.0pt">See the examples in&nbsp; "examples/novice/N0x"
343in which the terminal session is used.  </p>
344<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
345tab-stops:list 36.0pt">
346Again, environment variable selects a given interface. But for your convenience,
347some of them are set defaults. </p>
348<ul>
349 
350  <li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
351 <i>G4UIterminal</i>, <i>G4UItcsh</i>, <i>G4UIGAG </i>and <i>G4UIGainServer</i>
352 can be used without any environment variables. Sessions not needing external
353packages or libraries are always built (see "G4UI_BUILD.gmk") and linked,
354so the user can instantiate one of these sessions without rebuilding the
355libraries and without setting any environment variables. For backwards compatibility
356with user code, as typified by geant4/examples main programs, the C-pre-processor
357variables corresponding to the original environment variables for the above
358three (i.e., <b>G4UI_USE_TERMINAL</b>, <b>G4UI_USE_TCSH</b> and <b>G4UI_USE_GAG</b>
359) are set. However, if he/she sets no environment variables, then the C-pre-processor
360variable <b>G4UI_USE_TERMINAL</b> is set by default, although there is no
361need to use it.</li>
362 
363  <li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
364 The environment variable <b>G4UI_USE_XM</b>, <b>G4UI_USE_XAW</b>, <b>G4UI_USE_QT</b> or <b>G4UI_USE_WIN32</b>
365 must be set to use the respective interface. The file
366"$G4INSTALL/config/interactivity.gmk" resolves their dependencies on external
367packages.</li>
368 
369  <li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
370 If the environment variable <b>G4UI_NONE</b> is set, no externa ibraries
371are selected. Also, for your convenience, if any <b>G4UI_USE_XXX</b> environment
372variable is set, then the corresponding C-pre-processor flag is also set.
373However, if the environment variable <b>G4UI_NONE</b> is set, no C-pre-processor
374flags are set.</li>
375 
376</ul>
377  <a href="../../../../Authors/html/subjectsToAuthors.html"> <i>About the
378authors</i></a> 
379</body>
380</html>
Note: See TracBrowser for help on using the repository browser.