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