Logo ROOT   6.08/07
Reference Guide
TAttTextEditor.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_TGedTextEditor
13 #define ROOT_TGedTextEditor
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TAttTextEditor //
18 // //
19 // Implements GUI for editing text attributes. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #ifndef ROOT_TGedFrame
24 #include "TGedFrame.h"
25 #endif
26 
27 #include "TGSlider.h"
28 
29 class TGComboBox;
30 class TGFontTypeComboBox;
31 class TGColorSelect;
32 class TAttText;
33 class TGNumberEntryField;
34 
35 class TAttTextEditor : public TGedFrame {
36 
37 protected:
38  TAttText *fAttText; // text attribute object
39  TGFontTypeComboBox *fTypeCombo; // font style combo box
40  TGComboBox *fSizeCombo; // font size combo box
41  TGComboBox *fAlignCombo; // font aligh combo box
42  TGColorSelect *fColorSelect; // color selection widget
43  TGHSlider *fAlpha; // fill opacity
45 
46  void ConnectSignals2Slots();
47 
48  static TGComboBox *BuildFontSizeComboBox(TGFrame *parent, Int_t id);
49  static TGComboBox *BuildTextAlignComboBox(TGFrame *parent, Int_t id);
50 
51 public:
52  TAttTextEditor(const TGWindow *p = 0,
53  Int_t width = 140, Int_t height = 30,
54  UInt_t options = kChildFrame,
56  virtual ~TAttTextEditor();
57 
58  virtual void SetModel(TObject* obj);
59  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
60  virtual void DoTextAlphaColor(ULong_t p);
61  virtual void DoAlpha();
62  virtual void DoAlphaField();
63  virtual void DoLiveAlpha(Int_t a);
64  virtual void GetCurAlpha();
65  virtual void DoTextColor(Pixel_t color);
66 
67  ClassDef(TAttTextEditor,0) //GUI for editing text attributes
68 };
69 
70 #endif
virtual void DoTextColor(Pixel_t color)
Slot connected to the marker color.
static TGComboBox * BuildFontSizeComboBox(TGFrame *parent, Int_t id)
Create text size combo box.
TAttText * fAttText
virtual void DoAlphaField()
Slot to set the alpha value from the entry field.
virtual void SetModel(TObject *obj)
Pick up the values of used text attributes.
void ConnectSignals2Slots()
Connect signals to slots.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TArc * a
Definition: textangle.C:12
TGNumberEntryField * fAlphaField
virtual void GetCurAlpha()
Slot to update alpha value on click on Slider.
TGColorSelect * fColorSelect
#define ClassDef(name, id)
Definition: Rtypes.h:254
TGFontTypeComboBox * fTypeCombo
ULong_t Pixel_t
Definition: GuiTypes.h:41
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
virtual void DoTextAlphaColor(ULong_t p)
Slot connected to the color with alpha.
static TGComboBox * BuildTextAlignComboBox(TGFrame *parent, Int_t id)
Create text align combo box.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process message.
TGHSlider * fAlpha
Text Attributes class.
Definition: TAttText.h:24
unsigned int UInt_t
Definition: RtypesCore.h:42
long Long_t
Definition: RtypesCore.h:50
virtual void DoAlpha()
Slot to set the alpha value.
unsigned long ULong_t
Definition: RtypesCore.h:51
virtual void DoLiveAlpha(Int_t a)
Slot to set alpha value online.
TGComboBox * fSizeCombo
Mother of all ROOT objects.
Definition: TObject.h:37
TAttTextEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor of text attributes GUI.
TGComboBox * fAlignCombo
virtual ~TAttTextEditor()
Destructor of text editor.