#include <G4VisCommandsSceneAdd.hh>
Definition at line 324 of file G4VisCommandsSceneAdd.hh.
◆ G4VisCommandSceneAddText()
G4VisCommandSceneAddText::G4VisCommandSceneAddText |
( |
| ) |
|
Definition at line 2078 of file G4VisCommandsSceneAdd.cc.
2078 {
2080 fpCommand =
new G4UIcommand (
"/vis/scene/add/text",
this);
2081 fpCommand -> SetGuidance ("Adds text to current scene.");
2082 fpCommand -> SetGuidance
2083 ("Use \"/vis/set/textColour\" to set colour.");
2084 fpCommand -> SetGuidance
2085 ("Use \"/vis/set/textLayout\" to set layout:");
2099 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
2102 parameter =
new G4UIparameter (
"font_size",
'd', omitable =
true);
2106 parameter =
new G4UIparameter (
"x_offset",
'd', omitable =
true);
2110 parameter =
new G4UIparameter (
"y_offset",
'd', omitable =
true);
2114 parameter =
new G4UIparameter (
"text",
's', omitable =
true);
2115 parameter->
SetGuidance (
"The rest of the line is text.");
2118}
void SetParameter(G4UIparameter *const newParameter)
void SetDefaultValue(const char *theDefaultValue)
void SetGuidance(const char *theGuidance)
◆ ~G4VisCommandSceneAddText()
G4VisCommandSceneAddText::~G4VisCommandSceneAddText |
( |
| ) |
|
|
virtual |
◆ GetCurrentValue()
◆ SetNewValue()
Reimplemented from G4UImessenger.
Definition at line 2128 of file G4VisCommandsSceneAdd.cc.
2128 {
2129
2132
2134 if (!pScene) {
2136 G4cout <<
"ERROR: No current scene. Please create one." <<
G4endl;
2137 }
2138 return;
2139 }
2140
2150
2152 x *= unit; y *= unit; z *= unit;
2153
2156 g4text.SetVisAttributes(visAtts);
2158 g4text.SetScreenSize(font_size);
2159 g4text.SetOffset(x_offset,y_offset);
2161 const G4String& currentSceneName = pScene -> GetName ();
2162 G4bool successful = pScene -> AddRunDurationModel (model, warn);
2163 if (successful) {
2165 G4cout <<
"Text \"" << text
2166 << "\" has been added to scene \"" << currentSceneName << "\"."
2168 }
2169 }
2170 else G4VisCommandsSceneAddUnsuccessful(verbosity);
2172}
HepGeom::Point3D< G4double > G4Point3D
G4DLLIMPORT std::ostream G4cout
static G4double ValueOf(const char *unitName)
G4double StoD(G4String s)
static G4Colour fCurrentTextColour
static G4VisManager * fpVisManager
static G4Text::Layout fCurrentTextLayout
void UpdateVisManagerScene(const G4String &sceneName="")
G4Scene * GetCurrentScene() const
static Verbosity GetVerbosity()
The documentation for this class was generated from the following files: