102 fColorSelect->Connect(
"ColorSelected(Pixel_t)",
"TAttLineEditor",
this,
"DoLineColor(Pixel_t)");
103 fColorSelect->Connect(
"AlphaColorSelected(ULong_t)",
"TAttLineEditor",
this,
"DoLineAlphaColor(ULong_t)");
104 fStyleCombo->Connect(
"Selected(Int_t)",
"TAttLineEditor",
this,
"DoLineStyle(Int_t)");
105 fWidthCombo->Connect(
"Selected(Int_t)",
"TAttLineEditor",
this,
"DoLineWidth(Int_t)");
106 fAlpha->Connect(
"Released()",
"TAttLineEditor",
this,
"DoAlpha()");
107 fAlpha->Connect(
"PositionChanged(Int_t)",
"TAttLineEditor",
this,
"DoLiveAlpha(Int_t)");
108 fAlphaField->Connect(
"ReturnPressed()",
"TAttLineEditor",
this,
"DoAlphaField()");
109 fAlpha->Connect(
"Pressed()",
"TAttLineEditor",
this,
"GetCurAlpha()");
120 if (!attline)
return;
142 fAlpha->SetPosition((
Int_t)(color->GetAlpha()*1000));
156 fAlpha->SetPosition((
Int_t)(tcolor->GetAlpha()*1000));
172 fAttLine->SetLineColor(color->GetNumber());
173 fAlpha->SetPosition((
Int_t)(color->GetAlpha()*1000));
198 if (graphLineWidth >= 0) {
199 fAttLine->SetLineWidth(graphLineWidth+width);
201 fAttLine->SetLineWidth(-(std::abs(graphLineWidth)+width));
247 if (color->GetAlpha() == 1.) {
264 fAlpha->SetPosition((
Int_t)(color->GetAlpha()*1000));
ULong_t Pixel_t
Pixel value.
int Int_t
Signed integer 4 bytes (int).
unsigned long ULongptr_t
Unsigned integer large enough to hold a pointer (platform-dependent).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
short Color_t
Color number (short).
float Float_t
Float 4 bytes (float).
void SetModel(TObject *obj) override
Pick up the used line attributes.
virtual void DoAlpha()
Slot to set the alpha value.
TGHSlider * fAlpha
fill opacity
virtual void DoLineColor(Pixel_t color)
Slot connected to the line color.
~TAttLineEditor() override
Destructor of line editor.
TAttLine * fAttLine
line attribute object
TAttLineEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor of line attributes GUI.
virtual void DoLineWidth(Int_t width)
Slot connected to the line width.
virtual void DoLineAlphaColor(ULongptr_t p)
Slot connected to the color with alpha.
virtual void GetCurAlpha()
Slot to update alpha value on click on Slider.
virtual void DoLineStyle(Int_t style)
Slot connected to the line style.
TGLineStyleComboBox * fStyleCombo
line style combo box
virtual void DoLiveAlpha(Int_t a)
Slot to set alpha value online.
TGColorSelect * fColorSelect
line color widget
TGNumberEntryField * fAlphaField
TGLineWidthComboBox * fWidthCombo
line width combo box
virtual void ConnectSignals2Slots()
Connect signals to slots.
virtual void DoAlphaField()
Slot to set the alpha value from the entry field.
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
static Int_t GetColorTransparent(Int_t color, Float_t a)
static Int_t GetColor(const char *hexcolor)
static ULong_t Number2Pixel(Int_t ci)
Like a checkbutton but instead of the check mark there is color area with a little down arrow.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
TGCompositeFrame(const TGCompositeFrame &)=delete
Concrete class for horizontal slider.
A composite frame that layout their children in horizontal way.
This class handles GUI labels.
virtual void Disable(Bool_t on=kTRUE)
This class describes layout hints used by the layout classes.
The TGLineStyleComboBox user callable and it creates a combobox for selecting the line style.
The TGLineWidthComboBox user callable and it creates a combobox for selecting the line width.
ROOT GUI Window base class.
TGedFrame(const TGedFrame &)=delete
Bool_t fInit
init flag for setting signals/slots
virtual void MakeTitle(const char *title)
Create attribute frame title.
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Int_t fPriority
location in GedEditor
Bool_t fAvoidSignal
flag for executing slots
Mother of all ROOT objects.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".