Logo ROOT   6.14/05
Reference Guide
TAxisEditor.h
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 #ifndef ROOT_TAxisEditor
13 #define ROOT_TAxisEditor
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TAxisEditor //
18 // //
19 // Implements GUI for axis attributes. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #include "TGedFrame.h"
24 
25 class TAxis;
26 class TGLabel;
27 class TGComboBox;
28 class TGNumberEntry;
29 class TGTextEntry;
30 class TGCheckButton;
31 class TGColorSelect;
32 class TGFontTypeComboBox;
33 
34 
35 class TAxisEditor : public TGedFrame {
36 
37 protected:
38  TAxis *fAxis; // axis object
39  TGColorSelect *fAxisColor; // color selection widget
40  TGCheckButton *fLogAxis; // logarithmic check box
41  TGNumberEntry *fTickLength; // tick length number entry
42  TGNumberEntry *fDiv1; // primary axis division number entry
43  TGNumberEntry *fDiv2; // secondary axis division number entry
44  TGNumberEntry *fDiv3; // tertiary axis division number entry
45  TGCheckButton *fOptimize; // tick optimization check box
46  TGCheckButton *fTicksBoth; // check box setting ticks on both axis sides
47  TGCheckButton *fMoreLog; // more logarithmic labels check box
48  Int_t fTicksFlag; // positive/negative ticks' flag
49  TGTextEntry *fTitle; // axis title input field
50  TGColorSelect *fTitleColor; // color selection widget
51  TGFontTypeComboBox *fTitleFont; // title font combo box
52  Int_t fTitlePrec; // font precision level
53  TGNumberEntry *fTitleSize; // title size number entry
54  TGNumberEntry *fTitleOffset; // title offset number entry
55  TGCheckButton *fCentered; // check button for centered title
56  TGCheckButton *fRotated; // check button for rotated title
57  TGColorSelect *fLabelColor; // color selection widget
58  TGFontTypeComboBox *fLabelFont; // label font combo box
59  Int_t fLabelPrec; // font precision level
60  TGNumberEntry *fLabelSize; // label size number entry
61  TGNumberEntry *fLabelOffset; // label offset number entry
62  TGCheckButton *fNoExponent; // check box for No exponent choice
63  TGCheckButton *fDecimal; // decimal part check box
64 
65  virtual void ConnectSignals2Slots();
66 
67 public:
68  TAxisEditor(const TGWindow *p = 0,
69  Int_t width = 140, Int_t height = 30,
70  UInt_t options = kChildFrame,
72  virtual ~TAxisEditor();
73  virtual void SetModel(TObject* obj);
74  // slots related to axis attributes
75  virtual void DoTickLength();
76  virtual void DoAxisColor(Pixel_t color);
77  virtual void DoTicks();
78  virtual void DoDivisions();
79  virtual void DoLogAxis();
80  virtual void DoMoreLog();
81  // slots related to axis title attributes
82  virtual void DoTitleColor(Pixel_t color);
83  virtual void DoTitle(const char *text);
84  virtual void DoTitleSize();
85  virtual void DoTitleFont(Int_t font);
86  virtual void DoTitleOffset();
87  virtual void DoTitleCentered();
88  virtual void DoTitleRotated();
89  // slots related to axis labels attributes
90  virtual void DoLabelColor(Pixel_t color);
91  virtual void DoLabelSize();
92  virtual void DoLabelFont(Int_t font);
93  virtual void DoLabelOffset();
94  virtual void DoNoExponent();
95  virtual void DoDecimal(Bool_t on);
96 
97  ClassDef(TAxisEditor,0) // axis editor
98 };
99 
100 #endif
virtual void DoLabelOffset()
Slot connected to the label offset.
virtual void DoTicks()
Slot connected to the ticks draw settings.
virtual void DoTickLength()
Slot connected to the tick length settings.
virtual void DoMoreLog()
Slot connected to more Log labels flag.
TGCheckButton * fNoExponent
Definition: TAxisEditor.h:62
TGFontTypeComboBox * fTitleFont
Definition: TAxisEditor.h:51
TGNumberEntry * fDiv1
Definition: TAxisEditor.h:42
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
TGCheckButton * fRotated
Definition: TAxisEditor.h:56
virtual void DoTitleCentered()
Slot connected to centered title option.
TGColorSelect * fLabelColor
Definition: TAxisEditor.h:57
virtual void DoTitle(const char *text)
Slot connected to the axis color.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void DoLogAxis()
Slot for Log scale setting.
virtual void ConnectSignals2Slots()
Connect signals to slots.
virtual void SetModel(TObject *obj)
Pick up the used values of axis attributes.
TGCheckButton * fDecimal
Definition: TAxisEditor.h:63
TGNumberEntry * fTickLength
Definition: TAxisEditor.h:41
Int_t fLabelPrec
Definition: TAxisEditor.h:59
virtual void DoLabelFont(Int_t font)
Slot connected to the label font.
#define ClassDef(name, id)
Definition: Rtypes.h:320
ULong_t Pixel_t
Definition: GuiTypes.h:39
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
TGCheckButton * fOptimize
Definition: TAxisEditor.h:45
TGNumberEntry * fDiv3
Definition: TAxisEditor.h:44
TGTextEntry * fTitle
Definition: TAxisEditor.h:49
virtual void DoTitleColor(Pixel_t color)
Slot connected to the title color.
TGNumberEntry * fTitleSize
Definition: TAxisEditor.h:53
TGColorSelect * fTitleColor
Definition: TAxisEditor.h:50
TGFontTypeComboBox * fLabelFont
Definition: TAxisEditor.h:58
Int_t fTitlePrec
Definition: TAxisEditor.h:52
virtual void DoLabelSize()
Slot connected to the label size.
TGCheckButton * fMoreLog
Definition: TAxisEditor.h:47
virtual void DoTitleOffset()
Slot connected to the title offset.
TGColorSelect * fAxisColor
Definition: TAxisEditor.h:39
Class to manage histogram axis.
Definition: TAxis.h:30
TGCheckButton * fTicksBoth
Definition: TAxisEditor.h:46
virtual void DoDivisions()
Slot connected to the number of divisions.
unsigned int UInt_t
Definition: RtypesCore.h:42
TGNumberEntry * fTitleOffset
Definition: TAxisEditor.h:54
virtual void DoTitleFont(Int_t font)
Slot connected to the title font.
TGNumberEntry * fDiv2
Definition: TAxisEditor.h:43
virtual void DoTitleRotated()
Slot connected to the title rotation.
virtual ~TAxisEditor()
Destructor of axis editor.
TGNumberEntry * fLabelSize
Definition: TAxisEditor.h:60
TText * text
virtual void DoLabelColor(Pixel_t color)
Slot connected to the label color.
Int_t fTicksFlag
Definition: TAxisEditor.h:48
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void DoAxisColor(Pixel_t color)
Slot connected to the axis color.
TGCheckButton * fLogAxis
Definition: TAxisEditor.h:40
TAxis * fAxis
Definition: TAxisEditor.h:38
TGCheckButton * fCentered
Definition: TAxisEditor.h:55
virtual void DoNoExponent()
Slot connected to the labels' exponent flag.
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
TGNumberEntry * fLabelOffset
Definition: TAxisEditor.h:61
virtual void DoDecimal(Bool_t on)
Slot connected to the decimal part setting.
virtual void DoTitleSize()
Slot connected to the title font size.