Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:31

0001 // @(#)root/ged:$Id$
0002 // Author: Ilka  Antcheva 11/05/04
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TAttTextEditor
0013 #define ROOT_TAttTextEditor
0014 
0015 
0016 #include "TGedFrame.h"
0017 
0018 class TGComboBox;
0019 class TGFontTypeComboBox;
0020 class TGColorSelect;
0021 class TAttText;
0022 class TGNumberEntryField;
0023 
0024 class TAttTextEditor : public TGedFrame {
0025 
0026 protected:
0027    TAttText            *fAttText;         ///< text attribute object
0028    TGFontTypeComboBox  *fTypeCombo;       ///< font style combo box
0029    TGComboBox          *fSizeCombo;       ///< font size combo box
0030    TGComboBox          *fAlignCombo;      ///< font aligh combo box
0031    TGColorSelect       *fColorSelect;     ///< color selection widget
0032    TGHSlider           *fAlpha;           ///< fill opacity
0033    TGNumberEntryField  *fAlphaField;
0034 
0035    void             ConnectSignals2Slots();
0036 
0037    static  TGComboBox *BuildFontSizeComboBox(TGFrame *parent, Int_t id);
0038    static  TGComboBox *BuildTextAlignComboBox(TGFrame *parent, Int_t id);
0039 
0040 public:
0041    TAttTextEditor(const TGWindow *p = nullptr,
0042                   Int_t width = 140, Int_t height = 30,
0043                   UInt_t options = kChildFrame,
0044                   Pixel_t back = GetDefaultFrameBackground());
0045    ~TAttTextEditor() override;
0046 
0047    void     SetModel(TObject* obj) override;
0048    Bool_t   ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override;
0049    virtual void     DoTextAlphaColor(ULongptr_t p);
0050    virtual void     DoAlpha();
0051    virtual void     DoAlphaField();
0052    virtual void     DoLiveAlpha(Int_t a);
0053    virtual void     GetCurAlpha();
0054    virtual void     DoTextColor(Pixel_t color);
0055 
0056    ClassDefOverride(TAttTextEditor,0)  //GUI for editing text attributes
0057 };
0058 
0059 #endif