G4VisCommandSceneSelect Class Reference

#include <G4VisCommandsScene.hh>

Inheritance diagram for G4VisCommandSceneSelect:

G4VVisCommandScene G4VVisCommand G4UImessenger

Public Member Functions

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

Detailed Description

Definition at line 129 of file G4VisCommandsScene.hh.


Constructor & Destructor Documentation

G4VisCommandSceneSelect::G4VisCommandSceneSelect (  ) 

Definition at line 773 of file G4VisCommandsScene.cc.

00773                                                   {
00774   G4bool omitable;
00775   fpCommand = new G4UIcmdWithAString ("/vis/scene/select", this);
00776   fpCommand -> SetGuidance ("Selects a scene");
00777   fpCommand -> SetGuidance 
00778     ("Makes the scene current.  \"/vis/scene/list\" to see"
00779      "\n possible scene names.");
00780   fpCommand -> SetParameterName ("scene-name", omitable = false);
00781 }

G4VisCommandSceneSelect::~G4VisCommandSceneSelect (  )  [virtual]

Definition at line 783 of file G4VisCommandsScene.cc.

00783                                                    {
00784   delete fpCommand;
00785 }


Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 787 of file G4VisCommandsScene.cc.

00787                                                                {
00788   return "";
00789 }

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

Reimplemented from G4UImessenger.

Definition at line 791 of file G4VisCommandsScene.cc.

References G4VisManager::confirmations, G4VVisCommand::fpVisManager, G4cout, G4endl, G4VisManager::GetVerbosity(), G4VVisCommand::UpdateVisManagerScene(), and G4VisManager::warnings.

00791                                                                           {
00792 
00793   G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
00794 
00795   G4String& selectName = newValue;
00796   G4SceneList& sceneList = fpVisManager -> SetSceneList ();
00797   G4int iScene, nScenes = sceneList.size ();
00798   for (iScene = 0; iScene < nScenes; iScene++) {
00799     if (sceneList [iScene] -> GetName () == selectName) break;
00800   }
00801   if (iScene >= nScenes) {
00802     if (verbosity >= G4VisManager::warnings) {
00803       G4cout << "WARNING: Scene \"" << selectName
00804              << "\" not found - \"/vis/scene/list\" to see possibilities."
00805              << G4endl;
00806     }
00807     return;
00808   }
00809 
00810   if (verbosity >= G4VisManager::confirmations) {
00811     G4cout << "Scene \"" << selectName
00812            << "\" selected." << G4endl;
00813   }
00814   UpdateVisManagerScene (selectName);
00815 }


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