72 c->Connect(
"Selected(TVirtualPad*,TObject*,Int_t)",
"ROOT::Experimental::TGtk4GedEditor",
this,
73 "SetModel(TVirtualPad*,TObject*,Int_t)");
82 Disconnect(
fCanvas,
"Selected(TVirtualPad*,TObject*,Int_t)",
this,
"SetModel(TVirtualPad*,TObject*,Int_t)");
110 if (!
gROOT->GetListOfCleanups()->FindObject(
this))
111 gROOT->GetListOfCleanups()->Add(
this);
143 auto style_list = Gtk::StringList::create({
"None",
"Style 1",
"Style 2",
"Style 3",
"Style 4",
"Style 5",
"Style 6",
"Style 7",
"Style 8",
"Style 9"});
144 m_line_style = Gtk::make_managed<Gtk::DropDown>(style_list);
149 auto adjustment = Gtk::Adjustment::create( attline->
GetLineWidth(), 1, 20,
152 m_line_width = Gtk::make_managed<Gtk::SpinButton>(adjustment);
198 FillGed(base->GetClassPointer());
228 auto selected_color = btn->get_rgba();
230 selected_color.get_green(),
231 selected_color.get_blue(),
232 selected_color.get_alpha());
259 gPad->ModifiedUpdate();
266 gROOT->GetListOfCleanups()->Remove(
this);
277 }
else if (obj ==
fPad) {
Specialized dialog to enter arguments for method exection.
void clearAllElements()
clear all elements inside dialog main box
Gtk::ColorDialogButton * addColorInput(const char *title, int colindx)
add line with color button
void addLine(const char *txt, Gtk::Widget *widget)
Add single dialog line.
Gtk::Button * addOkCancelButtons()
Add Ok and Cancel buttons.
void FillDialogsElements()
Gtk::ColorDialogButton * m_marker_color
void AddTAttFill(TAttFill *)
Gtk4MethodDialog * fDialog
void SetCanvas(TCanvas *c)
Gtk::ColorDialogButton * m_fill_color
Gtk::DropDown * m_line_style
virtual ~TGtk4GedEditor()
Gtk::SpinButton * m_line_width
void DisconnectFromCanvas()
Disconnect this editor from the Selected signal of fCanvas.
void ConnectToCanvas(TCanvas *c)
Connect this editor to the Selected signal of canvas 'c'.
virtual void SetModel(TVirtualPad *pad, TObject *obj, Int_t event)
Activate object editors according to the selected object.
void on_ok_button_clicked()
void RecursiveRemove(TObject *obj) override
Recursively remove this object from a list.
TClass * IsA() const override
Int_t GetRootColor(Gtk::ColorDialogButton *btn)
void AddTAttLine(TAttLine *)
void AddTAttText(TAttText *)
Gtk::ColorDialogButton * m_text_color
Gtk::ColorDialogButton * m_line_color
void AddTAttMarker(TAttMarker *)
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual Color_t GetTextColor() const
Return the text color.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
Each class (see TClass) has a linked list of its base class(es).
TObject * GetClickSelected() const
TVirtualPad * GetClickSelectedPad() const
TVirtualPad * GetSelectedPad() const override
TClass instances represent classes, structs and namespaces in the ROOT type system.
void * DynamicCast(const TClass *base, void *obj, Bool_t up=kTRUE)
Cast obj of this class type up to baseclass cl if up is true.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
TMethod * GetMethodAny(const char *method)
Return pointer to method without looking at parameters.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Method or function calling interface.
void Execute(const char *, const char *, int *=nullptr) override
Execute method on this object with the given parameter string, e.g.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
virtual TClass * IsA() const
void ModifiedUpdate() override
Short cut to call Modified() and Update() in a single call.
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Namespace for ROOT features in testing.