112 fAlpha->
Connect(
"Released()",
"TAttTextEditor",
this,
"DoAlpha()");
113 fAlpha->
Connect(
"PositionChanged(Int_t)",
"TAttTextEditor",
this,
"DoLiveAlpha(Int_t)");
115 fAlpha->
Connect(
"Pressed()",
"TAttTextEditor",
this,
"GetCurAlpha()");
116 fColorSelect->
Connect(
"ColorSelected(Pixel_t)",
"TAttTextEditor",
this,
"DoTextColor(Pixel_t)");
117 fColorSelect->
Connect(
"AlphaColorSelected(ULong_t)",
"TAttTextEditor",
this,
"DoTextAlphaColor(ULong_t)");
127 if (!atttext)
return;
145 if (size > 50) size = 50;
146 if (size < 0) size = 0;
212 if (parm1 == kFONT_SIZE) {
226 }
else if (parm1 == kFONT_STYLE) {
230 }
else if (parm1 == kFONT_ALIGN) {
250 for (
int i = 1; i <= 50; i++) {
251 snprintf(a, 99,
"%d", i);
266 c->
AddEntry(
"21 Bottom, Middle", 21);
267 c->
AddEntry(
"31 Bottom, Right", 31);
269 c->
AddEntry(
"22 Middle, Middle", 22);
270 c->
AddEntry(
"32 Middle, Right", 32);
316 if (color->GetAlpha() == 1.) {
319 color->SetAlpha((
Float_t)a/1000);
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual Font_t GetTextFont() const
virtual void DoTextColor(Pixel_t color)
Slot connected to the marker color.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
static TGComboBox * BuildFontSizeComboBox(TGFrame *parent, Int_t id)
Create text size combo box.
virtual void SetRange(Int_t min, Int_t max)
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 SetColor(Pixel_t color, Bool_t emit=kTRUE)
Set color.
virtual Float_t GetTextSize() const
void ConnectSignals2Slots()
Connect signals to slots.
virtual Int_t YtoPixel(Double_t y) const =0
TGNumberEntryField * fAlphaField
virtual TVirtualPad * GetPad() const
virtual void GetCurAlpha()
Slot to update alpha value on click on Slider.
virtual TObject * GetModel() const
TGColorSelect * fColorSelect
virtual void SetTextFont(Font_t tfont=62)
virtual Short_t GetTextAlign() const
TGFontTypeComboBox * fTypeCombo
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 Color_t GetTextColor() const
virtual void Update()
Update the current pad when an attribute is changed via GUI.
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
TGCompositeFrame(const TGCompositeFrame &)
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual void SetTextAlign(Short_t align=11)
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
virtual Double_t AbsPixeltoY(Int_t py)=0
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process message.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
virtual Double_t GetY2() const =0
virtual Int_t GetPosition() const
ClassImp(TAttTextEditor) enum ETextWid
virtual void Disable(Bool_t on=kTRUE)
virtual void SetPosition(Int_t pos)
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb"...
virtual Double_t GetNumber() const
Get the numeric value (floating point representation).
virtual Double_t GetY1() const =0
static Int_t GetColorTransparent(Int_t color, Float_t a)
Static function: Returns the transparent color number corresponding to n.
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
virtual void DoAlpha()
Slot to set the alpha value.
void SetEnabled(Bool_t flag=kTRUE)
virtual void AddEntry(TGString *s, Int_t id)
virtual void SetEnabled(Bool_t flag=kTRUE)
The color creation and management class.
virtual void DoLiveAlpha(Int_t a)
Slot to set alpha value online.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Mother of all ROOT objects.
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.
virtual void SetNumber(Double_t val)
Set the numeric value (floating point representation).
virtual void SetTextColor(Color_t tcolor=1)
virtual void SetTextSize(Float_t tsize=1)
virtual void MakeTitle(const char *title)
Create attribute frame title.
virtual ~TAttTextEditor()
Destructor of text editor.