96 fTickLength->GetNumberEntry()->SetToolTipText(
"Set ticks' length");
104 fTicksBoth->SetToolTipText(
"Draw ticks on both axis sides");
107 fLogAxis->SetToolTipText(
"Draw logarithmic scale");
114 fOptimize->SetToolTipText(
"Optimize the number of axis divisions");
117 fMoreLog->SetToolTipText(
"Draw more logarithmic labels");
126 fDiv3->GetNumberEntry()->SetToolTipText(
"Tertiary axis divisions");
131 fDiv2->GetNumberEntry()->SetToolTipText(
"Secondary axis divisions");
136 fDiv1->GetNumberEntry()->SetToolTipText(
"Primary axis divisions");
146 fTitle->SetToolTipText(
"Enter the axis title string");
159 fTitleSize->GetNumberEntry()->SetToolTipText(
"Set title size");
169 fCentered->SetToolTipText(
"Center axis title");
178 fRotated->SetToolTipText(
"Rotate axis title by 180 degrees");
184 fTitleOffset->GetNumberEntry()->SetToolTipText(
"Set title offset");
201 fLabelSize->GetNumberEntry()->SetToolTipText(
"Set labels' size");
207 fNoExponent->SetToolTipText(
"Labels drawn without exponent notation");
213 fLabelOffset->GetNumberEntry()->SetToolTipText(
"Set labels' offset");
223 fDecimal->SetToolTipText(
"Draw the decimal part of labels");
239 fAxisColor->Connect(
"ColorSelected(Pixel_t)",
"TAxisEditor",
this,
"DoAxisColor(Pixel_t)");
240 fTickLength->Connect(
"ValueSet(Long_t)",
"TAxisEditor",
this,
"DoTickLength()");
241 (
fTickLength->GetNumberEntry())->Connect(
"ReturnPressed()",
"TAxisEditor",
this,
"DoTickLength()");
242 fTicksBoth->Connect(
"Toggled(Bool_t)",
"TAxisEditor",
this,
"DoTicks()");
243 fOptimize->Connect(
"Toggled(Bool_t)",
"TAxisEditor",
this,
"DoDivisions()");
244 fLogAxis->Connect(
"Toggled(Bool_t)",
"TAxisEditor",
this,
"DoLogAxis()");
245 fMoreLog->Connect(
"Toggled(Bool_t)",
"TAxisEditor",
this,
"DoMoreLog()");
246 fDiv3->Connect(
"ValueSet(Long_t)",
"TAxisEditor",
this,
"DoDivisions()");
247 (
fDiv3->GetNumberEntry())->Connect(
"ReturnPressed()",
"TAxisEditor",
this,
"DoDivisions()");
248 fDiv2->Connect(
"ValueSet(Long_t)",
"TAxisEditor",
this,
"DoDivisions()");
249 (
fDiv2->GetNumberEntry())->Connect(
"ReturnPressed()",
"TAxisEditor",
this,
"DoDivisions()");
250 fDiv1->Connect(
"ValueSet(Long_t)",
"TAxisEditor",
this,
"DoDivisions()");
251 (
fDiv1->GetNumberEntry())->Connect(
"ReturnPressed()",
"TAxisEditor",
this,
"DoDivisions()");
252 fTitle->Connect(
"TextChanged(const char *)",
"TAxisEditor",
this,
"DoTitle(const char *)");
253 fTitleColor->Connect(
"ColorSelected(Pixel_t)",
"TAxisEditor",
this,
"DoTitleColor(Pixel_t)");
254 fTitleSize->Connect(
"ValueSet(Long_t)",
"TAxisEditor",
this,
"DoTitleSize()");
255 (
fTitleSize->GetNumberEntry())->Connect(
"ReturnPressed()",
"TAxisEditor",
this,
"DoTitleSize()");
256 fTitleFont->Connect(
"Selected(Int_t)",
"TAxisEditor",
this,
"DoTitleFont(Int_t)");
257 fCentered->Connect(
"Toggled(Bool_t)",
"TAxisEditor",
this,
"DoTitleCentered()");
258 fRotated->Connect(
"Toggled(Bool_t)",
"TAxisEditor",
this,
"DoTitleRotated()");
259 fTitleOffset->Connect(
"ValueSet(Long_t)",
"TAxisEditor",
this,
"DoTitleOffset()");
260 (
fTitleOffset->GetNumberEntry())->Connect(
"ReturnPressed()",
"TAxisEditor",
this,
"DoTitleOffset()");
261 fLabelColor->Connect(
"ColorSelected(Pixel_t)",
"TAxisEditor",
this,
"DoLabelColor(Pixel_t)");
262 fLabelSize->Connect(
"ValueSet(Long_t)",
"TAxisEditor",
this,
"DoLabelSize()");
263 (
fLabelSize->GetNumberEntry())->Connect(
"ReturnPressed()",
"TAxisEditor",
this,
"DoLabelSize()");
264 fNoExponent->Connect(
"Toggled(Bool_t)",
"TAxisEditor",
this,
"DoNoExponent()");
265 fDecimal->Connect(
"Toggled(Bool_t)",
"TAxisEditor",
this,
"DoDecimal(Bool_t)");
266 fLabelOffset->Connect(
"ValueSet(Long_t)",
"TAxisEditor",
this,
"DoLabelOffset()");
267 (
fLabelOffset->GetNumberEntry())->Connect(
"ReturnPressed()",
"TAxisEditor",
this,
"DoLabelOffset()");
268 fLabelFont->Connect(
"Selected(Int_t)",
"TAxisEditor",
this,
"DoLabelFont(Int_t)");
288 fDiv1->SetNumber(div % 100);
289 fDiv2->SetNumber((div/100) % 100);
290 fDiv3->SetNumber((div/10000) % 100);
293 if ((!strcmp(
fAxis->GetName(),
"xaxis") &&
fGedEditor->GetPad()->GetLogx()) ||
294 (!strcmp(
fAxis->GetName(),
"yaxis") &&
fGedEditor->GetPad()->GetLogy()) ||
295 (!strcmp(
fAxis->GetName(),
"zaxis") &&
fGedEditor->GetPad()->GetLogz()))
308 const char *both =
fAxis->GetTicks();
309 if (!strcmp(both,
"+-")) {
320 c =
fAxis->GetTitleColor();
324 fl =
fAxis->GetTitleSize();
331 fl =
fAxis->GetTitleOffset();
342 c =
fAxis->GetLabelColor();
346 fl =
fAxis->GetLabelSize();
349 font =
fAxis->GetLabelFont();
353 fl =
fAxis->GetLabelOffset();
385 fAxis->SetTickLength(ticks);
398 fAxis->SetTicks(
"+-");
401 else fAxis->SetTicks(
"");
414 +
fDiv3->GetNumber() * 10000);
430 if (!strcmp(
fAxis->GetName(),
"xaxis"))
gPad->SetLogx(1);
431 if (!strcmp(
fAxis->GetName(),
"yaxis"))
gPad->SetLogy(1);
432 if (!strcmp(
fAxis->GetName(),
"zaxis"))
gPad->SetLogz(1);
440 if (!strcmp(
fAxis->GetName(),
"xaxis"))
gPad->SetLogx(0);
441 if (!strcmp(
fAxis->GetName(),
"yaxis"))
gPad->SetLogy(0);
442 if (!strcmp(
fAxis->GetName(),
"zaxis"))
gPad->SetLogz(0);
458 fAxis->SetMoreLogLabels(flag);
511 fAxis->SetTitleOffset(offset);
522 fAxis->CenterTitle(ctr);
533 fAxis->RotateTitle(rot);
576 fAxis->SetLabelOffset(offset);
587 fAxis->SetNoExponent(exp);
597 fAxis->SetDecimals(on);
598 gStyle->SetStripDecimals(!on);
ULong_t Pixel_t
Pixel value.
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
short Color_t
Color number (short).
short Style_t
Style number (short).
float Float_t
Float 4 bytes (float).
TGCheckButton * fRotated
check button for rotated title
virtual void DoLabelColor(Pixel_t color)
Slot connected to the label color.
virtual void DoTitleColor(Pixel_t color)
Slot connected to the title color.
TGColorSelect * fTitleColor
color selection widget
~TAxisEditor() override
Destructor of axis editor.
virtual void DoAxisColor(Pixel_t color)
Slot connected to the axis color.
virtual void DoTitleCentered()
Slot connected to centered title option.
TGCheckButton * fMoreLog
more logarithmic labels check box
TGNumberEntry * fDiv2
secondary axis division number entry
TGColorSelect * fAxisColor
color selection widget
Int_t fLabelPrec
font precision level
Int_t fTicksFlag
positive/negative ticks' flag
virtual void DoTitleOffset()
Slot connected to the title offset.
virtual void ConnectSignals2Slots()
Connect signals to slots.
virtual void DoTicks()
Slot connected to the ticks draw settings.
virtual void DoTitleFont(Int_t font)
Slot connected to the title font.
TGTextEntry * fTitle
axis title input field
TGCheckButton * fNoExponent
check box for No exponent choice
TGFontTypeComboBox * fTitleFont
title font combo box
TAxisEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor of axis attribute GUI.
TGCheckButton * fLogAxis
logarithmic check box
Int_t fTitlePrec
font precision level
virtual void DoTitle(const char *text)
Slot connected to the axis color.
virtual void DoDecimal(Bool_t on)
Slot connected to the decimal part setting.
TGNumberEntry * fTickLength
tick length number entry
virtual void DoTitleSize()
Slot connected to the title font size.
TGNumberEntry * fTitleOffset
title offset number entry
virtual void DoLabelOffset()
Slot connected to the label offset.
TGNumberEntry * fDiv1
primary axis division number entry
TGNumberEntry * fTitleSize
title size number entry
TGColorSelect * fLabelColor
color selection widget
virtual void DoTickLength()
Slot connected to the tick length settings.
TGCheckButton * fTicksBoth
check box setting ticks on both axis sides
virtual void DoTitleRotated()
Slot connected to the title rotation.
TGNumberEntry * fLabelOffset
label offset number entry
TGCheckButton * fOptimize
tick optimization check box
virtual void DoLogAxis()
Slot for Log scale setting.
TGCheckButton * fCentered
check button for centered title
virtual void DoNoExponent()
Slot connected to the labels' exponent flag.
TGCheckButton * fDecimal
decimal part check box
virtual void DoDivisions()
Slot connected to the number of divisions.
virtual void DoLabelFont(Int_t font)
Slot connected to the label font.
TGNumberEntry * fDiv3
tertiary axis division number entry
void SetModel(TObject *obj) override
Pick up the used values of axis attributes.
virtual void DoMoreLog()
Slot connected to more Log labels flag.
TGNumberEntry * fLabelSize
label size number entry
virtual void DoLabelSize()
Slot connected to the label size.
TGFontTypeComboBox * fLabelFont
label font combo box
Class to manage histogram axis.
static Int_t GetColor(const char *hexcolor)
static ULong_t Number2Pixel(Int_t ci)
Like a checkbutton but instead of the check mark there is color area with a little down arrow.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
TGCompositeFrame(const TGCompositeFrame &)=delete
The TGFontTypeComboBox is user callable and it creates a combobox for selecting the font.
This class handles GUI labels.
This class describes layout hints used by the layout classes.
TGNumberEntry is a number entry input widget with up/down buttons.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
A TGTextEntry is a one line text input widget.
ROOT GUI Window base class.
TGedEditor * fGedEditor
manager of this frame
TGedFrame(const TGedFrame &)=delete
Bool_t fInit
init flag for setting signals/slots
virtual void MakeTitle(const char *title)
Create attribute frame title.
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Bool_t fAvoidSignal
flag for executing slots
Mother of all ROOT objects.