Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4UIGAG.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id$
28//
29// G4UIGAG.hh
30// GAG(Geant4 adaptive GUI) interface class
31// 18.Feb.98 Y.Nagamatu and T.Kodama created G4UIGAG from G4UIterminal
32
33// If you want to use GAG (Tcl and JAVA version),
34// read a document file README_Momo.html.
35
36#ifndef G4UIGAG_h
37#define G4UIGAG_h 1
38
39#include "G4UIsession.hh"
40#include "G4UImanager.hh"
41#include <fstream>
42#include <vector>
43
46
47// class description:
48//
49// This class inherits the class G4UIsession.
50// This is the class which is the front-end to GAG (Geant4 Adaptive GUI).
51// Its usage is quite similar to G4UIterminal.
52
53class G4UIGAG : public G4UIsession
54{
55 public: // with description
56 G4UIGAG();
57 ~G4UIGAG();
58
60
61 // A GAG session "gagSession" is instantiated.
62 // G4cout stream is redirected by default to the constructed instance.
63 // Usage: G4UIsession * gagSession = new G4UIGAG;
64 // "gagSession" is started.
65 // Usage: gagSession->SessionStart();
66 // "gagSession" is deleted.
67 // Usage: delete gagSession;
68 //
69 void PauseSessionStart(const G4String&);
72 // These methods are implementation of the virtual methods of
73 // G4UIsession class.
74 //
75 void SessionTerminate();
76 void Prompt(const G4String&);
78 // These methods are not for users.
79 private:
81 G4UImanager * UI;
82 G4String promptCharacter;
83 G4bool iExit;
84 G4bool iCont;
85 UImode uiMode;
86
87 private:
88 G4String JVersion;
89 G4String TVersion;
90 void ExecuteCommand(const G4String&);
91 void ChangeDirectory(const G4String&);
92 void ListDirectory(const G4String&);
93 void TerminalHelp(const G4String&);
94 G4String ModifyPrefix(G4String);
95 G4UIcommandTree* FindDirPath(const G4String&);
96 void ShowCurrent(const G4String&);
97 G4String GetFullPath(const G4String&);
98
99 void SendCommandProperties(G4UIcommandTree *);
100 void SendParameterProperties(G4UIcommandTree *);
101 void SendAParamProperty(G4UIcommand *);
102 void SendATclParamProperty(G4UIcommand *);
103 void CodeGenJavaTree(G4UIcommandTree *,int recursiveLevel);
104 void CodeGenJavaParams(G4UIcommandTree *,int recursiveLevel);
105 void CodeGenTclTree(G4UIcommandTree *, int recursiveLevel);
106 void CodeGenTclParams(G4UIcommandTree *, int recursiveLevel);
107 void SendDisableList(G4UIcommandTree *, int recursiveLevel);
108
109 void NotifyStateChange(void);
110 void NotifyCommandUpdate(void);
111 void NotifyParameterUpdate(G4UIcommand *);
112
113 int CommandUpdated(void);
114 void UpdateState(void);
115 void UpdateParamVal(void); // if param is updated,
116 // call NotifyParameterUpdate()
117
118 // --- the following are used by Notify*Update() and *Updated()
119 void GetNewTreeStructure( G4UIcommandTree*,int recursiveLevel);
120 void GetNewTreeValues( G4UIcommandTree*,int recursiveLevel);
121
122 std::vector<G4String> previousTreeCommands;
123 std::vector<G4String> newTreeCommands;
124 std::vector<G4String> previousTreeParams;
125 std::vector<G4String> newTreeParams;
126 std::vector<G4UIcommand*> previousTreePCP;
127 std::vector<G4UIcommand*> newTreePCP;
128
129};
130
131#endif
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
ChangeOfTree
Definition: G4UIGAG.hh:45
@ addedAndDeleted
Definition: G4UIGAG.hh:45
@ added
Definition: G4UIGAG.hh:45
@ deleted
Definition: G4UIGAG.hh:45
@ notChanged
Definition: G4UIGAG.hh:45
UImode
Definition: G4UIGAG.hh:44
@ tcl_mode
Definition: G4UIGAG.hh:44
@ java_mode
Definition: G4UIGAG.hh:44
@ terminal_mode
Definition: G4UIGAG.hh:44
G4UIGAG()
Definition: G4UIGAG.cc:39
G4String GetCommand()
Definition: G4UIGAG.cc:189
void PauseSessionStart(const G4String &)
Definition: G4UIGAG.cc:87
G4UIsession * SessionStart()
Definition: G4UIGAG.cc:72
void Prompt(const G4String &)
Definition: G4UIGAG.cc:184
~G4UIGAG()
Definition: G4UIGAG.cc:62
G4int ReceiveG4cerr(const G4String &)
Definition: G4UIGAG.cc:178
G4int ReceiveG4cout(const G4String &)
Definition: G4UIGAG.cc:172
void SessionTerminate()
Definition: G4UIGAG.cc:337