10 #ifndef __KVLVCONTAINER_H
11 #define __KVLVCONTAINER_H
23 #include "KVNumberList.h"
24 #include "run_index_list.h"
26 #include <KVUnownedList.h>
65 std::cout <<
"Error in <KVLVColumnData::KVLVColumnData> : method " <<
fMethod.
Data()
66 <<
" is not valid for class " << cl->GetName() << std::endl;
160 UInt_t options = kSunkenFrame,
167 void Sort(
int column);
#define ClassDef(name, id)
#define ClassDefOverride(name, id)
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
Extension of TDatime to handle various useful date formats.
Utility class describing the data used to fill each column of the list view container.
TString fName
name used on button at top of column
virtual Bool_t IsBoolean() const
Int_t Compare_double(TObject *o1, TObject *o2)
TMethodCall fMethCall
method call object
const Char_t * GetDataString(TObject *)
Format string with column data for object.
Int_t fRetType
return type of data retrieval method
virtual void SetDataFormat(const Char_t *fmt)
KVDatime::EKVDateFormat fFmt
format for presenting date & time
Int_t Compare_date(TObject *o1, TObject *o2)
Int_t Compare(TObject *ob1, TObject *ob2)
TString fMethod
method used to retrieve data from objects
Int_t Compare_long(TObject *o1, TObject *o2)
TString fDataFormat
format for displaying numerical data
TString result
string used to store object data
KVLVColumnData(TClass *cl, const Char_t *name, const Char_t *method="")
Int_t Compare_string(TObject *o1, TObject *o2)
Bool_t fIsBoolean
kTRUE if column data is a boolean (i.e. 1 or 0, kTRUE or kFALSE)
virtual void SetIsDateTime(KVDatime::EKVDateFormat fmt=KVDatime::kCTIME, Bool_t with_reference=kTRUE)
Bool_t fDate
kTRUE if column contains TDatime date & time info
void GetData(TObject *, Long_t &)
virtual ~KVLVColumnData()
Bool_t fIsKVDatime
kTRUE if date & time is in KVDatime object, TDatime if not
virtual void SetIsBoolean(Bool_t isit=kTRUE)
Extension of TGLVContainer for KVListView widget.
KVSeqCollection * fPickOrderedObjects
list of currently selected objects, in order of selection
void ActivateItemWithData(void *userData, Bool_t activate=kTRUE)
void AllowDoubleClick(Bool_t on=kTRUE)
KVLVColumnData * fSortData
name of column (i.e. type of data) currently used to sort objects
virtual void FillList(const TCollection *=0)
void AddDataColumn(const char *columnName)
virtual void Display(const TCollection *=0)
void DoubleClickAction(TObject *)
void SelectAll() override
void SetNewColumnName(const char* columnName);
TObject * GetFirstInList()
Returns first object in currently displayed list.
Bool_t HandleButton(Event_t *event) override
Override TGContainer method in order to set fControlClick flag.
TContextMenu * fContextMenu
used to display popup context menu for items
KVSeqCollection * GetPickOrderedSelectedObjects() const
virtual ~KVLVContainer()
Destructor.
void OpenContextMenu(TGFrame *, Int_t, Int_t, Int_t)
Bool_t fUserDoubleClickAction
user-defined double-click action instead of Browse() override method
void ActivateItemWithColumnData(const Char_t *colname, const Char_t *data, Bool_t activate=kTRUE)
Bool_t fAllowContextMenu
can objects' context menu be opened with right-click ?
Int_t fNcols
number of data columns
void AllowBrowse(Bool_t on=kTRUE)
void DoDoubleClick(TGFrame *, Int_t, Int_t, Int_t)
Bool_t fUseObjLabelAsRealClass
if kTRUE, object's classname read from KVBase::GetLabel() (objects must be KVBase-derived!...
Bool_t fControlClick
set to kTRUE when user ctrl-clicks an item
void RemoveAll() override
TGLVEntry * FindItemWithColumnData(const Char_t *colname, const Char_t *data)
Bool_t fAllowDoubleClick
do something when object double-clicked ?
TCollection * GetUserItems()
TObject * GetLastSelectedObject() const
void ActivateItemsWithColumnData(const Char_t *colname, const KVNumberList &data, Bool_t activate=kTRUE)
void SetUseObjLabelAsRealClass(Bool_t on=kTRUE)
Bool_t fKeepUserItems
internal use only, do not clear list of user items in RemoveAll() override
KVLVColumnData ** fColData
description of column data
KVLVContainer(const TGWindow *p=0, UInt_t w=1, UInt_t h=1, UInt_t options=kSunkenFrame, Pixel_t back=GetDefaultFrameBackground())
TObject * GetLastInList()
Returns last object in currently displayed list.
KVUnownedList GetSelectedObjects()
virtual void SetDataColumns(Int_t ncols)
void AddContextMenuClassException(TClass *)
KVUnownedList GetSelectedItems()
Int_t fSortType
current sorting mode of contents (ascending or descending)
virtual KVLVColumnData * GetDataColumn(Int_t index) const
void AllowContextMenu(Bool_t on=kTRUE)
virtual void SetDataColumn(Int_t index, TClass *cl, const Char_t *name, const Char_t *method="")
void SetObjClass(TClass *cN)
void AddFrame(TGFrame *f, TGLayoutHints *l=0) override
Add an item to the list.
KVUnownedList fUserItems
list of currently displayed items, used by Refresh()
void Sort(int column)
Sort objects in container according to contents of given column.
virtual void ActivateItemFromSelectAll(TGFrameElement *el)
Activate item.
TList * fContextMenuClassExceptions
list of classes for which we override value of fAllowContextMenu
void SetDoubleClickAction(const char *receiver_class, void *receiver, const char *slot)
TGLVEntry * FindItemWithData(void *userData)
Find item with fUserData == userData in container.
TGLVEntry * GetLastSelectedItem() const
Bool_t IsBeingSorted() const
Int_t * fSortDir
direction of sorting for each column
Bool_t fIsResized
used to resize columns exactly once
One item/line in a KVListView window.
Extension of TGFrameElement used by KVLVContainer.
Strings used to represent a set of ranges of values.
KaliVeda extensions to ROOT collection classes.
Extended TList class which does not own its objects by default.
const char * GetReturnTypeName() const
virtual TGFrame * GetLastActive() const
static Pixel_t GetDefaultFrameBackground()
void * GetUserData() const
static const EReturnType kLong
static const EReturnType kNone
void Init(const char *function, const char *params)
static const EReturnType kDouble
const char * Data() const
void Form(const char *fmt,...)
List of runfiles specified by run number and file index ,.