This macro gives an example of different buttons' layout.
To run it do either:
.x buttonsLayout.C
.x buttonsLayout.C++
private:
public:
~MyMainFrame() override;
};
{
gClient->GetColorByName(
"yellow", yellow);
help->ChangeBackground(yellow);
exit =
new TGTextButton(cframe2,
"&Exit ",
"gApplication->Terminate(0)");
SetWindowName("Buttons' Layout");
SetWMSizeHints(200, 80, 320, 320, 1, 1);
MapSubwindows();
Resize(GetDefaultSize());
MapWindow();
}
MyMainFrame::~MyMainFrame()
{
Cleanup();
}
void buttonsLayout()
{
new MyMainFrame(
gClient->GetRoot(), 350, 80);
}
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
#define ClassDef(name, id)
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.
This class describes layout hints used by the layout classes.
Defines top level windows that interact with the system Window Manager.
Yield an action as soon as it is clicked.
A composite frame that layout their children in vertical way.
ROOT GUI Window base class.
- Author
- Ilka Antcheva 1/12/2006
Definition in file buttonsLayout.C.