ROOT  6.06/09
Reference Guide
TTextEditor.h
Go to the documentation of this file.
1 // Author: Olivier Couet 22/12/2013
2 
3 /*************************************************************************
4  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 
12 //////////////////////////////////////////////////////////////////////////
13 // //
14 // TTextEditor //
15 // //
16 // Editor for changing TText's and TLatex's attributes. //
17 // //
18 //////////////////////////////////////////////////////////////////////////
19 
20 #ifndef ROOT_TTextEditor
21 #define ROOT_TTextEditor
22 #ifndef ROOT_TGedFrame
23 #include "TGedFrame.h"
24 #endif
25 
26 class TText;
27 class TGTextEntry;
28 class TGNumberEntry;
29 
30 class TTextEditor : public TGedFrame {
31 
32 private:
34 
35 protected:
36  TGTextEntry *fText; // Text
37  TGNumberEntry *fAngle; // Text's angle
38  TGNumberEntry *fSize; // Text's angle
39  TGNumberEntry *fXpos; // Text's X position
40  TGNumberEntry *fYpos; // Text's Y position
41 
42  void ConnectSignals2Slots();
43 
44 public:
45  TTextEditor(const TGWindow *p = 0,
46  Int_t width = 140, Int_t height = 30,
47  UInt_t options = kChildFrame,
49  ~TTextEditor();
50 
51  void SetModel(TObject *);
52 
53  void DoAngle();
54  void DoSize();
55  void DoText(const char*);
56  void DoXpos();
57  void DoYpos();
58 
59  ClassDef(TTextEditor,0) // text editor
60 };
61 
62 #endif // ROOT_TTextEditor
63 
void ConnectSignals2Slots()
Connect signals to slots.
int Int_t
Definition: RtypesCore.h:41
void DoText(const char *)
Slot for setting the text string.
void DoAngle()
Slot for setting the text Angle.
TText * fEditedText
Definition: TTextEditor.h:33
TGNumberEntry * fXpos
Definition: TTextEditor.h:39
ULong_t Pixel_t
Definition: GuiTypes.h:41
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
void SetModel(TObject *)
Set model.
Definition: TTextEditor.cxx:82
Base class for several text objects.
Definition: TText.h:42
ClassDef(TGedFrame, 0)
void DoYpos()
Slot for setting the text Y position.
unsigned int UInt_t
Definition: RtypesCore.h:42
void DoXpos()
Slot for setting the text X position.
TTextEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
TTextEditor constructor.
Definition: TTextEditor.cxx:18
TGNumberEntry * fAngle
Definition: TTextEditor.h:37
~TTextEditor()
TTextEditor destructor.
Definition: TTextEditor.cxx:74
Mother of all ROOT objects.
Definition: TObject.h:58
void DoSize()
Slot for setting the text Size.
TGNumberEntry * fYpos
Definition: TTextEditor.h:40
TGTextEntry * fText
Definition: TTextEditor.h:36
TGNumberEntry * fSize
Definition: TTextEditor.h:38