Logo ROOT  
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
25class TAxis;
26class TGLabel;
27class TGComboBox;
28class TGNumberEntry;
29class TGTextEntry;
30class TGCheckButton;
31class TGColorSelect;
33
34
35class TAxisEditor : public TGedFrame {
36
37protected:
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
67public:
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
@ kChildFrame
Definition: GuiTypes.h:379
ULong_t Pixel_t
Definition: GuiTypes.h:39
#define ClassDef(name, id)
Definition: Rtypes.h:322
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
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
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:667
Mother of all ROOT objects.
Definition: TObject.h:37
TText * text