Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 #include "TGedFrame.h"
24 
25 #include "TGSlider.h"
26 
27 class TGComboBox;
28 class TGFontTypeComboBox;
29 class TGColorSelect;
30 class TAttText;
31 class TGNumberEntryField;
32 
33 class TAttTextEditor : public TGedFrame {
34 
35 protected:
36  TAttText *fAttText; // text attribute object
37  TGFontTypeComboBox *fTypeCombo; // font style combo box
38  TGComboBox *fSizeCombo; // font size combo box
39  TGComboBox *fAlignCombo; // font aligh combo box
40  TGColorSelect *fColorSelect; // color selection widget
41  TGHSlider *fAlpha; // fill opacity
42  TGNumberEntryField *fAlphaField;
43 
44  void ConnectSignals2Slots();
45 
46  static TGComboBox *BuildFontSizeComboBox(TGFrame *parent, Int_t id);
47  static TGComboBox *BuildTextAlignComboBox(TGFrame *parent, Int_t id);
48 
49 public:
50  TAttTextEditor(const TGWindow *p = 0,
51  Int_t width = 140, Int_t height = 30,
52  UInt_t options = kChildFrame,
53  Pixel_t back = GetDefaultFrameBackground());
54  virtual ~TAttTextEditor();
55 
56  virtual void SetModel(TObject* obj);
57  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
58  virtual void DoTextAlphaColor(ULong_t p);
59  virtual void DoAlpha();
60  virtual void DoAlphaField();
61  virtual void DoLiveAlpha(Int_t a);
62  virtual void GetCurAlpha();
63  virtual void DoTextColor(Pixel_t color);
64 
65  ClassDef(TAttTextEditor,0) //GUI for editing text attributes
66 };
67 
68 #endif