50 fPlotParameters(plotParameters),
53 fSetLayoutCmd(nullptr),
54 fSetDimensionsCmd(nullptr),
57 fHelper = G4Analysis::make_unique<G4AnalysisMessengerHelper>(
"plot");
77 fSetStyleCmd = G4Analysis::make_unique<G4UIcmdWithAString>(
"/analysis/plot/setStyle",
this);
78 #if defined(TOOLS_USE_FREETYPE)
80 fSetStyleCmd->SetGuidance(
" ROOT_default: ROOT style with high resolution fonts");
81 fSetStyleCmd->SetGuidance(
" hippodraw: hippodraw style with high resolution fonts");
82 fSetStyleCmd->SetGuidance(
" inlib_default: PAW style with low resolution fonts");
85 fSetStyleCmd->SetGuidance(
"Only one plotting style is available in low resolution: ");
86 fSetStyleCmd->SetGuidance(
" inlib_default: PAW style with low resolution fonts");
98 columns->SetGuidance(
"The number of columns in the page layout.");
99 G4String range =
"columns>=1 && columns<=";
100 std::ostringstream osMaxColumns;
102 range.
append(osMaxColumns.str());
103 columns->SetParameterRange(range);
106 rows->SetGuidance(
"The number of rows in the page layout.");
107 range =
"rows>=1 && rows<=";
108 std::ostringstream osMaxRows;
110 range.
append(osMaxRows.str());
111 rows->SetParameterRange(range);
113 fSetLayoutCmd = G4Analysis::make_unique<G4UIcommand>(
"/analysis/plot/setLayout",
this);
119 fSetLayoutCmd->SetGuidance(
"Set page layout (number of columns and rows per page).");
121 G4String guidance =
" columns = 1 .. ";
122 guidance.
append(osMaxColumns.str());
124 guidance =
" rows = 1 .. ";
125 guidance.
append(osMaxRows.str());
126 guidance.
append(
" and >= columns");
137 width->SetGuidance(
"The page width.");
140 height->SetGuidance(
"The page height.");
142 fSetDimensionsCmd = G4Analysis::make_unique<G4UIcommand>(
"/analysis/plot/setDimensions",
this);
143 fSetDimensionsCmd->SetGuidance(
"Set the plotter window size (width and height) in pixels.");
157 std::vector<G4String> parameters;
162 fHelper->WarnAboutParameters(command, parameters.size());
178 #if defined(TOOLS_USE_FREETYPE)
G4String GetAvailableStyles()
std::unique_ptr< G4UIcmdWithAString > fSetStyleCmd
std::unique_ptr< G4UIcommand > fSetLayoutCmd
G4PlotParameters * fPlotParameters
Associated class.
std::unique_ptr< G4AnalysisMessengerHelper > fHelper
virtual void SetNewValue(G4UIcommand *command, G4String value) final
std::unique_ptr< G4UIcommand > fSetDimensionsCmd
std::unique_ptr< G4UIdirectory > fDirectory
static G4int ConvertToInt(const char *st)
void Tokenize(const G4String &line, std::vector< G4String > &tokens)
G4String & append(const G4String &)
void SetLayout(G4int columns, G4int rows)
virtual ~G4PlotMessenger()
void SetDimensions(G4int width, G4int height)
void SetStyle(const G4String &style)
G4int GetParameterEntries() const
G4PlotMessenger(G4PlotParameters *plotParameters)