00001
00002
00003
00004
00005
00006 TGPack *hp = 0;
00007 TGPack *vp = 0;
00008
00009 TGTextButton* b = 0;
00010
00011 void pack()
00012 {
00013 TGMainFrame* mf = new TGMainFrame(0, 400, 300);
00014 mf->SetWindowName("Foo");
00015
00016 hp = new TGPack(mf, mf->GetWidth(), mf->GetHeight());
00017 hp->SetVertical(kFALSE);
00018
00019 b = new TGTextButton(hp, "Ailaaha"); hp->AddFrame(b);
00020
00021 vp = new TGPack(hp, hp->GetWidth(), hp->GetHeight());
00022 b = new TGTextButton(vp, "Blaaaaa"); vp->AddFrameWithWeight(b, 0, 5);
00023 b = new TGTextButton(vp, "Blooooo"); vp->AddFrameWithWeight(b, 0, 3);
00024 b = new TGTextButton(vp, "Bleeeee"); vp->AddFrameWithWeight(b, 0, 5);
00025 hp->AddFrame(vp, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
00026
00027 b = new TGTextButton(hp, "Cilnouk"); hp->AddFrame(b);
00028
00029 mf->AddFrame(hp, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
00030
00031 mf->Layout();
00032 mf->MapSubwindows();
00033 mf->MapWindow();
00034 }