Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VisCommandSetTextLayout Class Reference

#include <G4VisCommandsSet.hh>

+ Inheritance diagram for G4VisCommandSetTextLayout:

Public Member Functions

 G4VisCommandSetTextLayout ()
 
virtual ~G4VisCommandSetTextLayout ()
 
G4String GetCurrentValue (G4UIcommand *command)
 
void SetNewValue (G4UIcommand *command, G4String newValue)
 
- Public Member Functions inherited from G4VVisCommand
 G4VVisCommand ()
 
virtual ~G4VVisCommand ()
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
G4bool operator== (const G4UImessenger &messenger) const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VVisCommand
static void SetVisManager (G4VisManager *)
 
- Protected Member Functions inherited from G4VVisCommand
void UpdateVisManagerScene (const G4String &sceneName="")
 
- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Static Protected Member Functions inherited from G4VVisCommand
static G4String ConvertToString (G4double x, G4double y, const char *unitName)
 
static void ConvertToDoublePair (const G4String &paramString, G4double &xval, G4double &yval)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
- Static Protected Attributes inherited from G4VVisCommand
static G4VisManagerfpVisManager = 0
 
static G4Colour fCurrentColour = G4Colour::White()
 
static G4Colour fCurrentTextColour = G4Colour::Blue()
 
static G4Text::Layout fCurrentTextLayout = G4Text::left
 
static G4double fCurrentLineWidth = 1.
 
static G4ModelingParameters::PVNameCopyNoPath fCurrentTouchablePath
 

Detailed Description

Definition at line 78 of file G4VisCommandsSet.hh.

Constructor & Destructor Documentation

◆ G4VisCommandSetTextLayout()

G4VisCommandSetTextLayout::G4VisCommandSetTextLayout ( )

Definition at line 225 of file G4VisCommandsSet.cc.

226{
227 G4bool omitable;
228 fpCommand = new G4UIcmdWithAString("/vis/set/textLayout", this);
229 fpCommand->SetGuidance
230 ("Defines layout future \"/vis/scene/add/text\" commands.");
231 fpCommand->SetGuidance
232 ("\"left\" (default) for left justification to provided coordinate.");
233 fpCommand->SetGuidance
234 ("\"centre\" or \"center\" for text centered on provided coordinate.");
235 fpCommand->SetGuidance
236 ("\"right\" for right justification to provided coordinate.");
237 fpCommand->SetGuidance("Default: left.");
238 fpCommand->SetParameterName("layout", omitable = true);
239 fpCommand->SetCandidates ("left centre center right");
240 fpCommand->SetDefaultValue ("left");
241}
bool G4bool
Definition: G4Types.hh:67
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156

◆ ~G4VisCommandSetTextLayout()

G4VisCommandSetTextLayout::~G4VisCommandSetTextLayout ( )
virtual

Definition at line 243 of file G4VisCommandsSet.cc.

244{
245 delete fpCommand;
246}

Member Function Documentation

◆ GetCurrentValue()

G4String G4VisCommandSetTextLayout::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 248 of file G4VisCommandsSet.cc.

249{
250 return G4String();
251}

◆ SetNewValue()

void G4VisCommandSetTextLayout::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 253 of file G4VisCommandsSet.cc.

254{
256 if (newValue == "left") layout = G4Text::left;
257 else if (newValue == "centre" || newValue == "center")
258 layout = G4Text::centre;
259 else if (newValue == "right") layout = G4Text::right;
260
261 fCurrentTextLayout = layout;
262
264 if (verbosity >= G4VisManager::confirmations) {
265 G4cout << "Text layout (for future \"text\" commands) has been set to \""
266 << fCurrentTextLayout << "\"."
267 << G4endl;
268 }
269}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
Layout
Definition: G4Text.hh:77
@ centre
Definition: G4Text.hh:77
@ right
Definition: G4Text.hh:77
@ left
Definition: G4Text.hh:77
static G4VisManager * fpVisManager
static G4Text::Layout fCurrentTextLayout
static Verbosity GetVerbosity()

The documentation for this class was generated from the following files: