#include <G4VisCommands.hh>
Inheritance diagram for G4VisCommandEnable:
Public Member Functions | |
G4VisCommandEnable () | |
virtual | ~G4VisCommandEnable () |
G4String | GetCurrentValue (G4UIcommand *command) |
void | SetNewValue (G4UIcommand *command, G4String newValue) |
Definition at line 52 of file G4VisCommands.hh.
G4VisCommandEnable::G4VisCommandEnable | ( | ) |
Definition at line 77 of file G4VisCommands.cc.
00077 { 00078 G4bool omitable; 00079 00080 fpCommand = new G4UIcmdWithABool("/vis/enable", this); 00081 fpCommand -> SetGuidance("Enables/disables visualization system."); 00082 fpCommand -> SetParameterName("enabled", omitable=true); 00083 fpCommand -> SetDefaultValue(true); 00084 00085 fpCommand1 = new G4UIcmdWithoutParameter("/vis/disable", this); 00086 fpCommand1 -> SetGuidance("Disables visualization system."); 00087 }
G4VisCommandEnable::~G4VisCommandEnable | ( | ) | [virtual] |
G4String G4VisCommandEnable::GetCurrentValue | ( | G4UIcommand * | command | ) | [virtual] |
Reimplemented from G4UImessenger.
Definition at line 94 of file G4VisCommands.cc.
00094 { 00095 return G4String(); 00096 }
void G4VisCommandEnable::SetNewValue | ( | G4UIcommand * | command, | |
G4String | newValue | |||
) | [virtual] |
Reimplemented from G4UImessenger.
Definition at line 98 of file G4VisCommands.cc.
References G4UIcommand::ConvertToBool(), G4VisManager::Disable(), G4VisManager::Enable(), and G4VVisCommand::fpVisManager.
00099 { 00100 if (command == fpCommand) { 00101 G4bool enable = G4UIcommand::ConvertToBool(newValue); 00102 if (enable) fpVisManager->Enable(); // Printing is in vis manager. 00103 else fpVisManager->Disable(); // Printing is in vis manager. 00104 } else fpVisManager->Disable(); // Printing is in vis manager. 00105 // Note: Printing is in vis manager. 00106 }