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
47
73};
74
75
76////////////////////////////////////////////////////////////////////////////////
77/// Constructor of axis attribute GUI.
78
80 Int_t height, UInt_t options, Pixel_t back)
81 : TGedFrame(p, width, height, options | kVerticalFrame, back)
82{
83 fAxis = 0;
84
85 MakeTitle("Axis");
86
87 TGCompositeFrame *f2 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
89 f2->AddFrame(fAxisColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
90 fAxisColor->Associate(this);
91 TGLabel *fTicksLabel = new TGLabel(f2, "Ticks:");
92 f2->AddFrame(fTicksLabel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 0, 1, 1));
93 fTickLength = new TGNumberEntry(f2, 0.03, 5, kAXIS_TICKS,
97 fTickLength->GetNumberEntry()->SetToolTipText("Set ticks' length");
98 f2->AddFrame(fTickLength, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
99 AddFrame(f2, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
100
101 TGCompositeFrame *f3 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
102 TGCompositeFrame *f4a = new TGCompositeFrame(f3, 40, 20, kVerticalFrame);
103 f3->AddFrame(f4a, new TGLayoutHints(kLHintsTop, 0, 1, 0, 0));
104 fTicksBoth = new TGCheckButton(f4a, "+-", kAXIS_TICKSBOTH);
105 fTicksBoth->SetToolTipText("Draw ticks on both axis sides");
107 fLogAxis = new TGCheckButton(f4a, "Log", kAXIS_LOG);
108 fLogAxis->SetToolTipText("Draw logarithmic scale");
109 f4a->AddFrame(fLogAxis, new TGLayoutHints(kLHintsLeft | kLHintsBottom, 3, 1, 0, 0));
110
111 TGCompositeFrame *f4b = new TGCompositeFrame(f3, 40, 20, kVerticalFrame);
112 f3->AddFrame(f4b, new TGLayoutHints(kLHintsTop, 0, 1, 0, 0));
113 fOptimize = new TGCheckButton(f4b, "Optimize", kAXIS_OPTIM);
115 fOptimize->SetToolTipText("Optimize the number of axis divisions");
116 f4b->AddFrame(fOptimize, new TGLayoutHints(kLHintsTop, 17, 1, 1, 0));
117 fMoreLog = new TGCheckButton(f4b, "MoreLog", kAXIS_LBLLOG);
118 fMoreLog->SetToolTipText("Draw more logarithmic labels");
119 f4b->AddFrame(fMoreLog, new TGLayoutHints(kLHintsLeft, 17, 1, 0, 0));
120
121 AddFrame(f3, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
122
123 TGCompositeFrame *f5 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
127 fDiv3->GetNumberEntry()->SetToolTipText("Tertiary axis divisions");
128 f5->AddFrame(fDiv3, new TGLayoutHints(kLHintsLeft, 27, 0, 1, 1));
132 fDiv2->GetNumberEntry()->SetToolTipText("Secondary axis divisions");
133 f5->AddFrame(fDiv2, new TGLayoutHints(kLHintsLeft, 1, 0, 1, 1));
137 fDiv1->GetNumberEntry()->SetToolTipText("Primary axis divisions");
138 f5->AddFrame(fDiv1, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 1, 1, 1, 1));
139 AddFrame(f5, new TGLayoutHints(kLHintsLeft, 1, 1, 4, 4));
140 fTicksFlag = 1;
141
142 MakeTitle("Title");
143
144 fTitlePrec = 2;
145 fTitle = new TGTextEntry(this, new TGTextBuffer(50), kTITLE);
147 fTitle->SetToolTipText("Enter the axis title string");
148 AddFrame(fTitle, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 1));
149
150 TGCompositeFrame *f6 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
151 fTitleColor = new TGColorSelect(f6, 0, kCOL_TIT);
152 f6->AddFrame(fTitleColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
153 fTitleColor->Associate(this);
154 TGLabel *fSizeLbl1 = new TGLabel(f6, "Size:");
155 f6->AddFrame(fSizeLbl1, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 6, 1, 1, 1));
156 fTitleSize = new TGNumberEntry(f6, 0.05, 5, kAXIS_TITSIZE,
160 fTitleSize->GetNumberEntry()->SetToolTipText("Set title size");
161 f6->AddFrame(fTitleSize, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
162 AddFrame(f6, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
163
165 fTitleFont->Resize(137, 20);
166 AddFrame(fTitleFont, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 1));
167
168 TGCompositeFrame *f7 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
169 fCentered = new TGCheckButton(f7, "Centered", kAXIS_CENTERED);
170 fCentered->SetToolTipText("Center axis title");
171 f7->AddFrame(fCentered, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
172 TGLabel *fOffsetLbl = new TGLabel(f7, "Offset:");
173 f7->AddFrame(fOffsetLbl, new TGLayoutHints(kLHintsLeft, 23, 1, 3, 0));
174 AddFrame(f7, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
175
176 TGCompositeFrame *f8 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
177 fRotated = new TGCheckButton(f8, "Rotated", kAXIS_ROTATED);
179 fRotated->SetToolTipText("Rotate axis title by 180 degrees");
180 f8->AddFrame(fRotated, new TGLayoutHints(kLHintsTop, 3, 1, 6, 0));
181 fTitleOffset = new TGNumberEntry(f8, 1.00, 6, kAXIS_TITOFFSET,
185 fTitleOffset->GetNumberEntry()->SetToolTipText("Set title offset");
186 f8->AddFrame(fTitleOffset, new TGLayoutHints(kLHintsLeft, 6, 1, 0, 0));
187 AddFrame(f8, new TGLayoutHints(kLHintsTop, 1, 1, 0, 4));
188
189 MakeTitle("Labels");
190
191 fLabelPrec = 2;
192 TGCompositeFrame *f9 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
193 fLabelColor = new TGColorSelect(f9, 0, kCOL_LBL);
194 f9->AddFrame(fLabelColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
195 fLabelColor->Associate(this);
196 TGLabel *fSizeLbl2 = new TGLabel(f9, "Size:");
197 f9->AddFrame(fSizeLbl2, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 1, 0, 1, 1));
198 fLabelSize = new TGNumberEntry(f9, 0.05, 6, kAXIS_LBLSIZE,
202 fLabelSize->GetNumberEntry()->SetToolTipText("Set labels' size");
203 f9->AddFrame(fLabelSize, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
204 AddFrame(f9, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
205
206 TGCompositeFrame *f10 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
207 fNoExponent = new TGCheckButton(f10, "NoExp", kAXIS_LBLEXP);
208 fNoExponent->SetToolTipText("Labels drawn without exponent notation");
210 fLabelOffset = new TGNumberEntry(f10, 0.005, 6, kAXIS_LBLOFFSET,
214 fLabelOffset->GetNumberEntry()->SetToolTipText("Set labels' offset");
215 f10->AddFrame(fLabelOffset, new TGLayoutHints(kLHintsLeft, 11, 1, 3, 0));
216 AddFrame(f10, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
217
219 fLabelFont->Resize(137, 20);
220 AddFrame(fLabelFont, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 0));
221 fLabelFont->Associate(this);
222
223 fDecimal = new TGCheckButton(this, "Decimal labels' part", kAXIS_LBLDEC);
224 fDecimal->SetToolTipText("Draw the decimal part of labels");
226}
227
228////////////////////////////////////////////////////////////////////////////////
229/// Destructor of axis editor.
230
232{
233}
234
235////////////////////////////////////////////////////////////////////////////////
236/// Connect signals to slots.
237
239{
240 fAxisColor->Connect("ColorSelected(Pixel_t)", "TAxisEditor", this, "DoAxisColor(Pixel_t)");
241 fTickLength->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoTickLength()");
242 (fTickLength->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoTickLength()");
243 fTicksBoth->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoTicks()");
244 fOptimize->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoDivisions()");
245 fLogAxis->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoLogAxis()");
246 fMoreLog->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoMoreLog()");
247 fDiv3->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoDivisions()");
248 (fDiv3->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoDivisions()");
249 fDiv2->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoDivisions()");
250 (fDiv2->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoDivisions()");
251 fDiv1->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoDivisions()");
252 (fDiv1->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoDivisions()");
253 fTitle->Connect("TextChanged(const char *)", "TAxisEditor", this, "DoTitle(const char *)");;
254 fTitleColor->Connect("ColorSelected(Pixel_t)", "TAxisEditor", this, "DoTitleColor(Pixel_t)");
255 fTitleSize->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoTitleSize()");
256 (fTitleSize->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoTitleSize()");
257 fTitleFont->Connect("Selected(Int_t)", "TAxisEditor", this, "DoTitleFont(Int_t)");
258 fCentered->Connect("Toggled(Bool_t)","TAxisEditor",this, "DoTitleCentered()");
259 fRotated->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoTitleRotated()");
260 fTitleOffset->Connect("ValueSet(Long_t)","TAxisEditor",this,"DoTitleOffset()");
261 (fTitleOffset->GetNumberEntry())->Connect("ReturnPressed()","TAxisEditor",this,"DoTitleOffset()");
262 fLabelColor->Connect("ColorSelected(Pixel_t)", "TAxisEditor", this, "DoLabelColor(Pixel_t)");
263 fLabelSize->Connect("ValueSet(Long_t)","TAxisEditor",this,"DoLabelSize()");
264 (fLabelSize->GetNumberEntry())->Connect("ReturnPressed()","TAxisEditor",this,"DoLabelSize()");
265 fNoExponent->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoNoExponent()");
266 fDecimal->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoDecimal(Bool_t)");
267 fLabelOffset->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoLabelOffset()");
268 (fLabelOffset->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoLabelOffset()");
269 fLabelFont->Connect("Selected(Int_t)", "TAxisEditor", this, "DoLabelFont(Int_t)");
270 fInit = kFALSE;
271}
272
273////////////////////////////////////////////////////////////////////////////////
274/// Pick up the used values of axis attributes.
275
277{
278 fAxis = (TAxis *)obj;
280
284
287
288 Int_t div = fAxis->GetNdivisions();
289 fDiv1->SetNumber(div % 100);
290 fDiv2->SetNumber((div/100) % 100);
291 fDiv3->SetNumber((div/10000) % 100);
292
293
294 if ((!strcmp(fAxis->GetName(),"xaxis") && fGedEditor->GetPad()->GetLogx()) ||
295 (!strcmp(fAxis->GetName(),"yaxis") && fGedEditor->GetPad()->GetLogy()) ||
296 (!strcmp(fAxis->GetName(),"zaxis") && fGedEditor->GetPad()->GetLogz()))
297
300
301 if (fLogAxis->GetState() == kButtonUp) {
303 } else {
304 Int_t morelog = fAxis->GetMoreLogLabels();
305 if (morelog) fMoreLog->SetState(kButtonDown);
307 }
308
309 const char *both = fAxis->GetTicks();
310 if (!strcmp(both,"+-")) {
312 } else {
314 if (!strcmp(both,"-")) fTicksFlag = -1;
315 if (!strcmp(both,"+")) fTicksFlag = 1;
316 }
317
318 const char *text = fAxis->GetTitle();
320
321 c = fAxis->GetTitleColor();
324
325 fl = fAxis->GetTitleSize();
327
328 Style_t font = fAxis->GetTitleFont();
329 fTitleFont->Select(font / 10);
330 fTitlePrec = (Int_t)(font % 10);
331
332 fl = fAxis->GetTitleOffset();
334
335 Int_t centered = fAxis->GetCenterTitle();
336 if (centered) fCentered->SetState(kButtonDown);
338
339 Int_t rotated = fAxis->GetRotateTitle();
340 if (rotated) fRotated->SetState(kButtonDown);
342
343 c = fAxis->GetLabelColor();
346
347 fl = fAxis->GetLabelSize();
349
350 font = fAxis->GetLabelFont();
351 fLabelFont->Select(font / 10);
352 fLabelPrec = (Int_t)(font % 10);
353
354 fl = fAxis->GetLabelOffset();
356
357 Int_t noexp = fAxis->GetNoExponent();
358 if (noexp) fNoExponent->SetState(kButtonDown);
360
364
367}
368
369////////////////////////////////////////////////////////////////////////////////
370/// Slot connected to the axis color.
371
373{
374 if (fAvoidSignal) return;
376 Update();
377}
378
379////////////////////////////////////////////////////////////////////////////////
380/// Slot connected to the tick length settings.
381
383{
384 if (fAvoidSignal) return;
385 Float_t ticks = fTickLength->GetNumber();
386 fAxis->SetTickLength(ticks);
387 Update();
388 if (fTickLength->GetNumber() < 0) fTicksFlag = -1;
389 else fTicksFlag = 1;
390}
391
392////////////////////////////////////////////////////////////////////////////////
393/// Slot connected to the ticks draw settings.
394
396{
397 if (fAvoidSignal) return;
398 if (fTicksBoth->GetState() == kButtonDown) {
399 fAxis->SetTicks("+-");
400 } else {
401 if (fTicksFlag == -1) fAxis->SetTicks("-");
402 else fAxis->SetTicks("");
403 }
404 Update();
405}
406
407////////////////////////////////////////////////////////////////////////////////
408/// Slot connected to the number of divisions.
409
411{
412 // the number of divisions are used 3 number entry widgets
413 if (fAvoidSignal) return;
414 Int_t div = (Int_t)(fDiv1->GetNumber() + fDiv2->GetNumber() * 100
415 + fDiv3->GetNumber() * 10000);
417 Update();
418}
419
420////////////////////////////////////////////////////////////////////////////////
421/// Slot for Log scale setting.
422
424{
425 if (fAvoidSignal) return;
426
428
429 if (fLogAxis->GetState() == kButtonDown) {
430
431 if (!strcmp(fAxis->GetName(),"xaxis")) gPad->SetLogx(1);
432 if (!strcmp(fAxis->GetName(),"yaxis")) gPad->SetLogy(1);
433 if (!strcmp(fAxis->GetName(),"zaxis")) gPad->SetLogz(1);
434
435 Int_t morelog = fAxis->GetMoreLogLabels();
436 if (morelog) fMoreLog->SetState(kButtonDown);
439
440 } else if (fLogAxis->GetState() == kButtonUp){
441 if (!strcmp(fAxis->GetName(),"xaxis")) gPad->SetLogx(0);
442 if (!strcmp(fAxis->GetName(),"yaxis")) gPad->SetLogy(0);
443 if (!strcmp(fAxis->GetName(),"zaxis")) gPad->SetLogz(0);
446 }
447 Update();
448}
449
450////////////////////////////////////////////////////////////////////////////////
451/// Slot connected to more Log labels flag
452
454{
455 if (fAvoidSignal) return;
456 Int_t flag = 0;
457 if (fMoreLog->GetState() == kButtonDown) flag = 1;
458 else if (fMoreLog->GetState() == kButtonUp) flag = 0;
459 fAxis->SetMoreLogLabels(flag);
460 Update();
461}
462
463////////////////////////////////////////////////////////////////////////////////
464/// Slot connected to the axis color.
465
466void TAxisEditor::DoTitle(const char *text)
467{
468 if (fAvoidSignal) return;
470 Update();
471}
472
473////////////////////////////////////////////////////////////////////////////////
474/// Slot connected to the title color.
475
477{
478 if (fAvoidSignal) return;
480 Update();
481}
482
483////////////////////////////////////////////////////////////////////////////////
484/// Slot connected to the title font size.
485
487{
488 if (fAvoidSignal) return;
491 Update();
492}
493
494////////////////////////////////////////////////////////////////////////////////
495/// Slot connected to the title font.
496
498{
499 if (fAvoidSignal) return;
500 Int_t f = font * 10 + fTitlePrec;
502 Update();
503}
504
505////////////////////////////////////////////////////////////////////////////////
506/// Slot connected to the title offset.
507
509{
510 if (fAvoidSignal) return;
513 Update();
514}
515
516////////////////////////////////////////////////////////////////////////////////
517/// Slot connected to centered title option.
518
520{
521 if (fAvoidSignal) return;
522 Int_t ctr = fCentered->GetState();
523 fAxis->CenterTitle(ctr);
524 Update();
525}
526
527////////////////////////////////////////////////////////////////////////////////
528/// Slot connected to the title rotation.
529
531{
532 if (fAvoidSignal) return;
533 Int_t rot = fRotated->GetState();
534 fAxis->RotateTitle(rot);
535 Update();
536}
537
538////////////////////////////////////////////////////////////////////////////////
539/// Slot connected to the label color.
540
542{
543 if (fAvoidSignal) return;
545 Update();
546}
547
548////////////////////////////////////////////////////////////////////////////////
549/// Slot connected to the label size.
550
552{
553 if (fAvoidSignal) return;
556 Update();
557}
558
559////////////////////////////////////////////////////////////////////////////////
560/// Slot connected to the label font.
561
563{
564 if (fAvoidSignal) return;
565 Int_t f = font * 10 + fLabelPrec;
567 Update();
568}
569
570////////////////////////////////////////////////////////////////////////////////
571/// Slot connected to the label offset.
572
574{
575 if (fAvoidSignal) return;
578 Update();
579}
580
581////////////////////////////////////////////////////////////////////////////////
582/// Slot connected to the labels' exponent flag.
583
585{
586 if (fAvoidSignal) return;
587 Int_t exp = fNoExponent->GetState();
588 fAxis->SetNoExponent(exp);
589 Update();
590}
591
592////////////////////////////////////////////////////////////////////////////////
593/// Slot connected to the decimal part setting.
594
596{
597 if (fAvoidSignal) return;
600 Update();
601 gPad->Modified();
602 gPad->Update();
603}
604
@ 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
Definition RtypesCore.h:89
int Int_t
Definition RtypesCore.h:45
short Color_t
Definition RtypesCore.h:92
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassImp(name)
Definition Rtypes.h:377
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
@ 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:433
#define gPad
virtual Color_t GetTitleColor() const
Definition TAttAxis.h:46
virtual Color_t GetLabelColor() const
Definition TAttAxis.h:38
virtual Int_t GetNdivisions() const
Definition TAttAxis.h:36
virtual Color_t GetAxisColor() const
Definition TAttAxis.h:37
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
Definition TAttAxis.cxx:298
virtual Style_t GetTitleFont() const
Definition TAttAxis.h:47
virtual Float_t GetLabelOffset() const
Definition TAttAxis.h:40
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
Definition TAttAxis.cxx:160
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels.
Definition TAttAxis.cxx:203
virtual Style_t GetLabelFont() const
Definition TAttAxis.h:39
virtual void SetTitleFont(Style_t font=62)
Set the title font.
Definition TAttAxis.cxx:327
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels.
Definition TAttAxis.cxx:191
virtual void SetLabelFont(Style_t font=62)
Set labels' font.
Definition TAttAxis.cxx:180
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title.
Definition TAttAxis.cxx:309
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
Definition TAttAxis.cxx:318
virtual Float_t GetTitleSize() const
Definition TAttAxis.h:44
virtual Float_t GetLabelSize() const
Definition TAttAxis.h:41
virtual Float_t GetTickLength() const
Definition TAttAxis.h:45
virtual Float_t GetTitleOffset() const
Definition TAttAxis.h:43
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length.
Definition TAttAxis.cxx:284
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
Definition TAttAxis.cxx:233
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
Definition TAttAxis.cxx:170
Implements GUI for axis attributes.
Definition TAxisEditor.h:28
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:31
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:213
Bool_t GetRotateTitle() const
Definition TAxis.h:129
const char * GetTitle() const override
Returns title of object.
Definition TAxis.h:135
Bool_t GetCenterTitle() const
Definition TAxis.h:119
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:223
Bool_t GetMoreLogLabels() const
Definition TAxis.h:124
virtual void SetTicks(Option_t *option="+")
Set ticks orientation.
Definition TAxis.cxx:1105
Bool_t GetNoExponent() const
Definition TAxis.h:127
void RotateTitle(Bool_t rotate=kTRUE)
Rotate title by 180 degrees.
Definition TAxis.h:203
void CenterTitle(Bool_t center=kTRUE)
Center axis title.
Definition TAxis.h:194
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:233
Bool_t GetDecimals() const
Definition TAxis.h:120
virtual const char * GetTicks() const
Return the ticks option (see SetTicks)
Definition TAxis.cxx:634
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
Definition TColor.cxx:2082
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:1823
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition TGButton.cxx:445
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:287
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1117
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:605
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:191
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:95
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition TGedFrame.cxx:72
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:164
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
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:869
void SetStripDecimals(Bool_t strip=kTRUE)
Set option to strip decimals when drawing axis labels.
Definition TStyle.cxx:1922
virtual void SetLogx(Int_t value=1)=0
virtual Int_t GetLogz() const =0
virtual Int_t GetLogy() const =0
virtual Int_t GetLogx() const =0