Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4VisCommandSetTextLayout Class Reference

#include <G4VisCommandsSet.hh>

Inheritance diagram for G4VisCommandSetTextLayout:
Collaboration 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, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VVisCommand
static void SetVisManager (G4VisManager *)
 
static const G4ColourGetCurrentColour ()
 
static G4double GetCurrentLineWidth ()
 
static const G4ColourGetCurrentTextColour ()
 
static G4Text::Layout GetCurrentTextLayout ()
 
static G4double GetCurrentTextSize ()
 
- 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, G4bool commandsToBeBroadcasted=true)
 
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
 
G4bool commandsShouldBeInMaster
 
- Static Protected Attributes inherited from G4VVisCommand
static G4VisManagerfpVisManager = 0
 
static G4int fErrorCode = 0
 
static G4Colour fCurrentColour = G4Colour::White()
 
static G4double fCurrentLineWidth = 1.
 
static G4Colour fCurrentTextColour = G4Colour::Blue()
 
static G4Text::Layout fCurrentTextLayout = G4Text::left
 
static G4double fCurrentTextSize = 12.
 
static
G4ModelingParameters::PVNameCopyNoPath 
fCurrentTouchablePath
 

Detailed Description

Definition at line 77 of file G4VisCommandsSet.hh.

Constructor & Destructor Documentation

G4VisCommandSetTextLayout::G4VisCommandSetTextLayout ( )

Definition at line 224 of file G4VisCommandsSet.cc.

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

Here is the call graph for this function:

G4VisCommandSetTextLayout::~G4VisCommandSetTextLayout ( )
virtual

Definition at line 242 of file G4VisCommandsSet.cc.

243 {
244  delete fpCommand;
245 }

Member Function Documentation

G4String G4VisCommandSetTextLayout::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 247 of file G4VisCommandsSet.cc.

248 {
249  return G4String();
250 }
void G4VisCommandSetTextLayout::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 252 of file G4VisCommandsSet.cc.

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

Here is the call graph for this function:


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