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:");
91 f2->AddFrame(fTicksLabel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 0, 1, 1));
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);
101 TGCompositeFrame *f4a = new TGCompositeFrame(f3, 40, 20, kVerticalFrame);
102 f3->AddFrame(f4a, new TGLayoutHints(kLHintsTop, 0, 1, 0, 0));
103 fTicksBoth = new TGCheckButton(f4a, "+-", kAXIS_TICKSBOTH);
104 fTicksBoth->SetToolTipText("Draw ticks on both axis sides");
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
110 TGCompositeFrame *f4b = new TGCompositeFrame(f3, 40, 20, kVerticalFrame);
111 f3->AddFrame(f4b, new TGLayoutHints(kLHintsTop, 0, 1, 0, 0));
112 fOptimize = new TGCheckButton(f4b, "Optimize", kAXIS_OPTIM);
113 fOptimize->SetState(kButtonDown);
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);
145 fTitle->Resize(135, fTitle->GetDefaultHeight());
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:");
154 f6->AddFrame(fSizeLbl1, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 6, 1, 1, 1));
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);
177 fRotated->SetState(kButtonDown);
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:");
196 f9->AddFrame(fSizeLbl2, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 1, 0, 1, 1));
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
280 Color_t c = fAxis->GetAxisColor();
282 fAxisColor->SetColor(p);
283
284 Float_t fl = fAxis->GetTickLength();
285 fTickLength->SetNumber(fl);
286
287 Int_t div = fAxis->GetNdivisions();
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
297 fLogAxis->SetState(kButtonDown);
298 else fLogAxis->SetState(kButtonUp);
299
300 if (fLogAxis->GetState() == kButtonUp) {
301 fMoreLog->SetState(kButtonDisabled);
302 } else {
303 Int_t morelog = fAxis->GetMoreLogLabels();
304 if (morelog) fMoreLog->SetState(kButtonDown);
305 else fMoreLog->SetState(kButtonUp);
306 }
307
308 const char *both = fAxis->GetTicks();
309 if (!strcmp(both,"+-")) {
310 fTicksBoth->SetState(kButtonDown);
311 } else {
312 fTicksBoth->SetState(kButtonUp);
313 if (!strcmp(both,"-")) fTicksFlag = -1;
314 if (!strcmp(both,"+")) fTicksFlag = 1;
315 }
316
317 const char *text = fAxis->GetTitle();
318 fTitle->SetText(text);
319
320 c = fAxis->GetTitleColor();
322 fTitleColor->SetColor(p);
323
324 fl = fAxis->GetTitleSize();
325 fTitleSize->SetNumber(fl);
326
327 Style_t font = fAxis->GetTitleFont();
328 fTitleFont->Select(font / 10);
329 fTitlePrec = (Int_t)(font % 10);
330
331 fl = fAxis->GetTitleOffset();
332 fTitleOffset->SetNumber(fl);
333
334 Int_t centered = fAxis->GetCenterTitle();
335 if (centered) fCentered->SetState(kButtonDown);
336 else fCentered->SetState(kButtonUp);
337
338 Int_t rotated = fAxis->GetRotateTitle();
339 if (rotated) fRotated->SetState(kButtonDown);
340 else fRotated->SetState(kButtonUp);
341
342 c = fAxis->GetLabelColor();
344 fLabelColor->SetColor(p);
345
346 fl = fAxis->GetLabelSize();
347 fLabelSize->SetNumber(fl);
348
349 font = fAxis->GetLabelFont();
350 fLabelFont->Select(font / 10);
351 fLabelPrec = (Int_t)(font % 10);
352
353 fl = fAxis->GetLabelOffset();
354 fLabelOffset->SetNumber(fl);
355
356 Int_t noexp = fAxis->GetNoExponent();
357 if (noexp) fNoExponent->SetState(kButtonDown);
358 else fNoExponent->SetState(kButtonUp);
359
360 Bool_t on = fAxis->GetDecimals();
361 if (on) fDecimal->SetState(kButtonDown);
362 else fDecimal->SetState(kButtonUp);
363
366}
367
368////////////////////////////////////////////////////////////////////////////////
369/// Slot connected to the axis color.
370
372{
373 if (fAvoidSignal) return;
374 fAxis->SetAxisColor(TColor::GetColor(color));
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);
415 fAxis->SetNdivisions(div, (fOptimize->GetState() != kButtonUp));
416 Update();
417}
418
419////////////////////////////////////////////////////////////////////////////////
420/// Slot for Log scale setting.
421
423{
424 if (fAvoidSignal) return;
425
426 gPad = fGedEditor->GetPad();
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
434 Int_t morelog = fAxis->GetMoreLogLabels();
435 if (morelog) fMoreLog->SetState(kButtonDown);
436 else fMoreLog->SetState(kButtonUp);
437 fOptimize->SetState(kButtonDisabled);
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);
443 fMoreLog->SetState(kButtonDisabled);
444 fOptimize->SetState(kButtonDown);
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;
458 fAxis->SetMoreLogLabels(flag);
459 Update();
460}
461
462////////////////////////////////////////////////////////////////////////////////
463/// Slot connected to the axis color.
464
465void TAxisEditor::DoTitle(const char *text)
466{
467 if (fAvoidSignal) return;
468 fAxis->SetTitle(text);
469 Update();
470}
471
472////////////////////////////////////////////////////////////////////////////////
473/// Slot connected to the title color.
474
476{
477 if (fAvoidSignal) return;
478 fAxis->SetTitleColor(TColor::GetColor(color));
479 Update();
480}
481
482////////////////////////////////////////////////////////////////////////////////
483/// Slot connected to the title font size.
484
486{
487 if (fAvoidSignal) return;
488 Float_t size = fTitleSize->GetNumber();
489 fAxis->SetTitleSize(size);
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;
500 fAxis->SetTitleFont(f);
501 Update();
502}
503
504////////////////////////////////////////////////////////////////////////////////
505/// Slot connected to the title offset.
506
508{
509 if (fAvoidSignal) return;
510 Float_t offset = fTitleOffset->GetNumber();
511 fAxis->SetTitleOffset(offset);
512 Update();
513}
514
515////////////////////////////////////////////////////////////////////////////////
516/// Slot connected to centered title option.
517
519{
520 if (fAvoidSignal) return;
521 Int_t ctr = fCentered->GetState();
522 fAxis->CenterTitle(ctr);
523 Update();
524}
525
526////////////////////////////////////////////////////////////////////////////////
527/// Slot connected to the title rotation.
528
530{
531 if (fAvoidSignal) return;
532 Int_t rot = fRotated->GetState();
533 fAxis->RotateTitle(rot);
534 Update();
535}
536
537////////////////////////////////////////////////////////////////////////////////
538/// Slot connected to the label color.
539
541{
542 if (fAvoidSignal) return;
543 fAxis->SetLabelColor(TColor::GetColor(color));
544 Update();
545}
546
547////////////////////////////////////////////////////////////////////////////////
548/// Slot connected to the label size.
549
551{
552 if (fAvoidSignal) return;
553 Float_t size = fLabelSize->GetNumber();
554 fAxis->SetLabelSize(size);
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;
565 fAxis->SetLabelFont(f);
566 Update();
567}
568
569////////////////////////////////////////////////////////////////////////////////
570/// Slot connected to the label offset.
571
573{
574 if (fAvoidSignal) return;
575 Float_t offset = fLabelOffset->GetNumber();
576 fAxis->SetLabelOffset(offset);
577 Update();
578}
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;
597 fAxis->SetDecimals(on);
598 gStyle->SetStripDecimals(!on);
599 Update();
600 gPad->Modified();
601 gPad->Update();
602}
603
@ kVerticalFrame
Definition GuiTypes.h:382
@ kHorizontalFrame
Definition GuiTypes.h:383
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:41
#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
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
Definition RtypesCore.h:60
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
short Color_t
Color number (short).
Definition RtypesCore.h:99
short Style_t
Style number (short).
Definition RtypesCore.h:96
float Float_t
Float 4 bytes (float).
Definition RtypesCore.h:71
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
@ 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
externTStyle * gStyle
Definition TStyle.h:442
#define gPad
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
static Int_t GetColor(const char *hexcolor)
static ULong_t Number2Pixel(Int_t ci)
Selects different options.
Definition TGButton.h:264
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.
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
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.
@ 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
ROOT GUI Window base class.
Definition TGWindow.h:23
TGedEditor * fGedEditor
manager of this frame
Definition TGedFrame.h:48
TGedFrame(const TGedFrame &)=delete
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
Mother of all ROOT objects.
Definition TObject.h:42
TText * text