#include <G4VisCommandsGeometrySet.hh>
Inheritance diagram for G4VisCommandGeometrySetLineStyle:
Public Member Functions | |
G4VisCommandGeometrySetLineStyle () | |
virtual | ~G4VisCommandGeometrySetLineStyle () |
G4String | GetCurrentValue (G4UIcommand *command) |
void | SetNewValue (G4UIcommand *command, G4String newValue) |
Definition at line 266 of file G4VisCommandsGeometrySet.hh.
G4VisCommandGeometrySetLineStyle::G4VisCommandGeometrySetLineStyle | ( | ) |
Definition at line 454 of file G4VisCommandsGeometrySet.cc.
References G4UIparameter::SetDefaultValue(), G4UIparameter::SetGuidance(), G4UIcommand::SetGuidance(), G4UIcommand::SetParameter(), and G4UIparameter::SetParameterCandidates().
00455 { 00456 G4bool omitable; 00457 fpCommand = new G4UIcommand("/vis/geometry/set/lineStyle", this); 00458 fpCommand->SetGuidance("Sets line style of logical volume(s) drawing."); 00459 fpCommand->SetGuidance("\"all\" sets all logical volumes."); 00460 fpCommand->SetGuidance 00461 ("Optionally propagates down hierarchy to given depth."); 00462 G4UIparameter* parameter; 00463 parameter = new G4UIparameter ("logical-volume-name", 's', omitable = true); 00464 parameter->SetDefaultValue("all"); 00465 fpCommand->SetParameter(parameter); 00466 parameter = new G4UIparameter("depth", 'd', omitable = true); 00467 parameter->SetDefaultValue(0); 00468 parameter->SetGuidance 00469 ("Depth of propagation (-1 means unlimited depth)."); 00470 fpCommand->SetParameter(parameter); 00471 parameter = new G4UIparameter("lineStyle", 's', omitable = true); 00472 parameter->SetParameterCandidates("unbroken dashed dotted"); 00473 parameter->SetDefaultValue("unbroken"); 00474 fpCommand->SetParameter(parameter); 00475 }
G4VisCommandGeometrySetLineStyle::~G4VisCommandGeometrySetLineStyle | ( | ) | [virtual] |
G4String G4VisCommandGeometrySetLineStyle::GetCurrentValue | ( | G4UIcommand * | command | ) | [virtual] |
void G4VisCommandGeometrySetLineStyle::SetNewValue | ( | G4UIcommand * | command, | |
G4String | newValue | |||
) | [virtual] |
Reimplemented from G4UImessenger.
Definition at line 489 of file G4VisCommandsGeometrySet.cc.
References G4VisAttributes::dashed, G4VisAttributes::dotted, and G4VisAttributes::unbroken.
00490 { 00491 G4String name, lineStyleString; 00492 G4int requestedDepth; 00493 std::istringstream iss(newValue); 00494 iss >> name >> requestedDepth >> lineStyleString; 00495 G4VisAttributes::LineStyle lineStyle = G4VisAttributes::unbroken; 00496 if (lineStyleString == "unbroken") lineStyle = G4VisAttributes::unbroken; 00497 if (lineStyleString == "dashed") lineStyle = G4VisAttributes::dashed; 00498 if (lineStyleString == "dotted") lineStyle = G4VisAttributes::dotted; 00499 00500 G4VisCommandGeometrySetLineStyleFunction setLineStyle(lineStyle); 00501 Set(name, setLineStyle, requestedDepth); 00502 }