Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 #include "TGedFrame.h"
23 
24 class TText;
25 class TGTextEntry;
26 class TGNumberEntry;
27 
28 class TTextEditor : public TGedFrame {
29 
30 private:
31  TText *fEditedText;
32 
33 protected:
34  TGTextEntry *fText; // Text
35  TGNumberEntry *fAngle; // Text's angle
36  TGNumberEntry *fSize; // Text's angle
37  TGNumberEntry *fXpos; // Text's X position
38  TGNumberEntry *fYpos; // Text's Y position
39 
40  void ConnectSignals2Slots();
41 
42 public:
43  TTextEditor(const TGWindow *p = 0,
44  Int_t width = 140, Int_t height = 30,
45  UInt_t options = kChildFrame,
46  Pixel_t back = GetDefaultFrameBackground());
47  ~TTextEditor();
48 
49  void SetModel(TObject *);
50 
51  void DoAngle();
52  void DoSize();
53  void DoText(const char*);
54  void DoXpos();
55  void DoYpos();
56 
57  ClassDef(TTextEditor,0) // text editor
58 };
59 
60 #endif // ROOT_TTextEditor
61