Hello, i used ROOT GUI Builder to make a software. I want to keep the gui.cpp file as made by ROOT GUI Builder to allow following edits but I want to implement other part of the gui in another cpp file (slots, edit the UI)…
How can I access elements made inside gui() from the main() function in a compact way?
My first idea, that unfortunately requires a gui.cpp modification, is to modify the method in a class:
class gui{
public:
TGComboBox * S_com;
gui()
{
S_com = new TGComboBox(fHorizontalFrame709, -1, kHorizontalFrame | kSunkenFrame | kOwnBackground, ucolor);
}
keeping all elements as public so in the main i can replace gui();
to gui g;
and calling methods like g.S_com->AddEntry("asd", 0);
Isn’t possible to save the gui.cpp directly as a class? Is there a better way to access objects keeping name shorts?
Thanks