Geant4_10
G4VisCommandsSceneAdd.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: G4VisCommandsSceneAdd.hh 73609 2013-09-02 10:10:30Z gcosmo $
28 
29 // /vis/scene commands - John Allison 9th August 1998
30 
31 #ifndef G4VISCOMMANDSSCENEADD_HH
32 #define G4VISCOMMANDSSCENEADD_HH
33 
34 #include "G4VisCommandsScene.hh"
35 
37 class G4UIcmdWithAString;
39 
40 #include "G4Transform3D.hh"
41 #include "G4VisAttributes.hh"
42 #include "G4Polyline.hh"
43 #include "G4Text.hh"
44 #include "G4Timer.hh"
45 
47 public:
49  virtual ~G4VisCommandSceneAddArrow ();
51  void SetNewValue (G4UIcommand* command, G4String newValue);
52 private:
55  G4UIcommand* fpCommand;
56 };
57 
59 public:
63  void SetNewValue (G4UIcommand* command, G4String newValue);
64 private:
67  struct Arrow2D {
68  Arrow2D(G4double x1, G4double y1,
70  G4double width, const G4Colour& colour);
71  void operator()(G4VGraphicsScene&, const G4Transform3D&);
72  G4Polyline fShaftPolyline;
73  G4Polyline fHeadPolyline;
74  G4double fWidth;
75  G4Colour fColour;
76  };
77  G4UIcommand* fpCommand;
78 };
79 
81 public:
83  virtual ~G4VisCommandSceneAddAxes ();
85  void SetNewValue (G4UIcommand* command, G4String newValue);
86 private:
89  G4UIcommand* fpCommand;
90 };
91 
93 public:
95  virtual ~G4VisCommandSceneAddDate ();
97  void SetNewValue (G4UIcommand* command, G4String newValue);
98 private:
101  struct Date {
102  Date
103  (G4VisManager* vm, G4int size,
105  const G4String& date):
106  fpVisManager(vm), fSize(size),
107  fX(x), fY(y), fLayout(layout), fDate(date) {}
108  void operator()(G4VGraphicsScene&, const G4Transform3D&);
110  G4Timer fTimer;
111  G4int fSize;
112  G4double fX, fY;
113  G4Text::Layout fLayout;
114  G4String fDate;
115  };
116  G4UIcommand* fpCommand;
117 };
118 
120 public:
122  virtual ~G4VisCommandSceneAddDigis ();
124  void SetNewValue (G4UIcommand* command, G4String newValue);
125 private:
128  G4UIcmdWithoutParameter* fpCommand;
129 };
130 
132 public:
134  virtual ~G4VisCommandSceneAddEventID ();
136  void SetNewValue (G4UIcommand* command, G4String newValue);
137 private:
140  struct EventID {
141  EventID(G4VisManager* vm, G4int size,
142  G4double x, G4double y, G4Text::Layout layout):
143  fpVisManager(vm), fSize(size),
144  fX(x), fY(y), fLayout(layout) {}
145  void operator()(G4VGraphicsScene&, const G4Transform3D&);
147  G4int fSize;
148  G4double fX, fY;
149  G4Text::Layout fLayout;
150  };
151  G4UIcommand* fpCommand;
152 };
153 
155 public:
157  virtual ~G4VisCommandSceneAddFrame ();
159  void SetNewValue (G4UIcommand* command, G4String newValue);
160 private:
163  struct Frame {
164  Frame(G4double size, G4double width, const G4Colour& colour):
165  fSize(size), fWidth(width), fColour(colour) {}
166  void operator()(G4VGraphicsScene&, const G4Transform3D&);
167  G4double fSize;
168  G4double fWidth;
169  G4Colour fColour;
170  };
171  G4UIcommand* fpCommand;
172 };
173 
175 public:
177  virtual ~G4VisCommandSceneAddGhosts ();
179  void SetNewValue (G4UIcommand* command, G4String newValue);
180 private:
182  G4VisCommandSceneAddGhosts& operator =
184  G4UIcmdWithAString* fpCommand;
185 };
186 
188 public:
190  virtual ~G4VisCommandSceneAddHits ();
192  void SetNewValue (G4UIcommand* command, G4String newValue);
193 private:
196  G4UIcmdWithoutParameter* fpCommand;
197 };
198 
200 public:
202  virtual ~G4VisCommandSceneAddLine ();
204  void SetNewValue (G4UIcommand* command, G4String newValue);
205 private:
208  struct Line {
209  Line(G4double x1, G4double y1, G4double z1,
211  G4double width, const G4Colour& colour);
212  void operator()(G4VGraphicsScene&, const G4Transform3D&);
213  G4Polyline fPolyline;
214  G4double fWidth;
215  G4Colour fColour;
216  };
217  G4UIcommand* fpCommand;
218 };
219 
221 public:
223  virtual ~G4VisCommandSceneAddLine2D ();
225  void SetNewValue (G4UIcommand* command, G4String newValue);
226 private:
229  struct Line2D {
230  Line2D(G4double x1, G4double y1,
232  G4double width, const G4Colour& colour);
233  void operator()(G4VGraphicsScene&, const G4Transform3D&);
234  G4Polyline fPolyline;
235  G4double fWidth;
236  G4Colour fColour;
237  };
238  G4UIcommand* fpCommand;
239 };
240 
242 public:
246  void SetNewValue (G4UIcommand* command, G4String newValue);
247 private:
251  G4UIcommand* fpCommand;
252 };
253 
255 public:
257  virtual ~G4VisCommandSceneAddLogo ();
259  void SetNewValue (G4UIcommand* command, G4String newValue);
260 private:
263  // Direction of outward-facing normal to front face of logo.
264  enum Direction {X, minusX, Y, minusY, Z, minusZ};
265  struct G4Logo {
266  G4Logo(G4double height, const G4VisAttributes&);
267  ~G4Logo();
268  void operator()(G4VGraphicsScene&, const G4Transform3D&);
269  private:
270  G4VisAttributes fVisAtts;
271  G4Polyhedron *fpG, *fp4;
272  };
273  G4UIcommand* fpCommand;
274 };
275 
277 public:
279  virtual ~G4VisCommandSceneAddLogo2D ();
281  void SetNewValue (G4UIcommand* command, G4String newValue);
282 private:
285  struct Logo2D {
286  Logo2D
287  (G4VisManager* vm, G4int size,
288  G4double x, G4double y, G4Text::Layout layout):
289  fpVisManager(vm), fSize(size),
290  fX(x), fY(y), fLayout(layout) {}
291  void operator()(G4VGraphicsScene&, const G4Transform3D&);
293  G4int fSize;
294  G4double fX, fY;
295  G4Text::Layout fLayout;
296  };
297  G4UIcommand* fpCommand;
298 };
299 
301 public:
305  void SetNewValue (G4UIcommand* command, G4String newValue);
306 private:
309  G4UIcmdWithAnInteger* fpCommand;
310 };
311 
313 public:
315  virtual ~G4VisCommandSceneAddPSHits ();
317  void SetNewValue (G4UIcommand* command, G4String newValue);
318 private:
321  G4UIcmdWithAString* fpCommand;
322 };
323 
325 public:
327  virtual ~G4VisCommandSceneAddScale ();
329  void SetNewValue (G4UIcommand* command, G4String newValue);
330 private:
333  G4UIcommand* fpCommand;
334 };
335 
337 public:
339  virtual ~G4VisCommandSceneAddText ();
341  void SetNewValue (G4UIcommand* command, G4String newValue);
342 private:
345  G4UIcommand* fpCommand;
346 };
347 
349 public:
351  virtual ~G4VisCommandSceneAddText2D ();
353  void SetNewValue (G4UIcommand* command, G4String newValue);
354 private:
357  struct G4Text2D {
358  G4Text2D(const G4Text&);
359  void operator()(G4VGraphicsScene&, const G4Transform3D&);
360  private:
361  G4Text fText;
362  };
363  G4UIcommand* fpCommand;
364 };
365 
367 public:
371  void SetNewValue (G4UIcommand* command, G4String newValue);
372 private:
376  G4UIcmdWithAString* fpCommand;
377 };
378 
380 public:
384  void SetNewValue (G4UIcommand* command, G4String newValue);
385 private:
388  enum ActionType {runDuration, endOfEvent, endOfRun};
389  void AddVisAction(const G4String& name,G4VUserVisAction*,
390  G4Scene*,ActionType,G4VisManager::Verbosity);
391  G4UIcmdWithAString* fpCommand;
392 };
393 
395 public:
397  virtual ~G4VisCommandSceneAddVolume ();
399  void SetNewValue (G4UIcommand* command, G4String newValue);
400 private:
403  G4UIcommand* fpCommand;
404 };
405 
406 #endif
void SetNewValue(G4UIcommand *command, G4String newValue)
Double_t y2[nxs]
Definition: Style.C:21
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
Definition: G4Text.hh:73
Double_t y1[nxs]
Definition: Style.C:20
G4String GetCurrentValue(G4UIcommand *command)
Double_t x2[nxs]
Definition: Style.C:19
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
#define width
const XML_Char * name
Definition: expat.h:151
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
tuple x
Definition: test.py:50
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
int G4int
Definition: G4Types.hh:78
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
Double_t y
Definition: plot.C:279
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandSceneAddGhosts()
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
Double_t x1[nxs]
Definition: Style.C:18
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
Layout
Definition: G4Text.hh:77
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
double G4double
Definition: G4Types.hh:76
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
static G4VisManager * fpVisManager