Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TAxisEditor.cxx
Go to the documentation of this file.
1// @(#)root/ged:$Id$
2// Author: Ilka Antcheva 11/05/04
3
4/*************************************************************************
5 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12
13/** \class TAxisEditor
14 \ingroup ged
15
16Implements GUI for axis attributes.
17 axis color
18 ticks parameters: length, setting on both axis sides,
19 logarithmic or linear scale along the selected axis,
20 primary, secondary and tertiary axis divisions,
21 setting more logarithmic labels,
22 optimizing labels' position if available
23 axis title - a title can be added via the text entry field
24 and can be set to be centered or rotated via the corresponding
25 check buttons, the title color, offset, font can be set easily
26 axis labels - their color, size, offset can be set similarly,
27 in addition there is a check box for no exponent choice,
28 and another one for setting the same decimal part for all labels
29
30
31*/
32
33
34#include "TAxisEditor.h"
35#include "TAxis.h"
36#include "TGedEditor.h"
37#include "TGColorSelect.h"
38#include "TGComboBox.h"
39#include "TGNumberEntry.h"
40#include "TGTextEntry.h"
41#include "TGLabel.h"
42#include "TColor.h"
43#include "TVirtualPad.h"
44#include "TStyle.h"
45
46
73
74
75////////////////////////////////////////////////////////////////////////////////
76/// Constructor of axis attribute GUI.
77
79 Int_t height, UInt_t options, Pixel_t back)
80 : TGedFrame(p, width, height, options | kVerticalFrame, back)
81{
82 fAxis = 0;
83
84 MakeTitle("Axis");
85
86 TGCompositeFrame *f2 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
88 f2->AddFrame(fAxisColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
89 fAxisColor->Associate(this);
90 TGLabel *fTicksLabel = new TGLabel(f2, "Ticks:");
92 fTickLength = new TGNumberEntry(f2, 0.03, 5, kAXIS_TICKS,
96 fTickLength->GetNumberEntry()->SetToolTipText("Set ticks' length");
97 f2->AddFrame(fTickLength, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
98 AddFrame(f2, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
99
100 TGCompositeFrame *f3 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
102 f3->AddFrame(f4a, new TGLayoutHints(kLHintsTop, 0, 1, 0, 0));
104 fTicksBoth->SetToolTipText("Draw ticks on both axis sides");
105 f4a->AddFrame(fTicksBoth, new TGLayoutHints(kLHintsLeft | kLHintsBottom, 3, 1, 1, 0));
106 fLogAxis = new TGCheckButton(f4a, "Log", kAXIS_LOG);
107 fLogAxis->SetToolTipText("Draw logarithmic scale");
108 f4a->AddFrame(fLogAxis, new TGLayoutHints(kLHintsLeft | kLHintsBottom, 3, 1, 0, 0));
109
111 f3->AddFrame(f4b, new TGLayoutHints(kLHintsTop, 0, 1, 0, 0));
112 fOptimize = new TGCheckButton(f4b, "Optimize", kAXIS_OPTIM);
114 fOptimize->SetToolTipText("Optimize the number of axis divisions");
115 f4b->AddFrame(fOptimize, new TGLayoutHints(kLHintsTop, 17, 1, 1, 0));
116 fMoreLog = new TGCheckButton(f4b, "MoreLog", kAXIS_LBLLOG);
117 fMoreLog->SetToolTipText("Draw more logarithmic labels");
118 f4b->AddFrame(fMoreLog, new TGLayoutHints(kLHintsLeft, 17, 1, 0, 0));
119
120 AddFrame(f3, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
121
122 TGCompositeFrame *f5 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
126 fDiv3->GetNumberEntry()->SetToolTipText("Tertiary axis divisions");
127 f5->AddFrame(fDiv3, new TGLayoutHints(kLHintsLeft, 27, 0, 1, 1));
131 fDiv2->GetNumberEntry()->SetToolTipText("Secondary axis divisions");
132 f5->AddFrame(fDiv2, new TGLayoutHints(kLHintsLeft, 1, 0, 1, 1));
136 fDiv1->GetNumberEntry()->SetToolTipText("Primary axis divisions");
137 f5->AddFrame(fDiv1, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 1, 1, 1, 1));
138 AddFrame(f5, new TGLayoutHints(kLHintsLeft, 1, 1, 4, 4));
139 fTicksFlag = 1;
140
141 MakeTitle("Title");
142
143 fTitlePrec = 2;
144 fTitle = new TGTextEntry(this, new TGTextBuffer(50), kTITLE);
146 fTitle->SetToolTipText("Enter the axis title string");
147 AddFrame(fTitle, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 1));
148
149 TGCompositeFrame *f6 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
150 fTitleColor = new TGColorSelect(f6, 0, kCOL_TIT);
151 f6->AddFrame(fTitleColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
152 fTitleColor->Associate(this);
153 TGLabel *fSizeLbl1 = new TGLabel(f6, "Size:");
155 fTitleSize = new TGNumberEntry(f6, 0.05, 5, kAXIS_TITSIZE,
159 fTitleSize->GetNumberEntry()->SetToolTipText("Set title size");
160 f6->AddFrame(fTitleSize, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
161 AddFrame(f6, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
162
164 fTitleFont->Resize(137, 20);
165 AddFrame(fTitleFont, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 1));
166
167 TGCompositeFrame *f7 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
168 fCentered = new TGCheckButton(f7, "Centered", kAXIS_CENTERED);
169 fCentered->SetToolTipText("Center axis title");
170 f7->AddFrame(fCentered, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
171 TGLabel *fOffsetLbl = new TGLabel(f7, "Offset:");
172 f7->AddFrame(fOffsetLbl, new TGLayoutHints(kLHintsLeft, 23, 1, 3, 0));
173 AddFrame(f7, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
174
175 TGCompositeFrame *f8 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
176 fRotated = new TGCheckButton(f8, "Rotated", kAXIS_ROTATED);
178 fRotated->SetToolTipText("Rotate axis title by 180 degrees");
179 f8->AddFrame(fRotated, new TGLayoutHints(kLHintsTop, 3, 1, 6, 0));
180 fTitleOffset = new TGNumberEntry(f8, 1.00, 6, kAXIS_TITOFFSET,
184 fTitleOffset->GetNumberEntry()->SetToolTipText("Set title offset");
185 f8->AddFrame(fTitleOffset, new TGLayoutHints(kLHintsLeft, 6, 1, 0, 0));
186 AddFrame(f8, new TGLayoutHints(kLHintsTop, 1, 1, 0, 4));
187
188 MakeTitle("Labels");
189
190 fLabelPrec = 2;
191 TGCompositeFrame *f9 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
192 fLabelColor = new TGColorSelect(f9, 0, kCOL_LBL);
193 f9->AddFrame(fLabelColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
194 fLabelColor->Associate(this);
195 TGLabel *fSizeLbl2 = new TGLabel(f9, "Size:");
197 fLabelSize = new TGNumberEntry(f9, 0.05, 6, kAXIS_LBLSIZE,
201 fLabelSize->GetNumberEntry()->SetToolTipText("Set labels' size");
202 f9->AddFrame(fLabelSize, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
203 AddFrame(f9, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
204
205 TGCompositeFrame *f10 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
206 fNoExponent = new TGCheckButton(f10, "NoExp", kAXIS_LBLEXP);
207 fNoExponent->SetToolTipText("Labels drawn without exponent notation");
209 fLabelOffset = new TGNumberEntry(f10, 0.005, 6, kAXIS_LBLOFFSET,
213 fLabelOffset->GetNumberEntry()->SetToolTipText("Set labels' offset");
214 f10->AddFrame(fLabelOffset, new TGLayoutHints(kLHintsLeft, 11, 1, 3, 0));
215 AddFrame(f10, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
216
218 fLabelFont->Resize(137, 20);
219 AddFrame(fLabelFont, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 0));
220 fLabelFont->Associate(this);
221
222 fDecimal = new TGCheckButton(this, "Decimal labels' part", kAXIS_LBLDEC);
223 fDecimal->SetToolTipText("Draw the decimal part of labels");
225}
226
227////////////////////////////////////////////////////////////////////////////////
228/// Destructor of axis editor.
229
233
234////////////////////////////////////////////////////////////////////////////////
235/// Connect signals to slots.
236
238{
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)");
269 fInit = kFALSE;
270}
271
272////////////////////////////////////////////////////////////////////////////////
273/// Pick up the used values of axis attributes.
274
276{
277 fAxis = (TAxis *)obj;
279
283
286
288 fDiv1->SetNumber(div % 100);
289 fDiv2->SetNumber((div/100) % 100);
290 fDiv3->SetNumber((div/10000) % 100);
291
292
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()))
296
299
300 if (fLogAxis->GetState() == kButtonUp) {
302 } else {
306 }
307
308 const char *both = fAxis->GetTicks();
309 if (!strcmp(both,"+-")) {
311 } else {
313 if (!strcmp(both,"-")) fTicksFlag = -1;
314 if (!strcmp(both,"+")) fTicksFlag = 1;
315 }
316
317 const char *text = fAxis->GetTitle();
319
320 c = fAxis->GetTitleColor();
323
324 fl = fAxis->GetTitleSize();
326
327 Style_t font = fAxis->GetTitleFont();
328 fTitleFont->Select(font / 10);
329 fTitlePrec = (Int_t)(font % 10);
330
333
337
341
342 c = fAxis->GetLabelColor();
345
346 fl = fAxis->GetLabelSize();
348
349 font = fAxis->GetLabelFont();
350 fLabelFont->Select(font / 10);
351 fLabelPrec = (Int_t)(font % 10);
352
355
359
363
366}
367
368////////////////////////////////////////////////////////////////////////////////
369/// Slot connected to the axis color.
370
372{
373 if (fAvoidSignal) return;
375 Update();
376}
377
378////////////////////////////////////////////////////////////////////////////////
379/// Slot connected to the tick length settings.
380
382{
383 if (fAvoidSignal) return;
384 Float_t ticks = fTickLength->GetNumber();
385 fAxis->SetTickLength(ticks);
386 Update();
387 if (fTickLength->GetNumber() < 0) fTicksFlag = -1;
388 else fTicksFlag = 1;
389}
390
391////////////////////////////////////////////////////////////////////////////////
392/// Slot connected to the ticks draw settings.
393
395{
396 if (fAvoidSignal) return;
397 if (fTicksBoth->GetState() == kButtonDown) {
398 fAxis->SetTicks("+-");
399 } else {
400 if (fTicksFlag == -1) fAxis->SetTicks("-");
401 else fAxis->SetTicks("");
402 }
403 Update();
404}
405
406////////////////////////////////////////////////////////////////////////////////
407/// Slot connected to the number of divisions.
408
410{
411 // the number of divisions are used 3 number entry widgets
412 if (fAvoidSignal) return;
413 Int_t div = (Int_t)(fDiv1->GetNumber() + fDiv2->GetNumber() * 100
414 + fDiv3->GetNumber() * 10000);
416 Update();
417}
418
419////////////////////////////////////////////////////////////////////////////////
420/// Slot for Log scale setting.
421
423{
424 if (fAvoidSignal) return;
425
427
428 if (fLogAxis->GetState() == kButtonDown) {
429
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);
433
438
439 } else if (fLogAxis->GetState() == kButtonUp){
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);
445 }
446 Update();
447}
448
449////////////////////////////////////////////////////////////////////////////////
450/// Slot connected to more Log labels flag
451
453{
454 if (fAvoidSignal) return;
455 Int_t flag = 0;
456 if (fMoreLog->GetState() == kButtonDown) flag = 1;
457 else if (fMoreLog->GetState() == kButtonUp) flag = 0;
459 Update();
460}
461
462////////////////////////////////////////////////////////////////////////////////
463/// Slot connected to the axis color.
464
465void TAxisEditor::DoTitle(const char *text)
466{
467 if (fAvoidSignal) return;
469 Update();
470}
471
472////////////////////////////////////////////////////////////////////////////////
473/// Slot connected to the title color.
474
476{
477 if (fAvoidSignal) return;
479 Update();
480}
481
482////////////////////////////////////////////////////////////////////////////////
483/// Slot connected to the title font size.
484
486{
487 if (fAvoidSignal) return;
490 Update();
491}
492
493////////////////////////////////////////////////////////////////////////////////
494/// Slot connected to the title font.
495
497{
498 if (fAvoidSignal) return;
499 Int_t f = font * 10 + fTitlePrec;
501 Update();
502}
503
504////////////////////////////////////////////////////////////////////////////////
505/// Slot connected to the title offset.
506
514
515////////////////////////////////////////////////////////////////////////////////
516/// Slot connected to centered title option.
517
519{
520 if (fAvoidSignal) return;
523 Update();
524}
525
526////////////////////////////////////////////////////////////////////////////////
527/// Slot connected to the title rotation.
528
530{
531 if (fAvoidSignal) return;
534 Update();
535}
536
537////////////////////////////////////////////////////////////////////////////////
538/// Slot connected to the label color.
539
541{
542 if (fAvoidSignal) return;
544 Update();
545}
546
547////////////////////////////////////////////////////////////////////////////////
548/// Slot connected to the label size.
549
551{
552 if (fAvoidSignal) return;
555 Update();
556}
557
558////////////////////////////////////////////////////////////////////////////////
559/// Slot connected to the label font.
560
562{
563 if (fAvoidSignal) return;
564 Int_t f = font * 10 + fLabelPrec;
566 Update();
567}
568
569////////////////////////////////////////////////////////////////////////////////
570/// Slot connected to the label offset.
571
579
580////////////////////////////////////////////////////////////////////////////////
581/// Slot connected to the labels' exponent flag.
582
584{
585 if (fAvoidSignal) return;
586 Int_t exp = fNoExponent->GetState();
587 fAxis->SetNoExponent(exp);
588 Update();
589}
590
591////////////////////////////////////////////////////////////////////////////////
592/// Slot connected to the decimal part setting.
593
595{
596 if (fAvoidSignal) return;
599 Update();
600 gPad->Modified();
601 gPad->Update();
602}
603
@ kVerticalFrame
Definition GuiTypes.h:381
@ kHorizontalFrame
Definition GuiTypes.h:382
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define f(i)
Definition RSha256.hxx:104
#define c(i)
Definition RSha256.hxx:101
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
short Style_t
Style number (short)
Definition RtypesCore.h:96
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:59
short Color_t
Color number (short)
Definition RtypesCore.h:99
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
EAxisWid
@ kAXIS_LBLDIR
@ kAXIS_LBLOFFSET
@ kAXIS_LOG
@ kTITLE
@ kFONT_TIT
@ kAXIS_LBLLOG
@ kAXIS_DIV2
@ kFONT_LBL
@ kAXIS_CENTERED
@ kAXIS_TICKS
@ kAXIS_LBLEXP
@ kAXIS_TITOFFSET
@ kAXIS_LBLSIZE
@ kAXIS_LBLDEC
@ kAXIS_TICKSBOTH
@ kCOL_AXIS
@ kCOL_TIT
@ kCOL_LBL
@ kAXIS_LBLSORT
@ kAXIS_DIV1
@ kAXIS_OPTIM
@ kAXIS_DIV3
@ kAXIS_ROTATED
@ kAXIS_TITSIZE
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
@ kButtonDown
Definition TGButton.h:54
@ kButtonDisabled
Definition TGButton.h:56
@ kButtonUp
Definition TGButton.h:53
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsCenterY
Definition TGLayout.h:28
@ kLHintsBottom
Definition TGLayout.h:29
@ kLHintsTop
Definition TGLayout.h:27
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char text
R__EXTERN TStyle * gStyle
Definition TStyle.h:442
#define gPad
virtual Color_t GetTitleColor() const
Definition TAttAxis.h:47
virtual Color_t GetLabelColor() const
Definition TAttAxis.h:39
virtual Int_t GetNdivisions() const
Definition TAttAxis.h:37
virtual Color_t GetAxisColor() const
Definition TAttAxis.h:38
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
Definition TAttAxis.cxx:279
virtual Style_t GetTitleFont() const
Definition TAttAxis.h:48
virtual Float_t GetLabelOffset() const
Definition TAttAxis.h:41
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
Definition TAttAxis.cxx:141
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels.
Definition TAttAxis.cxx:184
virtual Style_t GetLabelFont() const
Definition TAttAxis.h:40
virtual void SetTitleFont(Style_t font=62)
Set the title font.
Definition TAttAxis.cxx:308
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels.
Definition TAttAxis.cxx:172
virtual void SetLabelFont(Style_t font=62)
Set labels' font.
Definition TAttAxis.cxx:161
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title.
Definition TAttAxis.cxx:290
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
Definition TAttAxis.cxx:299
virtual Float_t GetTitleSize() const
Definition TAttAxis.h:45
virtual Float_t GetLabelSize() const
Definition TAttAxis.h:42
virtual Float_t GetTickLength() const
Definition TAttAxis.h:46
virtual Float_t GetTitleOffset() const
Definition TAttAxis.h:44
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length.
Definition TAttAxis.cxx:265
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
Definition TAttAxis.cxx:214
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
Definition TAttAxis.cxx:151
TGCheckButton * fRotated
check button for rotated title
Definition TAxisEditor.h:49
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
Definition TAxisEditor.h:43
~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
Definition TAxisEditor.h:40
TGNumberEntry * fDiv2
secondary axis division number entry
Definition TAxisEditor.h:36
TGColorSelect * fAxisColor
color selection widget
Definition TAxisEditor.h:32
Int_t fLabelPrec
font precision level
Definition TAxisEditor.h:52
Int_t fTicksFlag
positive/negative ticks' flag
Definition TAxisEditor.h:41
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
Definition TAxisEditor.h:42
TGCheckButton * fNoExponent
check box for No exponent choice
Definition TAxisEditor.h:55
TGFontTypeComboBox * fTitleFont
title font combo box
Definition TAxisEditor.h:44
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
Definition TAxisEditor.h:33
Int_t fTitlePrec
font precision level
Definition TAxisEditor.h:45
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
Definition TAxisEditor.h:34
virtual void DoTitleSize()
Slot connected to the title font size.
TGNumberEntry * fTitleOffset
title offset number entry
Definition TAxisEditor.h:47
virtual void DoLabelOffset()
Slot connected to the label offset.
TGNumberEntry * fDiv1
primary axis division number entry
Definition TAxisEditor.h:35
TGNumberEntry * fTitleSize
title size number entry
Definition TAxisEditor.h:46
TGColorSelect * fLabelColor
color selection widget
Definition TAxisEditor.h:50
virtual void DoTickLength()
Slot connected to the tick length settings.
TGCheckButton * fTicksBoth
check box setting ticks on both axis sides
Definition TAxisEditor.h:39
virtual void DoTitleRotated()
Slot connected to the title rotation.
TGNumberEntry * fLabelOffset
label offset number entry
Definition TAxisEditor.h:54
TGCheckButton * fOptimize
tick optimization check box
Definition TAxisEditor.h:38
virtual void DoLogAxis()
Slot for Log scale setting.
TGCheckButton * fCentered
check button for centered title
Definition TAxisEditor.h:48
virtual void DoNoExponent()
Slot connected to the labels' exponent flag.
TGCheckButton * fDecimal
decimal part check box
Definition TAxisEditor.h:56
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
Definition TAxisEditor.h:37
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
Definition TAxisEditor.h:53
virtual void DoLabelSize()
Slot connected to the label size.
TAxis * fAxis
axis object
Definition TAxisEditor.h:31
TGFontTypeComboBox * fLabelFont
label font combo box
Definition TAxisEditor.h:51
Class to manage histogram axis.
Definition TAxis.h:32
void SetDecimals(Bool_t dot=kTRUE)
Sets the decimals flag By default, blank characters are stripped, and then the label is correctly ali...
Definition TAxis.h:215
Bool_t GetRotateTitle() const
Definition TAxis.h:131
const char * GetTitle() const override
Returns title of object.
Definition TAxis.h:137
Bool_t GetCenterTitle() const
Definition TAxis.h:121
void SetMoreLogLabels(Bool_t more=kTRUE)
Set the kMoreLogLabels bit flag When this option is selected more labels are drawn when in log scale ...
Definition TAxis.h:225
Bool_t GetMoreLogLabels() const
Definition TAxis.h:126
virtual void SetTicks(Option_t *option="+")
Set ticks orientation.
Definition TAxis.cxx:1101
Bool_t GetNoExponent() const
Definition TAxis.h:129
void RotateTitle(Bool_t rotate=kTRUE)
Rotate title by 180 degrees.
Definition TAxis.h:205
void CenterTitle(Bool_t center=kTRUE)
Center axis title.
Definition TAxis.h:196
void SetNoExponent(Bool_t noExponent=kTRUE)
Set the NoExponent flag By default, an exponent of the form 10^N is used when the label value are eit...
Definition TAxis.h:235
Bool_t GetDecimals() const
Definition TAxis.h:122
virtual const char * GetTicks() const
Return the ticks option (see SetTicks)
Definition TAxis.cxx:638
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
Definition TColor.cxx:2445
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Definition TColor.cxx:1926
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition TGButton.cxx:439
virtual EButtonState GetState() const
Definition TGButton.h:112
Selects different options.
Definition TGButton.h:264
void SetState(EButtonState state, Bool_t emit=kFALSE) override
Set check button state.
Like a checkbutton but instead of the check mark there is color area with a little down arrow.
void SetColor(Pixel_t color, Bool_t emit=kTRUE)
Set color.
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:289
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1109
TGCompositeFrame(const TGCompositeFrame &)=delete
The TGFontTypeComboBox is user callable and it creates a combobox for selecting the font.
Definition TGComboBox.h:178
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:597
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:193
This class handles GUI labels.
Definition TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
TGNumberEntry is a number entry input widget with up/down buttons.
TGNumberEntryField * GetNumberEntry() const
Get the number entry field.
virtual Double_t GetNumber() const
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
@ kNEANonNegative
Non-negative number.
@ kNEAAnyNumber
Attributes of number entry field.
@ kNESRealThree
Fixed fraction real, three digit.
@ kNESInteger
Style of number entry field.
@ kNESRealTwo
Fixed fraction real, two digit.
@ kNELLimitMinMax
Both lower and upper limits.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
virtual void Associate(const TGWindow *w)
Definition TGWidget.h:72
ROOT GUI Window base class.
Definition TGWindow.h:23
virtual TVirtualPad * GetPad() const
Definition TGedEditor.h:78
Base frame for implementing GUI - a service class.
Definition TGedFrame.h:27
TGedEditor * fGedEditor
manager of this frame
Definition TGedFrame.h:48
Bool_t fInit
init flag for setting signals/slots
Definition TGedFrame.h:47
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:94
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition TGedFrame.cxx:71
Bool_t fAvoidSignal
flag for executing slots
Definition TGedFrame.h:50
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition TNamed.cxx:173
const char * GetName() const override
Returns name of object.
Definition TNamed.h:49
Mother of all ROOT objects.
Definition TObject.h:41
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition TQObject.cxx:865
void SetStripDecimals(Bool_t strip=kTRUE)
Set option to strip decimals when drawing axis labels.
Definition TStyle.cxx:1927