KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVListView.h
1/*
2$Id: KVListView.h,v 1.5 2009/04/28 09:11:29 franklan Exp $
3$Revision: 1.5 $
4$Date: 2009/04/28 09:11:29 $
5*/
6
9
10#ifndef __KVLISTVIEW_H
11#define __KVLISTVIEW_H
12
13#include "TGListView.h"
14#include "KVLVContainer.h"
15#include "KVLVContainer.h"
16#include "KVNumberList.h"
17
146class KVListView : public TGListView {
147protected:
152
153public:
154 KVListView(TClass* obj_class, const TGWindow* p, UInt_t w, UInt_t h,
155 UInt_t options = kSunkenFrame | kDoubleBorder,
157 virtual ~KVListView() {}
158
159 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
160 virtual void ActivateSortButtons(); // *MENU*
161 virtual void SetMaxColumnSize(UInt_t width)
162 {
164 }
165 virtual void SetDataColumns(Int_t ncolumns);
166 virtual void SetDataColumn(Int_t index, const Char_t* name, const Char_t* method = "",
167 Int_t mode = kTextCenterX);
168 virtual KVLVColumnData* GetDataColumn(Int_t index) const
169 {
170 return ((KVLVContainer*)GetContainer())->GetDataColumn(index);
171 }
172
173 virtual void Display(const TCollection* l)
174 {
175 ((KVLVContainer*)GetContainer())->Display(l); // *MENU*
176 }
177 virtual void Sort(Int_t column)
178 {
181 }
182 virtual void SelectAll()
183 {
185 }
186 virtual void UnSelectAll()
187 {
189 }
190 virtual void RemoveAll()
191 {
193 }
194 virtual Int_t GetColumnNumber(const Char_t* colname);
196 {
197 return ((KVLVContainer*)GetContainer())->FindItemWithData(userData);
198 }
199 void ActivateItemWithData(void* userData, Bool_t activate = kTRUE)
200 {
201 ((KVLVContainer*)GetContainer())->ActivateItemWithData(userData, activate);
202 }
203 TGLVEntry* FindItemWithColumnData(const Char_t* colname, const Char_t* data)
204 {
205 return ((KVLVContainer*)GetContainer())->FindItemWithColumnData(colname, data);
206 }
208 {
209 return ((KVLVContainer*)GetContainer())->FindItemWithColumnData(colname, data);
210 }
212 {
213 return ((KVLVContainer*)GetContainer())->FindItemWithColumnData(colname, data);
214 }
215 void ActivateItemWithColumnData(const Char_t* colname, const Char_t* data, Bool_t activate = kTRUE)
216 {
218 }
219 void ActivateItemWithColumnData(const Char_t* colname, Long_t data, Bool_t activate = kTRUE)
220 {
222 }
223 void ActivateItemWithColumnData(const Char_t* colname, Double_t data, Bool_t activate = kTRUE)
224 {
226 }
227 void ActivateItemsWithColumnData(const Char_t* colname, KVNumberList data, Bool_t activate = kTRUE)
228 {
230 }
232 {
233 return ((KVLVContainer*)GetContainer())->GetLastSelectedObject();
234 }
236 {
237 return ((KVLVContainer*)GetContainer())->GetLastSelectedItem();
238 }
240 {
243 return ((KVLVContainer*)GetContainer())->GetSelectedItems();
244 }
246 {
249 return ((KVLVContainer*)GetContainer())->GetSelectedObjects();
250 }
252 {
255 return ((KVLVContainer*)GetContainer())->GetPickOrderedSelectedObjects();
256 }
258 {
260 return ((KVLVContainer*)GetContainer())->GetUserItems();
261 }
263 {
265 return ((KVLVContainer*)GetContainer())->GetFirstInList();
266 }
268 {
270 return ((KVLVContainer*)GetContainer())->GetLastInList();
271 }
272 void AllowDoubleClick(Bool_t on = kTRUE)
273 {
276 }
277 void SetDoubleClickAction(const char* receiver_class, void* receiver, const char* slot);
278 void AllowBrowse(Bool_t on = kTRUE)
279 {
282 }
283 void AllowContextMenu(Bool_t on = kTRUE)
284 {
287 }
289 virtual void SetDefaultColumnWidth(TGVFileSplitter* splitter);
290
292 {
293 ((TGLVContainer*)GetContainer())->SetMultipleSelection(yes);
294 }
296 {
297 return ((TGLVContainer*)GetContainer())->GetMultipleSelection();
298 }
299
300 void SetUseObjLabelAsRealClass(Bool_t yes = kTRUE);
301
303 {
304 return fObjClass;
305 };
307 {
308 fObjClass = cl;
310 }
311
312 ClassDef(KVListView, 0) //Slightly modified TGListView
313};
314
315#endif
int Int_t
unsigned int UInt_t
long Long_t
ULong_t Pixel_t
bool Bool_t
char Char_t
double Double_t
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t width
Utility class describing the data used to fill each column of the list view container.
Extension of TGLVContainer for KVListView widget.
Enhanced version of ROOT TGListView widget.
Definition KVListView.h:146
KVList * GetPickOrderedSelectedObjects() const
Definition KVListView.h:251
virtual void ActivateSortButtons()
virtual void SelectAll()
Definition KVListView.h:182
virtual void SetDataColumns(Int_t ncolumns)
virtual void Sort(Int_t column)
Definition KVListView.h:177
void SetDoubleClickAction(const char *receiver_class, void *receiver, const char *slot)
void ActivateItemWithColumnData(const Char_t *colname, Long_t data, Bool_t activate=kTRUE)
Definition KVListView.h:219
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle messages generated by the list view container.
void AllowBrowse(Bool_t on=kTRUE)
Definition KVListView.h:278
virtual void UnSelectAll()
Definition KVListView.h:186
virtual void Display(const TCollection *l)
Definition KVListView.h:173
virtual ~KVListView()
Definition KVListView.h:157
void SetObjClass(TClass *cl)
Definition KVListView.h:306
virtual void SetMaxColumnSize(UInt_t width)
Definition KVListView.h:161
TObject * GetLastInList() const
Definition KVListView.h:267
TCollection * GetUserItems()
Definition KVListView.h:257
TClass * GetObjClass() const
Definition KVListView.h:302
virtual void SetDefaultColumnWidth(TGVFileSplitter *splitter)
TGLVEntry * GetLastSelectedItem() const
Definition KVListView.h:235
void ActivateItemsWithColumnData(const Char_t *colname, KVNumberList data, Bool_t activate=kTRUE)
Definition KVListView.h:227
void ActivateItemWithColumnData(const Char_t *colname, Double_t data, Bool_t activate=kTRUE)
Definition KVListView.h:223
UInt_t fMaxColumnSize
maximum width of columns
Definition KVListView.h:150
void AddContextMenuClassException(TClass *)
virtual Int_t GetColumnNumber(const Char_t *colname)
TGLVEntry * FindItemWithColumnData(const Char_t *colname, Long_t data)
Definition KVListView.h:207
int nselected
number of selected items
Definition KVListView.h:148
TGLVEntry * FindItemWithData(void *userData)
Definition KVListView.h:195
void ActivateItemWithColumnData(const Char_t *colname, const Char_t *data, Bool_t activate=kTRUE)
Definition KVListView.h:215
TClass * fObjClass
class of objects in list
Definition KVListView.h:149
virtual void RemoveAll()
Definition KVListView.h:190
TContextMenu * fContextMenu
Definition KVListView.h:151
TObject * GetFirstInList() const
Definition KVListView.h:262
void AllowMultipleSelection(Bool_t yes=kTRUE)
Definition KVListView.h:291
void AllowDoubleClick(Bool_t on=kTRUE)
Definition KVListView.h:272
TObject * GetLastSelectedObject() const
Definition KVListView.h:231
void AllowContextMenu(Bool_t on=kTRUE)
Definition KVListView.h:283
TGLVEntry * FindItemWithColumnData(const Char_t *colname, const Char_t *data)
Definition KVListView.h:203
TList * GetSelectedItems() const
Definition KVListView.h:239
TGLVEntry * FindItemWithColumnData(const Char_t *colname, Double_t data)
Definition KVListView.h:211
Bool_t GetMultipleSelection() const
Definition KVListView.h:295
TList * GetSelectedObjects() const
Definition KVListView.h:245
virtual void SetDataColumn(Int_t index, const Char_t *name, const Char_t *method="", Int_t mode=kTextCenterX)
void ActivateItemWithData(void *userData, Bool_t activate=kTRUE)
Definition KVListView.h:199
void SetUseObjLabelAsRealClass(Bool_t yes=kTRUE)
virtual KVLVColumnData * GetDataColumn(Int_t index) const
Definition KVListView.h:168
Extended TList class which owns its objects by default.
Definition KVList.h:28
Strings used to represent a set of ranges of values.
TGFrame * GetContainer() const
static Pixel_t GetDefaultFrameBackground()
Column in an SQLite database.
TLine l