27 kTI_TEVARS, kTI_TECUTS
35 TTreeInput::TTreeInput(
const TGWindow *p,
const TGWindow *main,
36 char *strvars,
char *strcuts):
37 TGTransientFrame(p, main, 10, 10, kVerticalFrame),
45 SetCleanup(kDeepCleanup);
47 TGLabel *label =
new TGLabel(
this,
"Selected Variables: ");
48 AddFrame(label,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));
50 TGTextBuffer *tbuf =
new TGTextBuffer(256);
51 fTEVars =
new TGTextEntry(
this, tbuf, kTI_TEVARS);
52 fTEVars->Resize(260, fTEVars->GetDefaultHeight());
53 AddFrame(fTEVars,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5));
55 label =
new TGLabel(
this,
"Selected Cuts: ");
56 AddFrame(label,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));
58 tbuf =
new TGTextBuffer(256);
59 fTECuts =
new TGTextEntry(
this, tbuf, kTI_TECUTS);
60 fTECuts->Resize(260, fTECuts->GetDefaultHeight());
61 AddFrame(fTECuts,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5));
64 TGHorizontalFrame *hf =
new TGHorizontalFrame(
this, 60, 20, kFixedWidth);
65 hf->SetCleanup(kDeepCleanup);
68 UInt_t width = 0, height = 0;
70 fOk =
new TGTextButton(hf,
"&Ok", 1);
72 hf->AddFrame(fOk,
new TGLayoutHints(kLHintsCenterY | kLHintsExpandX, 5, 5, 0, 0));
73 height = fOk->GetDefaultHeight();
74 width = TMath::Max(width, fOk->GetDefaultWidth());
76 fCancel =
new TGTextButton(hf,
"&Cancel", 2);
77 fCancel->Associate(
this);
78 hf->AddFrame(fCancel,
new TGLayoutHints(kLHintsCenterY | kLHintsExpandX, 5, 5, 0, 0));
79 height = fCancel->GetDefaultHeight();
80 width = TMath::Max(width, fCancel->GetDefaultWidth());
83 AddFrame(hf,
new TGLayoutHints(kLHintsBottom | kLHintsCenterX, 0, 0, 5, 5));
86 hf->Resize((width + 20) * 2, height);
89 SetWindowName(
"Get Input");
94 width = GetDefaultWidth();
95 height = GetDefaultHeight();
97 Resize(width, height);
103 SetWMSize(width, height);
104 SetWMSizeHints(width, height, width, height, 0, 0);
106 SetMWMHints(kMWMDecorAll | kMWMDecorResizeH | kMWMDecorMaximize |
107 kMWMDecorMinimize | kMWMDecorMenu,
108 kMWMFuncAll | kMWMFuncResize | kMWMFuncMaximize |
116 gClient->WaitFor(
this);
122 TTreeInput::~TTreeInput()
130 Bool_t TTreeInput::ProcessMessage(Long_t msg, Long_t parm1, Long_t)
132 switch (GET_MSG(msg)) {
134 switch (GET_SUBMSG(msg)) {
141 strlcpy(fStrvars, fTEVars->GetBuffer()->GetString(), 256);
142 strlcpy(fStrcuts, fTECuts->GetBuffer()->GetString(), 256);
157 switch (GET_SUBMSG(msg)) {
162 strlcpy(fStrvars, fTEVars->GetBuffer()->GetString(), 256);
163 strlcpy(fStrcuts, fTECuts->GetBuffer()->GetString(), 256);
167 if ( parm1 == kTI_TEVARS )
169 else if ( parm1 == kTI_TECUTS )