This macro gives an example of how to create a vertical splitter.
To run it do either:
.x splitterVertical.C
.x splitterVertical.C++
public:
virtual ~MyMainFrame();
void DoSave();
};
void MyMainFrame::DoSave()
{
Printf(
"Save in progress...");
SaveSource("","");
}
{
3, 0, 0, 0));
3, 0, 0, 0));
0, 0, 5, 10));
0, 0, 5, 10));
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("Vertical Splitter");
SetWMSizeHints(350, 200, 600, 400, 0, 0);
MapSubwindows();
Resize(GetDefaultSize());
MapWindow();
}
MyMainFrame::~MyMainFrame()
{
Cleanup();
}
void MyMainFrame::CloseWindow()
{
delete this;
}
void splitterVertical()
{
new MyMainFrame(
gClient->GetRoot(), 350, 200);
}
#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 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.
- Author
- Ilka Antcheva 1/12/2006
Definition in file splitterVertical.C.