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// //
14// TAxisEditor //
15// //
16// Implements 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//Begin_Html
32/*
33<img src="gif/TAxisEditor.gif">
34*/
35//End_Html
36
37
38#include "TAxisEditor.h"
39#include "TAxis.h"
40#include "TGedEditor.h"
41#include "TGColorSelect.h"
42#include "TGComboBox.h"
43#include "TGNumberEntry.h"
44#include "TGTextEntry.h"
45#include "TGLabel.h"
46#include "TColor.h"
47#include "TVirtualPad.h"
48#include "TStyle.h"
49
51
77};
78
79
80////////////////////////////////////////////////////////////////////////////////
81/// Constructor of axis attribute GUI.
82
84 Int_t height, UInt_t options, Pixel_t back)
85 : TGedFrame(p, width, height, options | kVerticalFrame, back)
86{
87 fAxis = 0;
88
89 MakeTitle("Axis");
90
91 TGCompositeFrame *f2 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
93 f2->AddFrame(fAxisColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
94 fAxisColor->Associate(this);
95 TGLabel *fTicksLabel = new TGLabel(f2, "Ticks:");
96 f2->AddFrame(fTicksLabel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 0, 1, 1));
97 fTickLength = new TGNumberEntry(f2, 0.03, 5, kAXIS_TICKS,
101 fTickLength->GetNumberEntry()->SetToolTipText("Set ticks' length");
102 f2->AddFrame(fTickLength, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
103 AddFrame(f2, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
104
105 TGCompositeFrame *f3 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
106 TGCompositeFrame *f4a = new TGCompositeFrame(f3, 40, 20, kVerticalFrame);
107 f3->AddFrame(f4a, new TGLayoutHints(kLHintsTop, 0, 1, 0, 0));
108 fTicksBoth = new TGCheckButton(f4a, "+-", kAXIS_TICKSBOTH);
109 fTicksBoth->SetToolTipText("Draw ticks on both axis sides");
111 fLogAxis = new TGCheckButton(f4a, "Log", kAXIS_LOG);
112 fLogAxis->SetToolTipText("Draw logarithmic scale");
113 f4a->AddFrame(fLogAxis, new TGLayoutHints(kLHintsLeft | kLHintsBottom, 3, 1, 0, 0));
114
115 TGCompositeFrame *f4b = new TGCompositeFrame(f3, 40, 20, kVerticalFrame);
116 f3->AddFrame(f4b, new TGLayoutHints(kLHintsTop, 0, 1, 0, 0));
117 fOptimize = new TGCheckButton(f4b, "Optimize", kAXIS_OPTIM);
119 fOptimize->SetToolTipText("Optimize the number of axis divisions");
120 f4b->AddFrame(fOptimize, new TGLayoutHints(kLHintsTop, 17, 1, 1, 0));
121 fMoreLog = new TGCheckButton(f4b, "MoreLog", kAXIS_LBLLOG);
122 fMoreLog->SetToolTipText("Draw more logarithmic labels");
123 f4b->AddFrame(fMoreLog, new TGLayoutHints(kLHintsLeft, 17, 1, 0, 0));
124
125 AddFrame(f3, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
126
127 TGCompositeFrame *f5 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
131 fDiv3->GetNumberEntry()->SetToolTipText("Tertiary axis divisions");
132 f5->AddFrame(fDiv3, new TGLayoutHints(kLHintsLeft, 27, 0, 1, 1));
136 fDiv2->GetNumberEntry()->SetToolTipText("Secondary axis divisions");
137 f5->AddFrame(fDiv2, new TGLayoutHints(kLHintsLeft, 1, 0, 1, 1));
141 fDiv1->GetNumberEntry()->SetToolTipText("Primary axis divisions");
142 f5->AddFrame(fDiv1, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 1, 1, 1, 1));
143 AddFrame(f5, new TGLayoutHints(kLHintsLeft, 1, 1, 4, 4));
144 fTicksFlag = 1;
145
146 MakeTitle("Title");
147
148 fTitlePrec = 2;
149 fTitle = new TGTextEntry(this, new TGTextBuffer(50), kTITLE);
151 fTitle->SetToolTipText("Enter the axis title string");
152 AddFrame(fTitle, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 1));
153
154 TGCompositeFrame *f6 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
155 fTitleColor = new TGColorSelect(f6, 0, kCOL_TIT);
156 f6->AddFrame(fTitleColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
157 fTitleColor->Associate(this);
158 TGLabel *fSizeLbl1 = new TGLabel(f6, "Size:");
159 f6->AddFrame(fSizeLbl1, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 6, 1, 1, 1));
160 fTitleSize = new TGNumberEntry(f6, 0.05, 5, kAXIS_TITSIZE,
164 fTitleSize->GetNumberEntry()->SetToolTipText("Set title size");
165 f6->AddFrame(fTitleSize, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
166 AddFrame(f6, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
167
169 fTitleFont->Resize(137, 20);
170 AddFrame(fTitleFont, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 1));
171
172 TGCompositeFrame *f7 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
173 fCentered = new TGCheckButton(f7, "Centered", kAXIS_CENTERED);
174 fCentered->SetToolTipText("Center axis title");
175 f7->AddFrame(fCentered, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
176 TGLabel *fOffsetLbl = new TGLabel(f7, "Offset:");
177 f7->AddFrame(fOffsetLbl, new TGLayoutHints(kLHintsLeft, 23, 1, 3, 0));
178 AddFrame(f7, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
179
180 TGCompositeFrame *f8 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
181 fRotated = new TGCheckButton(f8, "Rotated", kAXIS_ROTATED);
183 fRotated->SetToolTipText("Rotate axis title by 180 degrees");
184 f8->AddFrame(fRotated, new TGLayoutHints(kLHintsTop, 3, 1, 6, 0));
185 fTitleOffset = new TGNumberEntry(f8, 1.00, 6, kAXIS_TITOFFSET,
189 fTitleOffset->GetNumberEntry()->SetToolTipText("Set title offset");
190 f8->AddFrame(fTitleOffset, new TGLayoutHints(kLHintsLeft, 6, 1, 0, 0));
191 AddFrame(f8, new TGLayoutHints(kLHintsTop, 1, 1, 0, 4));
192
193 MakeTitle("Labels");
194
195 fLabelPrec = 2;
196 TGCompositeFrame *f9 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
197 fLabelColor = new TGColorSelect(f9, 0, kCOL_LBL);
198 f9->AddFrame(fLabelColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
199 fLabelColor->Associate(this);
200 TGLabel *fSizeLbl2 = new TGLabel(f9, "Size:");
201 f9->AddFrame(fSizeLbl2, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 1, 0, 1, 1));
202 fLabelSize = new TGNumberEntry(f9, 0.05, 6, kAXIS_LBLSIZE,
206 fLabelSize->GetNumberEntry()->SetToolTipText("Set labels' size");
207 f9->AddFrame(fLabelSize, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
208 AddFrame(f9, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
209
210 TGCompositeFrame *f10 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
211 fNoExponent = new TGCheckButton(f10, "NoExp", kAXIS_LBLEXP);
212 fNoExponent->SetToolTipText("Labels drawn without exponent notation");
214 fLabelOffset = new TGNumberEntry(f10, 0.005, 6, kAXIS_LBLOFFSET,
218 fLabelOffset->GetNumberEntry()->SetToolTipText("Set labels' offset");
219 f10->AddFrame(fLabelOffset, new TGLayoutHints(kLHintsLeft, 11, 1, 3, 0));
220 AddFrame(f10, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
221
223 fLabelFont->Resize(137, 20);
224 AddFrame(fLabelFont, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 0));
225 fLabelFont->Associate(this);
226
227 fDecimal = new TGCheckButton(this, "Decimal labels' part", kAXIS_LBLDEC);
228 fDecimal->SetToolTipText("Draw the decimal part of labels");
230}
231
232////////////////////////////////////////////////////////////////////////////////
233/// Destructor of axis editor.
234
236{
237}
238
239////////////////////////////////////////////////////////////////////////////////
240/// Connect signals to slots.
241
243{
244 fAxisColor->Connect("ColorSelected(Pixel_t)", "TAxisEditor", this, "DoAxisColor(Pixel_t)");
245 fTickLength->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoTickLength()");
246 (fTickLength->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoTickLength()");
247 fTicksBoth->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoTicks()");
248 fOptimize->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoDivisions()");
249 fLogAxis->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoLogAxis()");
250 fMoreLog->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoMoreLog()");
251 fDiv3->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoDivisions()");
252 (fDiv3->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoDivisions()");
253 fDiv2->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoDivisions()");
254 (fDiv2->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoDivisions()");
255 fDiv1->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoDivisions()");
256 (fDiv1->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoDivisions()");
257 fTitle->Connect("TextChanged(const char *)", "TAxisEditor", this, "DoTitle(const char *)");;
258 fTitleColor->Connect("ColorSelected(Pixel_t)", "TAxisEditor", this, "DoTitleColor(Pixel_t)");
259 fTitleSize->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoTitleSize()");
260 (fTitleSize->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoTitleSize()");
261 fTitleFont->Connect("Selected(Int_t)", "TAxisEditor", this, "DoTitleFont(Int_t)");
262 fCentered->Connect("Toggled(Bool_t)","TAxisEditor",this, "DoTitleCentered()");
263 fRotated->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoTitleRotated()");
264 fTitleOffset->Connect("ValueSet(Long_t)","TAxisEditor",this,"DoTitleOffset()");
265 (fTitleOffset->GetNumberEntry())->Connect("ReturnPressed()","TAxisEditor",this,"DoTitleOffset()");
266 fLabelColor->Connect("ColorSelected(Pixel_t)", "TAxisEditor", this, "DoLabelColor(Pixel_t)");
267 fLabelSize->Connect("ValueSet(Long_t)","TAxisEditor",this,"DoLabelSize()");
268 (fLabelSize->GetNumberEntry())->Connect("ReturnPressed()","TAxisEditor",this,"DoLabelSize()");
269 fNoExponent->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoNoExponent()");
270 fDecimal->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoDecimal(Bool_t)");
271 fLabelOffset->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoLabelOffset()");
272 (fLabelOffset->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoLabelOffset()");
273 fLabelFont->Connect("Selected(Int_t)", "TAxisEditor", this, "DoLabelFont(Int_t)");
274 fInit = kFALSE;
275}
276
277////////////////////////////////////////////////////////////////////////////////
278/// Pick up the used values of axis attributes.
279
281{
282 fAxis = (TAxis *)obj;
284
288
291
292 Int_t div = fAxis->GetNdivisions();
293 fDiv1->SetNumber(div % 100);
294 fDiv2->SetNumber((div/100) % 100);
295 fDiv3->SetNumber((div/10000) % 100);
296
297
298 if ((!strcmp(fAxis->GetName(),"xaxis") && fGedEditor->GetPad()->GetLogx()) ||
299 (!strcmp(fAxis->GetName(),"yaxis") && fGedEditor->GetPad()->GetLogy()) ||
300 (!strcmp(fAxis->GetName(),"zaxis") && fGedEditor->GetPad()->GetLogz()))
301
304
305 if (fLogAxis->GetState() == kButtonUp) {
307 } else {
308 Int_t morelog = fAxis->GetMoreLogLabels();
309 if (morelog) fMoreLog->SetState(kButtonDown);
311 }
312
313 const char *both = fAxis->GetTicks();
314 if (!strcmp(both,"+-")) {
316 } else {
318 if (!strcmp(both,"-")) fTicksFlag = -1;
319 if (!strcmp(both,"+")) fTicksFlag = 1;
320 }
321
322 const char *text = fAxis->GetTitle();
324
325 c = fAxis->GetTitleColor();
328
329 fl = fAxis->GetTitleSize();
331
332 Style_t font = fAxis->GetTitleFont();
333 fTitleFont->Select(font / 10);
334 fTitlePrec = (Int_t)(font % 10);
335
336 fl = fAxis->GetTitleOffset();
338
339 Int_t centered = fAxis->GetCenterTitle();
340 if (centered) fCentered->SetState(kButtonDown);
342
343 Int_t rotated = fAxis->GetRotateTitle();
344 if (rotated) fRotated->SetState(kButtonDown);
346
347 c = fAxis->GetLabelColor();
350
351 fl = fAxis->GetLabelSize();
353
354 font = fAxis->GetLabelFont();
355 fLabelFont->Select(font / 10);
356 fLabelPrec = (Int_t)(font % 10);
357
358 fl = fAxis->GetLabelOffset();
360
361 Int_t noexp = fAxis->GetNoExponent();
362 if (noexp) fNoExponent->SetState(kButtonDown);
364
365 Bool_t on = fAxis->GetDecimals();
366 if (on) fDecimal->SetState(kButtonDown);
368
371}
372
373////////////////////////////////////////////////////////////////////////////////
374/// Slot connected to the axis color.
375
377{
378 if (fAvoidSignal) return;
380 Update();
381}
382
383////////////////////////////////////////////////////////////////////////////////
384/// Slot connected to the tick length settings.
385
387{
388 if (fAvoidSignal) return;
389 Float_t ticks = fTickLength->GetNumber();
390 fAxis->SetTickLength(ticks);
391 Update();
392 if (fTickLength->GetNumber() < 0) fTicksFlag = -1;
393 else fTicksFlag = 1;
394}
395
396////////////////////////////////////////////////////////////////////////////////
397/// Slot connected to the ticks draw settings.
398
400{
401 if (fAvoidSignal) return;
402 if (fTicksBoth->GetState() == kButtonDown) {
403 fAxis->SetTicks("+-");
404 } else {
405 if (fTicksFlag == -1) fAxis->SetTicks("-");
406 else fAxis->SetTicks("");
407 }
408 Update();
409}
410
411////////////////////////////////////////////////////////////////////////////////
412/// Slot connected to the number of divisions.
413
415{
416 // the number of divisions are used 3 number entry widgets
417 if (fAvoidSignal) return;
418 Int_t div = (Int_t)(fDiv1->GetNumber() + fDiv2->GetNumber() * 100
419 + fDiv3->GetNumber() * 10000);
421 Update();
422}
423
424////////////////////////////////////////////////////////////////////////////////
425/// Slot for Log scale setting.
426
428{
429 if (fAvoidSignal) return;
430
432
433 if (fLogAxis->GetState() == kButtonDown) {
434
435 if (!strcmp(fAxis->GetName(),"xaxis")) gPad->SetLogx(1);
436 if (!strcmp(fAxis->GetName(),"yaxis")) gPad->SetLogy(1);
437 if (!strcmp(fAxis->GetName(),"zaxis")) gPad->SetLogz(1);
438
439 Int_t morelog = fAxis->GetMoreLogLabels();
440 if (morelog) fMoreLog->SetState(kButtonDown);
443
444 } else if (fLogAxis->GetState() == kButtonUp){
445 if (!strcmp(fAxis->GetName(),"xaxis")) gPad->SetLogx(0);
446 if (!strcmp(fAxis->GetName(),"yaxis")) gPad->SetLogy(0);
447 if (!strcmp(fAxis->GetName(),"zaxis")) gPad->SetLogz(0);
450 }
451 Update();
452}
453
454////////////////////////////////////////////////////////////////////////////////
455/// Slot connected to more Log labels flag
456
458{
459 if (fAvoidSignal) return;
460 Int_t flag = 0;
461 if (fMoreLog->GetState() == kButtonDown) flag = 1;
462 else if (fMoreLog->GetState() == kButtonUp) flag = 0;
463 fAxis->SetMoreLogLabels(flag);
464 Update();
465}
466
467////////////////////////////////////////////////////////////////////////////////
468/// Slot connected to the axis color.
469
470void TAxisEditor::DoTitle(const char *text)
471{
472 if (fAvoidSignal) return;
474 Update();
475}
476
477////////////////////////////////////////////////////////////////////////////////
478/// Slot connected to the title color.
479
481{
482 if (fAvoidSignal) return;
484 Update();
485}
486
487////////////////////////////////////////////////////////////////////////////////
488/// Slot connected to the title font size.
489
491{
492 if (fAvoidSignal) return;
493 Float_t size = fTitleSize->GetNumber();
494 fAxis->SetTitleSize(size);
495 Update();
496}
497
498////////////////////////////////////////////////////////////////////////////////
499/// Slot connected to the title font.
500
502{
503 if (fAvoidSignal) return;
504 Int_t f = font * 10 + fTitlePrec;
506 Update();
507}
508
509////////////////////////////////////////////////////////////////////////////////
510/// Slot connected to the title offset.
511
513{
514 if (fAvoidSignal) return;
515 Float_t offset = fTitleOffset->GetNumber();
516 fAxis->SetTitleOffset(offset);
517 Update();
518}
519
520////////////////////////////////////////////////////////////////////////////////
521/// Slot connected to centered title option.
522
524{
525 if (fAvoidSignal) return;
526 Int_t ctr = fCentered->GetState();
527 fAxis->CenterTitle(ctr);
528 Update();
529}
530
531////////////////////////////////////////////////////////////////////////////////
532/// Slot connected to the title rotation.
533
535{
536 if (fAvoidSignal) return;
537 Int_t rot = fRotated->GetState();
538 fAxis->RotateTitle(rot);
539 Update();
540}
541
542////////////////////////////////////////////////////////////////////////////////
543/// Slot connected to the label color.
544
546{
547 if (fAvoidSignal) return;
549 Update();
550}
551
552////////////////////////////////////////////////////////////////////////////////
553/// Slot connected to the label size.
554
556{
557 if (fAvoidSignal) return;
558 Float_t size = fLabelSize->GetNumber();
559 fAxis->SetLabelSize(size);
560 Update();
561}
562
563////////////////////////////////////////////////////////////////////////////////
564/// Slot connected to the label font.
565
567{
568 if (fAvoidSignal) return;
569 Int_t f = font * 10 + fLabelPrec;
571 Update();
572}
573
574////////////////////////////////////////////////////////////////////////////////
575/// Slot connected to the label offset.
576
578{
579 if (fAvoidSignal) return;
580 Float_t offset = fLabelOffset->GetNumber();
581 fAxis->SetLabelOffset(offset);
582 Update();
583}
584
585////////////////////////////////////////////////////////////////////////////////
586/// Slot connected to the labels' exponent flag.
587
589{
590 if (fAvoidSignal) return;
593 Update();
594}
595
596////////////////////////////////////////////////////////////////////////////////
597/// Slot connected to the decimal part setting.
598
600{
601 if (fAvoidSignal) return;
602 fAxis->SetDecimals(on);
604 Update();
605 gPad->Modified();
606 gPad->Update();
607}
608
@ 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
int Int_t
Definition RtypesCore.h:45
const Bool_t kFALSE
Definition RtypesCore.h:92
short Color_t
Definition RtypesCore.h:83
short Style_t
Definition RtypesCore.h:80
float Float_t
Definition RtypesCore.h:57
const Bool_t kTRUE
Definition RtypesCore.h:91
#define ClassImp(name)
Definition Rtypes.h:364
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
include TDocParser_001 C image html pict1_TDocParser_001 png width
@ kButtonDown
Definition TGButton.h:54
@ kButtonDisabled
Definition TGButton.h:56
@ kButtonUp
Definition TGButton.h:53
@ kLHintsLeft
Definition TGLayout.h:31
@ kLHintsCenterY
Definition TGLayout.h:35
@ kLHintsBottom
Definition TGLayout.h:36
@ kLHintsTop
Definition TGLayout.h:34
double exp(double)
R__EXTERN TStyle * gStyle
Definition TStyle.h:412
#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:293
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:162
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:321
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels.
Definition TAttAxis.cxx:192
virtual void SetLabelFont(Style_t font=62)
Set labels' font.
Definition TAttAxis.cxx:182
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title.
Definition TAttAxis.cxx:303
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
Definition TAttAxis.cxx:312
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:279
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
Definition TAttAxis.cxx:228
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
Definition TAttAxis.cxx:172
TGCheckButton * fRotated
Definition TAxisEditor.h:56
virtual void DoLabelColor(Pixel_t color)
Slot connected to the label color.
virtual void DoTitleColor(Pixel_t color)
Slot connected to the title color.
TAxisEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor of axis attribute GUI.
TGColorSelect * fTitleColor
Definition TAxisEditor.h:50
virtual void DoAxisColor(Pixel_t color)
Slot connected to the axis color.
virtual void DoTitleCentered()
Slot connected to centered title option.
TGCheckButton * fMoreLog
Definition TAxisEditor.h:47
TGNumberEntry * fDiv2
Definition TAxisEditor.h:43
TGColorSelect * fAxisColor
Definition TAxisEditor.h:39
Int_t fLabelPrec
Definition TAxisEditor.h:59
Int_t fTicksFlag
Definition TAxisEditor.h:48
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
Definition TAxisEditor.h:49
TGCheckButton * fNoExponent
Definition TAxisEditor.h:62
TGFontTypeComboBox * fTitleFont
Definition TAxisEditor.h:51
TGCheckButton * fLogAxis
Definition TAxisEditor.h:40
virtual ~TAxisEditor()
Destructor of axis editor.
Int_t fTitlePrec
Definition TAxisEditor.h:52
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
Definition TAxisEditor.h:41
virtual void DoTitleSize()
Slot connected to the title font size.
TGNumberEntry * fTitleOffset
Definition TAxisEditor.h:54
virtual void DoLabelOffset()
Slot connected to the label offset.
TGNumberEntry * fDiv1
Definition TAxisEditor.h:42
TGNumberEntry * fTitleSize
Definition TAxisEditor.h:53
TGColorSelect * fLabelColor
Definition TAxisEditor.h:57
virtual void DoTickLength()
Slot connected to the tick length settings.
TGCheckButton * fTicksBoth
Definition TAxisEditor.h:46
virtual void DoTitleRotated()
Slot connected to the title rotation.
TGNumberEntry * fLabelOffset
Definition TAxisEditor.h:61
TGCheckButton * fOptimize
Definition TAxisEditor.h:45
virtual void DoLogAxis()
Slot for Log scale setting.
TGCheckButton * fCentered
Definition TAxisEditor.h:55
virtual void DoNoExponent()
Slot connected to the labels' exponent flag.
TGCheckButton * fDecimal
Definition TAxisEditor.h:63
virtual void DoDivisions()
Slot connected to the number of divisions.
virtual void DoLabelFont(Int_t font)
Slot connected to the label font.
TGNumberEntry * fDiv3
Definition TAxisEditor.h:44
virtual void DoMoreLog()
Slot connected to more Log labels flag.
TGNumberEntry * fLabelSize
Definition TAxisEditor.h:60
virtual void DoLabelSize()
Slot connected to the label size.
virtual void SetModel(TObject *obj)
Pick up the used values of axis attributes.
TAxis * fAxis
Definition TAxisEditor.h:38
TGFontTypeComboBox * fLabelFont
Definition TAxisEditor.h:58
Class to manage histogram axis.
Definition TAxis.h:30
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:203
Bool_t GetRotateTitle() const
Definition TAxis.h:124
Bool_t GetCenterTitle() const
Definition TAxis.h:115
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:213
Bool_t GetMoreLogLabels() const
Definition TAxis.h:120
virtual void SetTicks(Option_t *option="+")
Set ticks orientation.
Definition TAxis.cxx:972
Bool_t GetNoExponent() const
Definition TAxis.h:122
void RotateTitle(Bool_t rotate=kTRUE)
Rotate title by 180 degrees.
Definition TAxis.h:193
void CenterTitle(Bool_t center=kTRUE)
Center axis title.
Definition TAxis.h:184
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:223
Bool_t GetDecimals() const
Definition TAxis.h:116
const char * GetTitle() const
Returns title of object.
Definition TAxis.h:129
virtual const char * GetTicks() const
Return the ticks option (see SetTicks)
Definition TAxis.cxx:586
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
Definition TColor.cxx:2016
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:1769
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition TGButton.cxx:398
virtual EButtonState GetState() const
Definition TGButton.h:112
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
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...
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1102
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:215
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition TGFrame.cxx:590
virtual void SetNumber(Double_t val)
TGNumberEntryField * GetNumberEntry() const
virtual Double_t GetNumber() const
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:82
virtual TVirtualPad * GetPad() const
Definition TGedEditor.h:88
TGedEditor * fGedEditor
Definition TGedFrame.h:55
Bool_t fInit
Definition TGedFrame.h:54
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:96
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition TGedFrame.cxx:73
Bool_t fAvoidSignal
Definition TGedFrame.h:57
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition TNamed.cxx:164
virtual const char * GetName() const
Returns name of object.
Definition TNamed.h:47
Mother of all ROOT objects.
Definition TObject.h:37
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:866
void SetStripDecimals(Bool_t strip=kTRUE)
Set option to strip decimals when drawing axis labels.
Definition TStyle.cxx:1813
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
TText * text