Logo ROOT   6.16/01
Reference Guide
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 "TGToolTip.h"
46#include "TGLabel.h"
47#include "TColor.h"
48#include "TVirtualPad.h"
49#include "TStyle.h"
50
52
78};
79
80
81////////////////////////////////////////////////////////////////////////////////
82/// Constructor of axis attribute GUI.
83
85 Int_t height, UInt_t options, Pixel_t back)
86 : TGedFrame(p, width, height, options | kVerticalFrame, back)
87{
88 fAxis = 0;
89
90 MakeTitle("Axis");
91
92 TGCompositeFrame *f2 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
94 f2->AddFrame(fAxisColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
95 fAxisColor->Associate(this);
96 TGLabel *fTicksLabel = new TGLabel(f2, "Ticks:");
97 f2->AddFrame(fTicksLabel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 0, 1, 1));
98 fTickLength = new TGNumberEntry(f2, 0.03, 5, kAXIS_TICKS,
102 fTickLength->GetNumberEntry()->SetToolTipText("Set ticks' length");
103 f2->AddFrame(fTickLength, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
104 AddFrame(f2, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
105
106 TGCompositeFrame *f3 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
107 TGCompositeFrame *f4a = new TGCompositeFrame(f3, 40, 20, kVerticalFrame);
108 f3->AddFrame(f4a, new TGLayoutHints(kLHintsTop, 0, 1, 0, 0));
109 fTicksBoth = new TGCheckButton(f4a, "+-", kAXIS_TICKSBOTH);
110 fTicksBoth->SetToolTipText("Draw ticks on both axis sides");
112 fLogAxis = new TGCheckButton(f4a, "Log", kAXIS_LOG);
113 fLogAxis->SetToolTipText("Draw logarithmic scale");
114 f4a->AddFrame(fLogAxis, new TGLayoutHints(kLHintsLeft | kLHintsBottom, 3, 1, 0, 0));
115
116 TGCompositeFrame *f4b = new TGCompositeFrame(f3, 40, 20, kVerticalFrame);
117 f3->AddFrame(f4b, new TGLayoutHints(kLHintsTop, 0, 1, 0, 0));
118 fOptimize = new TGCheckButton(f4b, "Optimize", kAXIS_OPTIM);
120 fOptimize->SetToolTipText("Optimize the number of axis divisions");
121 f4b->AddFrame(fOptimize, new TGLayoutHints(kLHintsTop, 17, 1, 1, 0));
122 fMoreLog = new TGCheckButton(f4b, "MoreLog", kAXIS_LBLLOG);
123 fMoreLog->SetToolTipText("Draw more logarithmic labels");
124 f4b->AddFrame(fMoreLog, new TGLayoutHints(kLHintsLeft, 17, 1, 0, 0));
125
126 AddFrame(f3, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
127
128 TGCompositeFrame *f5 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
132 fDiv3->GetNumberEntry()->SetToolTipText("Tertiary axis divisions");
133 f5->AddFrame(fDiv3, new TGLayoutHints(kLHintsLeft, 27, 0, 1, 1));
137 fDiv2->GetNumberEntry()->SetToolTipText("Secondary axis divisions");
138 f5->AddFrame(fDiv2, new TGLayoutHints(kLHintsLeft, 1, 0, 1, 1));
142 fDiv1->GetNumberEntry()->SetToolTipText("Primary axis divisions");
143 f5->AddFrame(fDiv1, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 1, 1, 1, 1));
144 AddFrame(f5, new TGLayoutHints(kLHintsLeft, 1, 1, 4, 4));
145 fTicksFlag = 1;
146
147 MakeTitle("Title");
148
149 fTitlePrec = 2;
150 fTitle = new TGTextEntry(this, new TGTextBuffer(50), kTITLE);
152 fTitle->SetToolTipText("Enter the axis title string");
153 AddFrame(fTitle, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 1));
154
155 TGCompositeFrame *f6 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
156 fTitleColor = new TGColorSelect(f6, 0, kCOL_TIT);
157 f6->AddFrame(fTitleColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
158 fTitleColor->Associate(this);
159 TGLabel *fSizeLbl1 = new TGLabel(f6, "Size:");
160 f6->AddFrame(fSizeLbl1, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 6, 1, 1, 1));
161 fTitleSize = new TGNumberEntry(f6, 0.05, 5, kAXIS_TITSIZE,
165 fTitleSize->GetNumberEntry()->SetToolTipText("Set title size");
166 f6->AddFrame(fTitleSize, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
167 AddFrame(f6, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
168
170 fTitleFont->Resize(137, 20);
171 AddFrame(fTitleFont, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 1));
172
173 TGCompositeFrame *f7 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
174 fCentered = new TGCheckButton(f7, "Centered", kAXIS_CENTERED);
175 fCentered->SetToolTipText("Center axis title");
176 f7->AddFrame(fCentered, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
177 TGLabel *fOffsetLbl = new TGLabel(f7, "Offset:");
178 f7->AddFrame(fOffsetLbl, new TGLayoutHints(kLHintsLeft, 23, 1, 3, 0));
179 AddFrame(f7, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
180
181 TGCompositeFrame *f8 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
182 fRotated = new TGCheckButton(f8, "Rotated", kAXIS_ROTATED);
184 fRotated->SetToolTipText("Rotate axis title by 180 degrees");
185 f8->AddFrame(fRotated, new TGLayoutHints(kLHintsTop, 3, 1, 6, 0));
186 fTitleOffset = new TGNumberEntry(f8, 1.00, 6, kAXIS_TITOFFSET,
190 fTitleOffset->GetNumberEntry()->SetToolTipText("Set title offset");
191 f8->AddFrame(fTitleOffset, new TGLayoutHints(kLHintsLeft, 6, 1, 0, 0));
192 AddFrame(f8, new TGLayoutHints(kLHintsTop, 1, 1, 0, 4));
193
194 MakeTitle("Labels");
195
196 fLabelPrec = 2;
197 TGCompositeFrame *f9 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
198 fLabelColor = new TGColorSelect(f9, 0, kCOL_LBL);
199 f9->AddFrame(fLabelColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
200 fLabelColor->Associate(this);
201 TGLabel *fSizeLbl2 = new TGLabel(f9, "Size:");
202 f9->AddFrame(fSizeLbl2, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 1, 0, 1, 1));
203 fLabelSize = new TGNumberEntry(f9, 0.05, 6, kAXIS_LBLSIZE,
207 fLabelSize->GetNumberEntry()->SetToolTipText("Set labels' size");
208 f9->AddFrame(fLabelSize, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
209 AddFrame(f9, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
210
211 TGCompositeFrame *f10 = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
212 fNoExponent = new TGCheckButton(f10, "NoExp", kAXIS_LBLEXP);
213 fNoExponent->SetToolTipText("Labels drawn without exponent notation");
215 fLabelOffset = new TGNumberEntry(f10, 0.005, 6, kAXIS_LBLOFFSET,
219 fLabelOffset->GetNumberEntry()->SetToolTipText("Set labels' offset");
220 f10->AddFrame(fLabelOffset, new TGLayoutHints(kLHintsLeft, 11, 1, 3, 0));
221 AddFrame(f10, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
222
224 fLabelFont->Resize(137, 20);
225 AddFrame(fLabelFont, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 0));
226 fLabelFont->Associate(this);
227
228 fDecimal = new TGCheckButton(this, "Decimal labels' part", kAXIS_LBLDEC);
229 fDecimal->SetToolTipText("Draw the decimal part of labels");
231}
232
233////////////////////////////////////////////////////////////////////////////////
234/// Destructor of axis editor.
235
237{
238}
239
240////////////////////////////////////////////////////////////////////////////////
241/// Connect signals to slots.
242
244{
245 fAxisColor->Connect("ColorSelected(Pixel_t)", "TAxisEditor", this, "DoAxisColor(Pixel_t)");
246 fTickLength->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoTickLength()");
247 (fTickLength->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoTickLength()");
248 fTicksBoth->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoTicks()");
249 fOptimize->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoDivisions()");
250 fLogAxis->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoLogAxis()");
251 fMoreLog->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoMoreLog()");
252 fDiv3->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoDivisions()");
253 (fDiv3->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoDivisions()");
254 fDiv2->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoDivisions()");
255 (fDiv2->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoDivisions()");
256 fDiv1->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoDivisions()");
257 (fDiv1->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoDivisions()");
258 fTitle->Connect("TextChanged(const char *)", "TAxisEditor", this, "DoTitle(const char *)");;
259 fTitleColor->Connect("ColorSelected(Pixel_t)", "TAxisEditor", this, "DoTitleColor(Pixel_t)");
260 fTitleSize->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoTitleSize()");
261 (fTitleSize->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoTitleSize()");
262 fTitleFont->Connect("Selected(Int_t)", "TAxisEditor", this, "DoTitleFont(Int_t)");
263 fCentered->Connect("Toggled(Bool_t)","TAxisEditor",this, "DoTitleCentered()");
264 fRotated->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoTitleRotated()");
265 fTitleOffset->Connect("ValueSet(Long_t)","TAxisEditor",this,"DoTitleOffset()");
266 (fTitleOffset->GetNumberEntry())->Connect("ReturnPressed()","TAxisEditor",this,"DoTitleOffset()");
267 fLabelColor->Connect("ColorSelected(Pixel_t)", "TAxisEditor", this, "DoLabelColor(Pixel_t)");
268 fLabelSize->Connect("ValueSet(Long_t)","TAxisEditor",this,"DoLabelSize()");
269 (fLabelSize->GetNumberEntry())->Connect("ReturnPressed()","TAxisEditor",this,"DoLabelSize()");
270 fNoExponent->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoNoExponent()");
271 fDecimal->Connect("Toggled(Bool_t)","TAxisEditor",this,"DoDecimal(Bool_t)");
272 fLabelOffset->Connect("ValueSet(Long_t)", "TAxisEditor", this, "DoLabelOffset()");
273 (fLabelOffset->GetNumberEntry())->Connect("ReturnPressed()", "TAxisEditor", this, "DoLabelOffset()");
274 fLabelFont->Connect("Selected(Int_t)", "TAxisEditor", this, "DoLabelFont(Int_t)");
275 fInit = kFALSE;
276}
277
278////////////////////////////////////////////////////////////////////////////////
279/// Pick up the used values of axis attributes.
280
282{
283 fAxis = (TAxis *)obj;
285
289
292
293 Int_t div = fAxis->GetNdivisions();
294 fDiv1->SetNumber(div % 100);
295 fDiv2->SetNumber((div/100) % 100);
296 fDiv3->SetNumber((div/10000) % 100);
297
298
299 if ((!strcmp(fAxis->GetName(),"xaxis") && fGedEditor->GetPad()->GetLogx()) ||
300 (!strcmp(fAxis->GetName(),"yaxis") && fGedEditor->GetPad()->GetLogy()) ||
301 (!strcmp(fAxis->GetName(),"zaxis") && fGedEditor->GetPad()->GetLogz()))
302
305
306 if (fLogAxis->GetState() == kButtonUp) {
308 } else {
309 Int_t morelog = fAxis->GetMoreLogLabels();
310 if (morelog) fMoreLog->SetState(kButtonDown);
312 }
313
314 const char *both = fAxis->GetTicks();
315 if (!strcmp(both,"+-")) {
317 } else {
319 if (!strcmp(both,"-")) fTicksFlag = -1;
320 if (!strcmp(both,"+")) fTicksFlag = 1;
321 }
322
323 const char *text = fAxis->GetTitle();
325
326 c = fAxis->GetTitleColor();
329
330 fl = fAxis->GetTitleSize();
332
333 Style_t font = fAxis->GetTitleFont();
334 fTitleFont->Select(font / 10);
335 fTitlePrec = (Int_t)(font % 10);
336
337 fl = fAxis->GetTitleOffset();
339
340 Int_t centered = fAxis->GetCenterTitle();
341 if (centered) fCentered->SetState(kButtonDown);
343
344 Int_t rotated = fAxis->GetRotateTitle();
345 if (rotated) fRotated->SetState(kButtonDown);
347
348 c = fAxis->GetLabelColor();
351
352 fl = fAxis->GetLabelSize();
354
355 font = fAxis->GetLabelFont();
356 fLabelFont->Select(font / 10);
357 fLabelPrec = (Int_t)(font % 10);
358
359 fl = fAxis->GetLabelOffset();
361
362 Int_t noexp = fAxis->GetNoExponent();
363 if (noexp) fNoExponent->SetState(kButtonDown);
365
366 Bool_t on = fAxis->GetDecimals();
367 if (on) fDecimal->SetState(kButtonDown);
369
372}
373
374////////////////////////////////////////////////////////////////////////////////
375/// Slot connected to the axis color.
376
378{
379 if (fAvoidSignal) return;
381 Update();
382}
383
384////////////////////////////////////////////////////////////////////////////////
385/// Slot connected to the tick length settings.
386
388{
389 if (fAvoidSignal) return;
390 Float_t ticks = fTickLength->GetNumber();
391 fAxis->SetTickLength(ticks);
392 Update();
393 if (fTickLength->GetNumber() < 0) fTicksFlag = -1;
394 else fTicksFlag = 1;
395}
396
397////////////////////////////////////////////////////////////////////////////////
398/// Slot connected to the ticks draw settings.
399
401{
402 if (fAvoidSignal) return;
403 if (fTicksBoth->GetState() == kButtonDown) {
404 fAxis->SetTicks("+-");
405 } else {
406 if (fTicksFlag == -1) fAxis->SetTicks("-");
407 else fAxis->SetTicks("");
408 }
409 Update();
410}
411
412////////////////////////////////////////////////////////////////////////////////
413/// Slot connected to the number of divisions.
414
416{
417 // the number of divisions are used 3 number entry widgets
418 if (fAvoidSignal) return;
419 Int_t div = (Int_t)(fDiv1->GetNumber() + fDiv2->GetNumber() * 100
420 + fDiv3->GetNumber() * 10000);
422 Update();
423}
424
425////////////////////////////////////////////////////////////////////////////////
426/// Slot for Log scale setting.
427
429{
430 if (fAvoidSignal) return;
431
433
434 if (fLogAxis->GetState() == kButtonDown) {
435
436 if (!strcmp(fAxis->GetName(),"xaxis")) gPad->SetLogx(1);
437 if (!strcmp(fAxis->GetName(),"yaxis")) gPad->SetLogy(1);
438 if (!strcmp(fAxis->GetName(),"zaxis")) gPad->SetLogz(1);
439
440 Int_t morelog = fAxis->GetMoreLogLabels();
441 if (morelog) fMoreLog->SetState(kButtonDown);
444
445 } else if (fLogAxis->GetState() == kButtonUp){
446 if (!strcmp(fAxis->GetName(),"xaxis")) gPad->SetLogx(0);
447 if (!strcmp(fAxis->GetName(),"yaxis")) gPad->SetLogy(0);
448 if (!strcmp(fAxis->GetName(),"zaxis")) gPad->SetLogz(0);
451 }
452 Update();
453}
454
455////////////////////////////////////////////////////////////////////////////////
456/// Slot connected to more Log labels flag
457
459{
460 if (fAvoidSignal) return;
461 Int_t flag = 0;
462 if (fMoreLog->GetState() == kButtonDown) flag = 1;
463 else if (fMoreLog->GetState() == kButtonUp) flag = 0;
464 fAxis->SetMoreLogLabels(flag);
465 Update();
466}
467
468////////////////////////////////////////////////////////////////////////////////
469/// Slot connected to the axis color.
470
471void TAxisEditor::DoTitle(const char *text)
472{
473 if (fAvoidSignal) return;
475 Update();
476}
477
478////////////////////////////////////////////////////////////////////////////////
479/// Slot connected to the title color.
480
482{
483 if (fAvoidSignal) return;
485 Update();
486}
487
488////////////////////////////////////////////////////////////////////////////////
489/// Slot connected to the title font size.
490
492{
493 if (fAvoidSignal) return;
494 Float_t size = fTitleSize->GetNumber();
495 fAxis->SetTitleSize(size);
496 Update();
497}
498
499////////////////////////////////////////////////////////////////////////////////
500/// Slot connected to the title font.
501
503{
504 if (fAvoidSignal) return;
505 Int_t f = font * 10 + fTitlePrec;
507 Update();
508}
509
510////////////////////////////////////////////////////////////////////////////////
511/// Slot connected to the title offset.
512
514{
515 if (fAvoidSignal) return;
516 Float_t offset = fTitleOffset->GetNumber();
517 fAxis->SetTitleOffset(offset);
518 Update();
519}
520
521////////////////////////////////////////////////////////////////////////////////
522/// Slot connected to centered title option.
523
525{
526 if (fAvoidSignal) return;
527 Int_t ctr = fCentered->GetState();
528 fAxis->CenterTitle(ctr);
529 Update();
530}
531
532////////////////////////////////////////////////////////////////////////////////
533/// Slot connected to the title rotation.
534
536{
537 if (fAvoidSignal) return;
538 Int_t rot = fRotated->GetState();
539 fAxis->RotateTitle(rot);
540 Update();
541}
542
543////////////////////////////////////////////////////////////////////////////////
544/// Slot connected to the label color.
545
547{
548 if (fAvoidSignal) return;
550 Update();
551}
552
553////////////////////////////////////////////////////////////////////////////////
554/// Slot connected to the label size.
555
557{
558 if (fAvoidSignal) return;
559 Float_t size = fLabelSize->GetNumber();
560 fAxis->SetLabelSize(size);
561 Update();
562}
563
564////////////////////////////////////////////////////////////////////////////////
565/// Slot connected to the label font.
566
568{
569 if (fAvoidSignal) return;
570 Int_t f = font * 10 + fLabelPrec;
572 Update();
573}
574
575////////////////////////////////////////////////////////////////////////////////
576/// Slot connected to the label offset.
577
579{
580 if (fAvoidSignal) return;
581 Float_t offset = fLabelOffset->GetNumber();
582 fAxis->SetLabelOffset(offset);
583 Update();
584}
585
586////////////////////////////////////////////////////////////////////////////////
587/// Slot connected to the labels' exponent flag.
588
590{
591 if (fAvoidSignal) return;
594 Update();
595}
596
597////////////////////////////////////////////////////////////////////////////////
598/// Slot connected to the decimal part setting.
599
601{
602 if (fAvoidSignal) return;
603 fAxis->SetDecimals(on);
605 Update();
606 gPad->Modified();
607 gPad->Update();
608}
609
ULong_t Pixel_t
Definition: GuiTypes.h:39
#define f(i)
Definition: RSha256.hxx:104
#define c(i)
Definition: RSha256.hxx:101
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
short Color_t
Definition: RtypesCore.h:79
short Style_t
Definition: RtypesCore.h:76
float Float_t
Definition: RtypesCore.h:53
const Bool_t kTRUE
Definition: RtypesCore.h:87
#define ClassImp(name)
Definition: Rtypes.h:363
EAxisWid
Definition: TAxisEditor.cxx:53
@ kAXIS_LBLDIR
Definition: TAxisEditor.cxx:75
@ kAXIS_LBLOFFSET
Definition: TAxisEditor.cxx:71
@ kAXIS_LOG
Definition: TAxisEditor.cxx:65
@ kTITLE
Definition: TAxisEditor.cxx:59
@ kFONT_TIT
Definition: TAxisEditor.cxx:57
@ kAXIS_LBLLOG
Definition: TAxisEditor.cxx:73
@ kAXIS_DIV2
Definition: TAxisEditor.cxx:62
@ kFONT_LBL
Definition: TAxisEditor.cxx:58
@ kAXIS_CENTERED
Definition: TAxisEditor.cxx:68
@ kAXIS_TICKS
Definition: TAxisEditor.cxx:60
@ kAXIS_LBLEXP
Definition: TAxisEditor.cxx:74
@ kAXIS_TITOFFSET
Definition: TAxisEditor.cxx:67
@ kAXIS_LBLSIZE
Definition: TAxisEditor.cxx:70
@ kAXIS_LBLDEC
Definition: TAxisEditor.cxx:77
@ kAXIS_TICKSBOTH
Definition: TAxisEditor.cxx:72
@ kCOL_AXIS
Definition: TAxisEditor.cxx:54
@ kCOL_TIT
Definition: TAxisEditor.cxx:55
@ kCOL_LBL
Definition: TAxisEditor.cxx:56
@ kAXIS_LBLSORT
Definition: TAxisEditor.cxx:76
@ kAXIS_DIV1
Definition: TAxisEditor.cxx:61
@ kAXIS_OPTIM
Definition: TAxisEditor.cxx:64
@ kAXIS_DIV3
Definition: TAxisEditor.cxx:63
@ kAXIS_ROTATED
Definition: TAxisEditor.cxx:69
@ kAXIS_TITSIZE
Definition: TAxisEditor.cxx:66
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
@ kButtonDown
Definition: TGButton.h:54
@ kButtonDisabled
Definition: TGButton.h:56
@ kButtonUp
Definition: TGButton.h:53
@ kVerticalFrame
Definition: TGFrame.h:59
@ kHorizontalFrame
Definition: TGFrame.h:60
@ 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:406
#define gPad
Definition: TVirtualPad.h:286
virtual Color_t GetTitleColor() const
Definition: TAttAxis.h:45
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 Offset is a correction factor with respect to the "s...
Definition: TAttAxis.cxx:294
virtual Style_t GetTitleFont() const
Definition: TAttAxis.h:46
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:163
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels The size is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:204
virtual Style_t GetLabelFont() const
Definition: TAttAxis.h:39
virtual void SetTitleFont(Style_t font=62)
Set the title font.
Definition: TAttAxis.cxx:322
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels The distance is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:193
virtual void SetLabelFont(Style_t font=62)
Set labels' font.
Definition: TAttAxis.cxx:183
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title The size is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:304
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
Definition: TAttAxis.cxx:313
virtual Float_t GetTitleSize() const
Definition: TAttAxis.h:43
virtual Float_t GetLabelSize() const
Definition: TAttAxis.h:41
virtual Float_t GetTickLength() const
Definition: TAttAxis.h:44
virtual Float_t GetTitleOffset() const
Definition: TAttAxis.h:42
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length The length is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:280
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
Definition: TAttAxis.cxx:229
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
Definition: TAttAxis.cxx:173
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.
Definition: TAxisEditor.cxx:84
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:954
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:572
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
Definition: TColor.cxx:1997
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:1758
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition: TGButton.cxx:395
virtual EButtonState GetState() const
Definition: TGButton.h:112
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1200
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...
Definition: TGComboBox.cxx:443
TGCompositeFrame(const TGCompositeFrame &)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:238
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
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:84
virtual TVirtualPad * GetPad() const
Definition: TGedEditor.h:89
TGedEditor * fGedEditor
Definition: TGedFrame.h:54
Bool_t fInit
Definition: TGedFrame.h:53
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:56
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:867
void SetStripDecimals(Bool_t strip=kTRUE)
Set option to strip decimals when drawing axis labels.
Definition: TStyle.cxx:1668
virtual Int_t GetLogz() const =0
virtual Int_t GetLogy() const =0
virtual Int_t GetLogx() const =0
TText * text