Changeset 921 for trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/GettingStarted/graphicalUserInterface.xml
- Timestamp:
- Feb 16, 2009, 10:14:30 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/GettingStarted/graphicalUserInterface.xml
r904 r921 29 29 The "intercoms" category 30 30 provides an expandable command interpreter. It is the key mechanism 31 of Geant4 to realize user interactions of all categories without31 of Geant4 to realize secure user interactions of all categories without 32 32 being annoyed by the dependencies among categories. The direct use 33 33 of Geant4 classes in a C++ program offers a first ground level of … … 36 36 hard-coded in the program. 37 37 </para> 38 39 38 40 39 41 </sect3> … … 52 54 the interfaces category. This interfacing strategy opens an 53 55 important door towards various user interface tools and allows 54 Geant4 to utilize the state-of-the-art GUI tools such as Motif and55 Java,etc..The richness of the collaboration has permitted for56 d ifferent groups to offer various user interfaces to the Geant456 Geant4 to utilize the state-of-the-art GUI tools such as Motif, Qt, 57 and Java etc..The richness of the collaboration has permitted for 58 developers to offer various user interfaces to the Geant4 57 59 command system. Currently available are the following; 58 60 … … 67 69 </para></listitem> 68 70 <listitem><para> 69 GAG, a fully Graphical User Interface and its extension71 GAG, a fully Graphical User Interface and its network extension 70 72 GainServer of the client/server type. 71 73 </para></listitem> … … 76 78 Full implementation of the character 77 79 terminals (1 and 2) is included in the standard Geant4 distribution 78 in the <literal>source/interfaces/basic</literal> directory. As for GAG 79 with rich GUI functionalities, its front-end classes are included 80 in the Geant4 distribution in the source/interfaces/GAG directory. 81 The corresponding GUI package is available either from the author's 82 Web pages (see URL below) or in the distributed package under the 83 <literal>environments/MOMO</literal> directory. 80 in the <literal>source/interfaces/basic</literal> directory. As for GAG, 81 the front-end class is included 82 in the Geant4 distribution in the source/interfaces/GAG directory, 83 while its partner GUI package MOMO.jar is available in the standard Geant4 distribution 84 under the 85 <literal>environments/MOMO</literal> directory. MOMO.jar, Java archive file, contains 86 not only GAG, but also GGE and other helper packages. 87 Supplementary information is available 88 from the author's Webpage(see URL below). 84 89 </para> 85 90 86 91 <para> 87 92 GAG, GainServer's client GUI Gain: 88 <ulink url="http:// erpc1.naruto-u.ac.jp/~geant4">89 http:// erpc1.naruto-u.ac.jp/~geant493 <ulink url="http://www-geant4.kek.jp/~yoshidah"> 94 http://www-geant4.kek.jp/~yoshidah 90 95 </ulink> 91 96 </para> … … 238 243 A command box is at disposal for entering or recalling Geant4 commands. 239 244 Command completion by typing &ldquo;TAB&rdquo; key is 240 available on the command line. The shell commands "exit, cont,245 available on the command line. The shell commands "exit, cont, 241 246 help, ls, cd..." are also supported. A menu bar could be customized 242 247 through the <emphasis>AddMenu</emphasis> and … … 287 292 288 293 <para> 289 They are the front-end classes of Geant4 which interfacewith their290 respective graphical user interfaces, GAG (Geant4 Adaptive GUI) and Gain291 (Geant4 adaptive interface for network) . While GAG must run on the same294 They are the front-end classes of Geant4 which make connection with their 295 respective graphical user interfaces, GAG (Geant4 Adaptive GUI) via pipe, and Gain 296 (Geant4 adaptive interface for network) via sockets. While GAG must run on the same 292 297 system (Windows or Unixen) as a Geant4 application, Gain can run on a 293 remote system (Windows, Linux, etc.) to which JVM (Java Virtual294 Machine) is installed. A Geant4 application is invoked on a Unix298 remote system (Windows, Linux, etc.) in which JRE (Java Runtime 299 Environment) is installed. A Geant4 application is invoked on a Unix 295 300 (Linux) system and behaves as a network server. It opens a port, 296 301 waiting the connection from the Gain. Gain is capable to connect to … … 300 305 301 306 <para> 302 Client GUI, GAG and Gain have almost similar look-and-feel. So, 303 GAG's functionalities are briefly introduced here. Please refer to 304 the above URL for details and to download the client GUIs. 305 </para> 306 307 <para> 308 GAG is a Graphical User Interface tool with which user 309 can set parameters and execute commands. It is adaptive, since GAG 310 reflects the internal states of Geant4 that is a state machine. GAG 311 is based on the server-client model; GAG is the server, while 312 Geant4 executables are clients. Hence, GAG does nothing by itself 313 and it must invoke an executable simulation program. Geant4's 307 Client GUIs, GAG and Gain have almost similar look-and-feel. So, 308 GAG's functionalities are briefly explained here. Please refer to 309 the above URL for details. 310 </para> 311 312 <para> 313 Using GAG, user 314 can select a command, set its parameters and execute it. It is adaptive, in the sense that it 315 reflects the internal states of Geant4 that is a state machine. So, GAG always provides users with 316 the Geant4 commands which may be added, deleted, enabled or disabled during a session. GAG does nothing by itself but to play an intermediate between user and 317 an executable simulation program via pipes. Geant4's 314 318 front-end class <emphasis>G4UIGAG</emphasis> must be instantiated to 315 communicate with GAG. This runs on Linux and Windows 2000. 316 GAG is written in Java and 317 its Jar (Java Archive) file is available from the above URL. See 318 the same pages to know how to install and run Java programs. 319 </para> 319 communicate with GAG. GAG runs on Linux and Windows. If MOMO.jar is in your 320 CLASSPATH, it can be run by a command; 321 </para> 322 323 <informalexample> 324 <programlisting> 325 %java -jar MOMO.jar 326 </programlisting> 327 </informalexample> 320 328 321 329 <para> … … 329 337 a GEANT4 process and to exit GAG. Upon the normal exit or an 330 338 unexpected death of the Geant4 process, GAG window are 331 automatically reset to acceptanother GEANT4 executable.339 automatically reset to run another GEANT4 executable. 332 340 </listitem> 333 341 </varlistentry> … … 335 343 <term>GEANT4 Command tree:</term> 336 344 <listitem> 337 Upon the establishment of the pipe with the GEANT4 process, GAG displays338 the command menu tree whose look and feel is quitesimilar to339 Windows' file browser. Disabled commands are shown opaque. GAG345 Upon the establishment of the pipe connection with the GEANT4 process, GAG displays 346 the command menu, using expandable tree browser whose look and feel is similar to 347 a file browser. Disabled commands are shown in opaque. GAG 340 348 doesn &rsquo;t display commands that are just below the root of 341 349 the command hierarchy. Direct type-in field is available for such … … 364 372 Log can be redirected to the terminal (xterm or cygwin 365 373 window) from which GAG is invoked. It can be interrupted as will, 366 in the middle of long session of execution. Log can be saved to a374 in the middle of a long session of execution. Log can be saved to a 367 375 file independent of the above redirection . GAG displays warning or 368 376 error messages from GEANT4 in a pop-up warning widget. … … 383 391 384 392 <para> 385 The libraries that don't depend on external packages are made by default. 393 The libraries that don't depend on external packages are created by default, using 394 Geant4 configure scripts. 386 395 They include <emphasis>G4UIterminal</emphasis>, <emphasis>G4UItcsh</emphasis> 387 396 and <emphasis>G4UIGAG</emphasis> in libraries <emphasis>libG4UIbasic.a/so</emphasis> and … … 396 405 <emphasis role="bold">G4UI_BUILD_XAW_SESSION</emphasis> or 397 406 <emphasis role="bold">G4UI_BUILD_WIN32_SESSION</emphasis> must be set 398 explicitly .407 explicitly before creating libraries. 399 408 </para> 400 409 … … 405 414 406 415 <para> 407 Build scheme ofthe user interface libraries is416 The scheme of building the user interface libraries is 408 417 specified in "$G4INSTALL/config/G4UI_BUILD.gmk" makefile and the 409 418 dependencies on the external packages are specified in … … 416 425 <sect2 id="sect.HowToSetUpInter.HowToUseInter"> 417 426 <title> 418 How to Use the Interface 427 How to Use the Interface in Your Application 419 428 </title> 420 429 … … 422 431 To use a given interface 423 432 (<literal>G4UIxxx</literal> where <literal>xxx = terminal,Xm, Xaw, Win32, 424 GAG, GainServer</literal>) in a user's program, he has thefollowing425 lines in hismain program;433 GAG, GainServer</literal>) in your program, you have following 434 lines in your main program; 426 435 427 436 <informalexample> 428 437 <programlisting> 429 // to include the class definition in hismain program:438 // to include the class definition in the main program: 430 439 #include "G4Uixxx.hh" 431 // to instantiate a session of hischoice and start the session440 // to instantiate a session of your choice and start the session 432 441 G4UIsession* session = new G4UIxxx; 433 442 session->SessionStart(); 434 // the line next to the "SessionStart" is usually to finish the session443 // the line next to the "SessionStart" is necessary to finish the session 435 444 delete session; 436 445 </programlisting> … … 466 475 467 476 <para> 468 Again, environment variable selectsa given interface. But for your469 convenience, some of them are set defaults.477 Again, environment variable must be preset to select a given interface. But for your 478 convenience, some of them are set by defaults. 470 479 471 480 <itemizedlist spacing="compact"> … … 473 482 <emphasis>G4UIterminal</emphasis>, <emphasis>G4UItcsh</emphasis>, 474 483 <emphasis>G4UIGAG</emphasis> and <emphasis>G4UIGainServer</emphasis> 475 can be used without any environment484 can be used without setting any environment 476 485 variables. Sessions not needing external packages or libraries are 477 486 always built (see "G4UI_BUILD.gmk") and linked, so the user can … … 497 506 <listitem><para> 498 507 If the environment variable <emphasis role="bold">G4UI_NONE</emphasis> is 499 set, no externa 508 set, no external libraries are selected. Also, for your convenience, if any 500 509 <emphasis role="bold">G4UI_USE_XXX</emphasis> environment variable is set, 501 510 then the corresponding C-pre-processor flag is also set. However, if the
Note: See TracChangeset
for help on using the changeset viewer.