32 : TGMainFrame(win,800,800),
40 const UInt_t max_size = 800;
46 TGCompositeFrame *
table =
new TGCompositeFrame(
this,350,350,kSunkenFrame);
49 TGTableLayout* tlo =
new TGTableLayout(
table, 10, 6);
51 table->SetLayoutManager(tlo);
52 TGLayoutHints* loh =
new TGLayoutHints(kLHintsTop|kLHintsLeft|
53 kLHintsExpandX|kLHintsExpandY);
56 TGTableLayoutHints* tloh;
60 new TRootEmbeddedCanvas(
"Shapes",
table,max_size,max_size);
61 tloh =
new TGTableLayoutHints(2,5,2,6,
62 kLHintsExpandX|kLHintsExpandY |
63 kLHintsShrinkX|kLHintsShrinkY |
64 kLHintsFillX|kLHintsFillY);
70 fHSlider =
new TGDoubleHSlider(
table,max_size,kDoubleScaleBoth,100,
71 kHorizontalFrame,GetDefaultFrameBackground(),
74 tloh =
new TGTableLayoutHints(2,5,0,1,
75 kLHintsExpandX|kLHintsShrinkX|kLHintsFillX);
77 fHSlider->Connect(
"PositionChanged()",
"Viewer",
this,
"DoSlider()");
79 fVSlider =
new TGDoubleVSlider(
table,max_size,kDoubleScaleBoth,200,
80 kVerticalFrame,GetDefaultFrameBackground(),
82 Float_t RangeMin=-1100.; Float_t RangeMax=1100.;
83 fVSlider->SetRange(RangeMin, RangeMax);
84 fHSlider->SetRange(RangeMin, RangeMax);
85 tloh =
new TGTableLayoutHints(0,1,2,6,
86 kLHintsExpandY|kLHintsShrinkY|kLHintsFillY);
88 fVSlider->Connect(
"PositionChanged()",
"Viewer",
this,
"DoSlider()");
92 new TRootEmbeddedCanvas(
"H Scale",
table,max_size,50);
93 tloh =
new TGTableLayoutHints(2,5,1,2,
94 kLHintsExpandX|kLHintsShrinkX|kLHintsFillX);
99 fHScale =
new TGaxis(0.0,0.5, 1.0,0.5, 0.0,100.0, 510,
"-");
106 new TRootEmbeddedCanvas(
"V Scale",
table,50,max_size);
107 tloh =
new TGTableLayoutHints(1,2,2,6,
108 kLHintsExpandY|kLHintsShrinkY|kLHintsFillY);
113 fVScale =
new TGaxis(0.5,0.0, 0.50001,1.0, 0.0,100.0, 510,
"-");
123 const char* shape_button_name[] = {
124 "Barrel",
"EndCap",
"",
"",
"Zoom Out",
"Zoom In",
"Close"
128 TGTextButton* button =
129 new TGTextButton(
table,shape_button_name[
ind],
ind);
130 tloh =
new TGTableLayoutHints(5,6,
ind+2,
ind+1+2,
131 kLHintsExpandX|kLHintsExpandY |
132 kLHintsShrinkX|kLHintsShrinkY |
133 kLHintsFillX|kLHintsFillY);
134 table->AddFrame(button,tloh);
135 button->Resize(100,button->GetDefaultHeight());
136 button->Connect(
"Clicked()",
"Viewer",
this,
"DoButton()");
139 const char* ctrl_button_name[2][3] = {{
"Prev",
"Next",
""},
140 {
"Create EPS File" ,
"Create PNG File",
"Reset View" }};
145 for (indx = 0; indx < 3; ++indx) {
146 for (indy = 0; indy < 2; ++indy) {
148 TGTextButton* button =
new TGTextButton(
table,
149 ctrl_button_name[indy][indx],
150 (indy+1)*10 + indx +1);
151 tloh =
new TGTableLayoutHints(indx+2,indx+1+2, 6+indy,6+indy+1,
152 kLHintsExpandX|kLHintsExpandY |
153 kLHintsShrinkX|kLHintsShrinkY |
154 kLHintsFillX|kLHintsFillY);
155 table->AddFrame(button,tloh);
156 button->Resize(100,button->GetDefaultHeight());
157 button->Connect(
"Clicked()",
"Viewer",
this,
"DoButton()");
164 TGGroupFrame *fG2 =
new TGGroupFrame(
table,
new TGString(
"DisplayMode"),kVerticalFrame|kRaisedFrame);
166 TGLayoutHints* fL4 =
new TGLayoutHints(kLHintsTop | kLHintsLeft,
175 for (
int i = 0;
i < 2; ++
i) {
182 TGTableLayoutHints* RadioFrameLayoutHint =
new TGTableLayoutHints(3,4, 9, 10,
183 kLHintsExpandX|kLHintsExpandY |
184 kLHintsShrinkX|kLHintsShrinkY |
185 kLHintsFillX|kLHintsFillY);
187 table->AddFrame(fG2, RadioFrameLayoutHint);
190 TGGroupFrame *fCheckGroup =
new TGGroupFrame(
table,
new TGString(
"Options"),kVerticalFrame|kRaisedFrame);
192 TGLayoutHints* CheckButtonsLayoutHint =
new TGLayoutHints(kLHintsTop | kLHintsLeft,
194 TGCheckButton* checkEqualScaling =
new TGCheckButton(fCheckGroup,
new TGHotString(
"equal scaling along axis"), 21);
195 checkEqualScaling->SetState(kButtonUp);
196 TGCheckButton* checkAssgnProbs =
new TGCheckButton(fCheckGroup,
new TGHotString(
"show assgn probs for DAF tracks"), 22);
197 checkAssgnProbs->SetState(kButtonUp);
199 fCheckGroup->AddFrame(checkEqualScaling, CheckButtonsLayoutHint);
200 checkEqualScaling->Connect(
"Clicked()",
"Viewer",
this,
"DoCheckButton()");
201 fCheckGroup->AddFrame(checkAssgnProbs, CheckButtonsLayoutHint);
202 checkAssgnProbs->Connect(
"Clicked()",
"Viewer",
this,
"DoCheckButton()");
204 TGTableLayoutHints* CheckFrameLayoutHint =
new TGTableLayoutHints(4,5, 9, 10,
205 kLHintsExpandX|kLHintsExpandY |
206 kLHintsShrinkX|kLHintsShrinkY |
207 kLHintsFillX|kLHintsFillY);
208 table->AddFrame(fCheckGroup, CheckFrameLayoutHint);
213 Connect(
"CloseWindow()",
"TApplication",gApplication,
"Terminate(=0)");