G4VisCommandSetTextLayout Class Reference

#include <G4VisCommandsSet.hh>

Inheritance diagram for G4VisCommandSetTextLayout:

G4VVisCommand G4UImessenger

Public Member Functions

 G4VisCommandSetTextLayout ()
virtual ~G4VisCommandSetTextLayout ()
G4String GetCurrentValue (G4UIcommand *command)
void SetNewValue (G4UIcommand *command, G4String newValue)

Detailed Description

Definition at line 78 of file G4VisCommandsSet.hh.


Constructor & Destructor Documentation

G4VisCommandSetTextLayout::G4VisCommandSetTextLayout (  ) 

Definition at line 225 of file G4VisCommandsSet.cc.

References G4UIcmdWithAString::SetCandidates(), G4UIcmdWithAString::SetDefaultValue(), G4UIcommand::SetGuidance(), and G4UIcmdWithAString::SetParameterName().

00226 {
00227   G4bool omitable;
00228   fpCommand = new G4UIcmdWithAString("/vis/set/textLayout", this);
00229   fpCommand->SetGuidance
00230     ("Defines layout future \"/vis/scene/add/text\" commands.");
00231   fpCommand->SetGuidance
00232     ("\"left\" (default) for left justification to provided coordinate.");
00233   fpCommand->SetGuidance
00234     ("\"centre\" or \"center\" for text centered on provided coordinate.");
00235   fpCommand->SetGuidance
00236     ("\"right\" for right justification to provided coordinate.");
00237   fpCommand->SetGuidance("Default: left.");
00238   fpCommand->SetParameterName("layout", omitable = true);
00239   fpCommand->SetCandidates ("left centre center right");
00240   fpCommand->SetDefaultValue ("left");
00241 }

G4VisCommandSetTextLayout::~G4VisCommandSetTextLayout (  )  [virtual]

Definition at line 243 of file G4VisCommandsSet.cc.

00244 {
00245   delete fpCommand;
00246 }


Member Function Documentation

G4String G4VisCommandSetTextLayout::GetCurrentValue ( G4UIcommand command  )  [virtual]

Reimplemented from G4UImessenger.

Definition at line 248 of file G4VisCommandsSet.cc.

00249 {
00250   return G4String();
00251 }

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

Reimplemented from G4UImessenger.

Definition at line 253 of file G4VisCommandsSet.cc.

References G4Text::centre, G4VisManager::confirmations, G4VVisCommand::fCurrentTextLayout, G4VVisCommand::fpVisManager, G4cout, G4endl, G4VisManager::GetVerbosity(), G4Text::left, and G4Text::right.

00254 {
00255   G4Text::Layout layout = G4Text::left;
00256   if (newValue == "left") layout = G4Text::left;
00257   else if (newValue == "centre" || newValue == "center")
00258     layout = G4Text::centre;
00259   else if (newValue == "right") layout = G4Text::right;
00260 
00261   fCurrentTextLayout = layout;
00262 
00263   G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
00264   if (verbosity >= G4VisManager::confirmations) {
00265     G4cout << "Text layout (for future \"text\" commands) has been set to \""
00266            << fCurrentTextLayout << "\"."
00267            << G4endl;
00268   }
00269 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:45 2013 for Geant4 by  doxygen 1.4.7