12 #ifndef ROOT_TTVLVContainer
13 #define ROOT_TTVLVContainer
36 class TGItemContext :
public TObject {
42 virtual ~TGItemContext() { }
43 void Associate(TTVLVEntry *item) { fItem = item; }
44 virtual void Delete(Option_t *) { }
45 void Draw(Option_t *option=
"");
46 void EditExpression();
50 void SetExpression(
const char *name=
"",
const char *alias=
"-empty-", Bool_t cut=kFALSE);
52 ClassDef(TGItemContext, 0)
56 class TTVLVEntry :
public TGLVEntry {
59 TTVLVContainer *fContainer;
65 TGItemContext *fContext;
68 Bool_t FullConverted();
71 TTVLVEntry(
const TGWindow *p,
72 const TGPicture *bigpic,
const TGPicture *smallpic,
73 TGString *name, TGString **subnames, EListViewMode ViewMode);
74 virtual ~TTVLVEntry();
75 const char *ConvertAliases();
76 void CopyItem(TTVLVEntry *dest);
77 const char *GetAlias() {
return fAlias.Data();}
78 TTVLVContainer *GetContainer() {
return fContainer;}
79 TGItemContext *GetContext() {
return fContext;}
80 const char *GetConvName() {
return fConvName;}
81 const char *GetTrueName() {
return fTrueName.Data();}
82 TGToolTip *GetTip() {
return fTip;}
83 virtual Bool_t HandleCrossing(Event_t *event);
85 Bool_t IsCut() {
return fIsCut;}
87 void SetCutType(Bool_t type=kFALSE);
88 void SetItemName(
const char* name);
89 void SetAlias(
const char* alias) {fAlias = alias;}
90 void SetExpression(
const char* name,
const char* alias, Bool_t cutType=kFALSE);
91 void SetTrueName(
const char* name) {fTrueName = name;}
92 void SetToolTipText(
const char *text, Long_t delayms = 1000);
93 void SetSmallPic(
const TGPicture *spic);
96 ClassDef(TTVLVEntry,0)
110 class TTVLVContainer :
public TGLVContainer {
112 friend class TGClient;
116 Cursor_t fDefaultCursor;
117 TGListView *fListView;
118 TTreeViewer *fViewer;
119 TList *fExpressionList;
121 TTVLVContainer(
const TGWindow *p, UInt_t w, UInt_t h, UInt_t options=kSunkenFrame);
122 virtual ~TTVLVContainer();
123 virtual void AddThisItem(TTVLVEntry *item)
124 { AddFrame(item, fItemLayout); item->SetColumns(fCpos, fJmode); }
127 TTVLVEntry *ExpressionItem(Int_t index);
128 TList *ExpressionList();
132 TTreeViewer *GetViewer() {
return fViewer;}
133 void SetListView(TGListView *lv) {fListView = lv;}
134 void SetViewer(TTreeViewer *viewer) {fViewer = viewer;}
135 void RemoveNonStatic();
136 const char *ScanList();
137 void SelectItem(
const char* name);
138 virtual Bool_t HandleButton(Event_t *event);
139 virtual Bool_t HandleMotion(Event_t *event);
141 ClassDef(TTVLVContainer,0)
156 class TGSelectBox :
public TGTransientFrame {
159 TTreeViewer *fViewer;
163 TGLabel *fLabelAlias;
164 TGTextEntry *fTeAlias;
166 TGLayoutHints *fLayout;
167 TGLayoutHints *fBLayout;
168 TGLayoutHints *fBLayout1;
169 TGHorizontalFrame *fBf;
171 TGTextButton *fCANCEL;
174 static TGSelectBox *fgInstance;
177 TGSelectBox(
const TGWindow *p,
const TGWindow *main, UInt_t w = 10, UInt_t h = 10);
178 virtual ~TGSelectBox();
179 virtual void CloseWindow();
180 TTVLVEntry *EditedEntry() {
return fEntry;}
182 void SetLabel(
const char* title);
183 void SetEntry(TTVLVEntry *entry);
185 void InsertText(
const char* text);
186 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
187 Bool_t ValidateAlias();
189 static TGSelectBox *GetInstance();
191 ClassDef(TGSelectBox,0)