This macro gives an example of how to create a horizontal splitter.
public:
~MyMainFrame() override;
void DoSave();
};
void MyMainFrame::DoSave()
{
Printf(
"Save in progress...");
SaveSource("", "");
}
{
save->
Connect(
"Clicked()",
"MyMainFrame",
this,
"DoSave()");
save->
SetToolTipText(
"Click on the button to save the application as C++ macro");
SetWindowName("Horizontal Splitter");
SetWMSizeHints(300, 250, 600, 600, 0, 0);
MapSubwindows();
Resize(GetDefaultSize());
MapWindow();
}
MyMainFrame::~MyMainFrame()
{
Cleanup();
}
void MyMainFrame::CloseWindow()
{
delete this;
}
void splitterHorizontal()
{
new MyMainFrame(
gClient->GetRoot(), 300, 250);
}
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
#define ClassDefOverride(name, id)
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
The base class for composite widgets (menu bars, list boxes, etc.).
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
UInt_t GetDefaultWidth() const override
UInt_t GetDefaultHeight() const override
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
void SetFrame(TGFrame *frame, Bool_t above) override
Set frame to be resized.
A composite frame that layout their children in horizontal way.
This class handles GUI labels.
This class describes layout hints used by the layout classes.
Defines top level windows that interact with the system Window Manager.
virtual void CloseWindow()
Close and delete main frame.
Yield an action as soon as it is clicked.
A composite frame that layout their children in vertical way.
ROOT GUI Window base class.
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.