Geant4 10.7.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//
28// G4UIGAG.hh
29// GAG(Geant4 adaptive GUI) interface class
30// 18.Feb.98 Y.Nagamatu and T.Kodama created G4UIGAG from G4UIterminal
31
32// If you want to use GAG (Tcl and JAVA version),
33// read a document file README_Momo.html.
34
35#ifndef G4UIGAG_h
36#define G4UIGAG_h 1
37
38#include "G4UIsession.hh"
39#include "G4UImanager.hh"
40#include <fstream>
41#include <vector>
42
45
46// class description:
47//
48// This class inherits the class G4UIsession.
49// This is the class which is the front-end to GAG (Geant4 Adaptive GUI).
50// Its usage is quite similar to G4UIterminal.
51
52class G4UIGAG : public G4UIsession
53{
54 public: // with description
55 G4UIGAG();
56 ~G4UIGAG();
57
59
60 // A GAG session "gagSession" is instantiated.
61 // G4cout stream is redirected by default to the constructed instance.
62 // Usage: G4UIsession * gagSession = new G4UIGAG;
63 // "gagSession" is started.
64 // Usage: gagSession->SessionStart();
65 // "gagSession" is deleted.
66 // Usage: delete gagSession;
67 //
68 void PauseSessionStart(const G4String&);
71 // These methods are implementation of the virtual methods of
72 // G4UIsession class.
73 //
74 void SessionTerminate();
75 void Prompt(const G4String&);
77 // These methods are not for users.
78 private:
80 G4UImanager * UI;
81 G4String promptCharacter;
82 G4bool iExit;
83 G4bool iCont;
84 UImode uiMode;
85
86 private:
87 G4String JVersion;
88 G4String TVersion;
89 void ExecuteCommand(const G4String&);
90 void ChangeDirectory(const G4String&);
91 void ListDirectory(const G4String&);
92 void TerminalHelp(const G4String&);
93 G4String ModifyPrefix(G4String);
94 G4UIcommandTree* FindDirPath(const G4String&);
95 void ShowCurrent(const G4String&);
96 G4String GetFullPath(const G4String&);
97
98 void SendCommandProperties(G4UIcommandTree *);
99 void SendParameterProperties(G4UIcommandTree *);
100 void SendAParamProperty(G4UIcommand *);
101 void SendATclParamProperty(G4UIcommand *);
102 void CodeGenJavaTree(G4UIcommandTree *,int recursiveLevel);
103 void CodeGenJavaParams(G4UIcommandTree *,int recursiveLevel);
104 void CodeGenTclTree(G4UIcommandTree *, int recursiveLevel);
105 void CodeGenTclParams(G4UIcommandTree *, int recursiveLevel);
106 void SendDisableList(G4UIcommandTree *, int recursiveLevel);
107
108 void NotifyStateChange(void);
109 void NotifyCommandUpdate(void);
110 void NotifyParameterUpdate(G4UIcommand *);
111
112 int CommandUpdated(void);
113 void UpdateState(void);
114 void UpdateParamVal(void); // if param is updated,
115 // call NotifyParameterUpdate()
116
117 // --- the following are used by Notify*Update() and *Updated()
118 void GetNewTreeStructure( G4UIcommandTree*,int recursiveLevel);
119 void GetNewTreeValues( G4UIcommandTree*,int recursiveLevel);
120
121 std::vector<G4String> previousTreeCommands;
122 std::vector<G4String> newTreeCommands;
123 std::vector<G4String> previousTreeParams;
124 std::vector<G4String> newTreeParams;
125 std::vector<G4UIcommand*> previousTreePCP;
126 std::vector<G4UIcommand*> newTreePCP;
127
128};
129
130#endif
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
ChangeOfTree
Definition: G4UIGAG.hh:44
@ addedAndDeleted
Definition: G4UIGAG.hh:44
@ added
Definition: G4UIGAG.hh:44
@ deleted
Definition: G4UIGAG.hh:44
@ notChanged
Definition: G4UIGAG.hh:44
UImode
Definition: G4UIGAG.hh:43
@ tcl_mode
Definition: G4UIGAG.hh:43
@ java_mode
Definition: G4UIGAG.hh:43
@ terminal_mode
Definition: G4UIGAG.hh:43
G4UIGAG()
Definition: G4UIGAG.cc:38
G4String GetCommand()
Definition: G4UIGAG.cc:188
void PauseSessionStart(const G4String &)
Definition: G4UIGAG.cc:86
G4UIsession * SessionStart()
Definition: G4UIGAG.cc:71
void Prompt(const G4String &)
Definition: G4UIGAG.cc:183
~G4UIGAG()
Definition: G4UIGAG.cc:61
G4int ReceiveG4cerr(const G4String &)
Definition: G4UIGAG.cc:177
G4int ReceiveG4cout(const G4String &)
Definition: G4UIGAG.cc:171
void SessionTerminate()
Definition: G4UIGAG.cc:336