This macro gives an example of how to create a horizontal splitter.
public:
virtual ~MyMainFrame();
void DoSave();
};
void MyMainFrame::DoSave()
{
Printf(
"Save in progress...");
SaveSource("","");
}
{
3, 0, 0, 0));
3, 0, 0, 0));
3, 2, 2, 2));
save->
Connect(
"Clicked()",
"MyMainFrame",
this,
"DoSave()");
save->
SetToolTipText(
"Click on the button to save the application as C++ macro");
2, 0, 2, 2));
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);
}
#define ClassDef(name, id)
void Printf(const char *fmt,...)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void SetFrame(TGFrame *frame, Bool_t above)
Set frame to be resized.
virtual void CloseWindow()
Close and delete main frame.
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.