KaliVeda
Toolkit for HIC analysis
|
#include <KVLVContainer.h>
Private Member Functions | |
virtual void | ActivateItemFromSelectAll (TGFrameElement *el) |
Activate item. | |
void | default_init () |
void | DeleteColData () |
virtual void | FillList (const TCollection *=0) |
Private Attributes | |
Bool_t | fAllowContextMenu |
can objects' context menu be opened with right-click ? | |
Bool_t | fAllowDoubleClick |
do something when object double-clicked ? | |
KVLVColumnData ** | fColData |
description of column data | |
TContextMenu * | fContextMenu |
used to display popup context menu for items | |
TList * | fContextMenuClassExceptions |
list of classes for which we override value of fAllowContextMenu | |
Bool_t | fControlClick |
set to kTRUE when user ctrl-clicks an item | |
Bool_t | fIsResized |
used to resize columns exactly once | |
Bool_t | fKeepUserItems |
internal use only, do not clear list of user items in RemoveAll() | |
Int_t | fNcols |
number of data columns | |
TClass * | fObjClass |
KVList * | fPickOrderedObjects |
list of currently selected objects, in order of selection | |
Bool_t | fSort |
KVLVColumnData * | fSortData |
name of column (i.e. type of data) currently used to sort objects | |
Int_t * | fSortDir |
direction of sorting for each column | |
Int_t | fSortType |
current sorting mode of contents (ascending or descending) | |
Bool_t | fUseObjLabelAsRealClass |
if kTRUE, object's classname read from KVBase::GetLabel() (objects must be KVBase-derived!) | |
Bool_t | fUserDoubleClickAction |
user-defined double-click action instead of Browse() method | |
KVList * | fUserItems |
list of currently displayed items, used by Refresh() | |
Friends | |
class | KVLVEntry |
class | KVLVFrameElement |
Additional Inherited Members | |
Public Types inherited from TGWindow | |
enum | EEditMode |
enum | EStatusBits |
Public Types inherited from TObject | |
enum | EDeprecatedStatusBits |
enum | EStatusBits |
Static Public Member Functions inherited from TGLVContainer | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TGContainer | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TGCompositeFrame | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TGFrame | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static const TGGC & | GetBckgndGC () |
static const TGGC & | GetBlackGC () |
static Pixel_t | GetBlackPixel () |
static Pixel_t | GetDefaultFrameBackground () |
static Pixel_t | GetDefaultSelectedBackground () |
static const TGGC & | GetHilightGC () |
static const TGGC & | GetShadowGC () |
static const TGGC & | GetWhiteGC () |
static Pixel_t | GetWhitePixel () |
Static Public Member Functions inherited from TGWindow | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static Int_t | GetCounter () |
Static Public Member Functions inherited from TGObject | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TObject | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static Longptr_t | GetDtorOnly () |
static Bool_t | GetObjectStat () |
static void | SetDtorOnly (void *obj) |
static void | SetObjectStat (Bool_t stat) |
Static Public Member Functions inherited from TQObject | |
static Bool_t | AreAllSignalsBlocked () |
static Bool_t | BlockAllSignals (Bool_t b) |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static Bool_t | Connect (const char *sender_class, const char *signal, const char *receiver_class, void *receiver, const char *slot) |
static Bool_t | Connect (TQObject *sender, const char *signal, const char *receiver_class, void *receiver, const char *slot) |
static const char * | DeclFileName () |
static Bool_t | Disconnect (const char *class_name, const char *signal, void *receiver=nullptr, const char *slot=nullptr) |
static Bool_t | Disconnect (TQObject *sender, const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr) |
Public Attributes inherited from TGWindow | |
kEditDisable | |
kEditDisableBtnEnable | |
kEditDisableEvents | |
kEditDisableGrab | |
kEditDisableHeight | |
kEditDisableKeyEnable | |
kEditDisableLayout | |
kEditDisableResize | |
kEditDisableWidth | |
kEditEnable | |
kIsHtmlView | |
Public Attributes inherited from TObject | |
kBitMask | |
kCanDelete | |
kCannotPick | |
kHasUUID | |
kInconsistent | |
kInvalidObject | |
kIsOnHeap | |
kIsReferenced | |
kMustCleanup | |
kNoContextMenu | |
kNotDeleted | |
kObjInCanvas | |
kOverwrite | |
kSingleKey | |
kWriteDelete | |
kZombie | |
Protected Member Functions inherited from TGLVContainer | |
void | ActivateItem (TGFrameElement *el) override |
void | DeActivateItem (TGFrameElement *el) override |
Protected Member Functions inherited from TGContainer | |
void | DoRedraw () override |
virtual void | OnAutoScroll () |
virtual void | RepeatSearch () |
virtual void | SearchPattern () |
Protected Member Functions inherited from TGFrame | |
void | DoRedraw () override |
virtual void | Draw3dRectangle (UInt_t type, Int_t x, Int_t y, UInt_t w, UInt_t h) |
TString | GetOptionString () const |
const TGResourcePool * | GetResourcePool () const |
void * | GetSender () override |
virtual void | StartGuiBuilding (Bool_t on=kTRUE) |
Protected Member Functions inherited from TGWindow | |
TGWindow (const TGWindow &tgw) | |
TGWindow (Window_t id) | |
TGWindow & | operator= (const TGWindow &tgw) |
Protected Member Functions inherited from TGObject | |
TGObject & | operator= (const TGObject &tgo) |
Protected Member Functions inherited from TObject | |
virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
void | MakeZombie () |
Protected Member Functions inherited from TQObject | |
virtual const char * | GetSenderClassName () const |
Static Protected Member Functions inherited from TGContainer | |
static const TGGC & | GetLineGC () |
Static Protected Member Functions inherited from TGFrame | |
static Time_t | GetLastClick () |
Static Protected Member Functions inherited from TQObject | |
static Int_t | CheckConnectArgs (TQObject *sender, TClass *sender_class, const char *signal, TClass *receiver_class, const char *slot) |
static TString | CompressName (const char *method_name) |
static Bool_t | ConnectToClass (const char *sender_class, const char *signal, TClass *receiver_class, void *receiver, const char *slot) |
static Bool_t | ConnectToClass (TQObject *sender, const char *signal, TClass *receiver_class, void *receiver, const char *slot) |
Protected Attributes inherited from TGLVContainer | |
Int_t * | fCpos |
TGLayoutHints * | fItemLayout |
Int_t * | fJmode |
TGLVEntry * | fLastActive |
TGListView * | fListView |
Bool_t | fMultiSelect |
EListViewMode | fViewMode |
Protected Attributes inherited from TGContainer | |
Bool_t | fBdown |
TGCanvas * | fCanvas |
Bool_t | fDragging |
TGRectangle | fExposedRegion |
TString | fKeyInput |
TTimer * | fKeyTimer |
Bool_t | fKeyTimerActive |
TGFrameElement * | fLastActiveEl |
Bool_t | fLastCase |
Bool_t | fLastDir |
TString | fLastName |
Bool_t | fLastSubstring |
const TGWindow * | fMsgWindow |
Bool_t | fOnMouseOver |
Bool_t | fScrolling |
TTimer * | fScrollTimer |
Int_t | fSelected |
Int_t | fTotal |
TGViewPort * | fViewPort |
Int_t | fX0 |
Int_t | fXDND |
Int_t | fXf |
Int_t | fXp |
Int_t | fY0 |
Int_t | fYDND |
Int_t | fYf |
Int_t | fYp |
Protected Attributes inherited from TGCompositeFrame | |
Bool_t | fLayoutBroken |
TGLayoutManager * | fLayoutManager |
TList * | fList |
Bool_t | fMapSubwindows |
Int_t | fMustCleanup |
Protected Attributes inherited from TGFrame | |
Pixel_t | fBackground |
Int_t | fBorderWidth |
Int_t | fDNDState |
UInt_t | fEventMask |
TGFrameElement * | fFE |
UInt_t | fHeight |
UInt_t | fMaxHeight |
UInt_t | fMaxWidth |
UInt_t | fMinHeight |
UInt_t | fMinWidth |
UInt_t | fOptions |
UInt_t | fWidth |
Int_t | fX |
Int_t | fY |
kDeleteWindowCalled | |
Protected Attributes inherited from TGWindow | |
UInt_t | fEditDisabled |
TString | fName |
Bool_t | fNeedRedraw |
const TGWindow * | fParent |
Protected Attributes inherited from TGObject | |
TGClient * | fClient |
Handle_t | fId |
Protected Attributes inherited from TObject | |
kOnlyPrepStep | |
Protected Attributes inherited from TQObject | |
TList * | fListOfConnections |
TList * | fListOfSignals |
Bool_t | fSignalsBlocked |
Static Protected Attributes inherited from TGContainer | |
static TGGC * | fgLineGC |
Static Protected Attributes inherited from TGCompositeFrame | |
static TGLayoutHints * | fgDefaultHints |
Static Protected Attributes inherited from TGFrame | |
static const TGGC * | fgBckgndGC |
static const TGGC * | fgBlackGC |
static Pixel_t | fgBlackPixel |
static Window_t | fgDbw |
static Int_t | fgDbx |
static Int_t | fgDby |
static Pixel_t | fgDefaultFrameBackground |
static Pixel_t | fgDefaultSelectedBackground |
static const TGGC * | fgHilightGC |
static Bool_t | fgInit |
static UInt_t | fgLastButton |
static Time_t | fgLastClick |
static const TGGC * | fgShadowGC |
static UInt_t | fgUserColor |
static const TGGC * | fgWhiteGC |
static Pixel_t | fgWhitePixel |
Static Protected Attributes inherited from TGWindow | |
static Int_t | fgCounter |
Static Protected Attributes inherited from TQObject | |
static Bool_t | fgAllSignalsBlocked |
KVLVContainer::KVLVContainer | ( | const TGWindow * | p = 0 , |
UInt_t | w = 1 , |
||
UInt_t | h = 1 , |
||
UInt_t | options = kSunkenFrame , |
||
Pixel_t | back = GetDefaultFrameBackground() |
||
) |
Definition at line 306 of file KVLVContainer.cpp.
KVLVContainer::KVLVContainer | ( | TGCanvas * | p, |
UInt_t | options = kSunkenFrame , |
||
Pixel_t | back = GetDefaultFrameBackground() |
||
) |
Definition at line 316 of file KVLVContainer.cpp.
|
virtual |
Destructor.
Definition at line 375 of file KVLVContainer.cpp.
|
privatevirtual |
Activate item.
Definition at line 1130 of file KVLVContainer.cpp.
void KVLVContainer::ActivateItemsWithColumnData | ( | const Char_t * | colname, |
KVNumberList | data, | ||
Bool_t | activate = kTRUE |
||
) |
Definition at line 752 of file KVLVContainer.cpp.
void KVLVContainer::ActivateItemWithColumnData | ( | const Char_t * | colname, |
const Char_t * | data, | ||
Bool_t | activate = kTRUE |
||
) |
Definition at line 704 of file KVLVContainer.cpp.
void KVLVContainer::ActivateItemWithColumnData | ( | const Char_t * | colname, |
Double_t | data, | ||
Bool_t | activate = kTRUE |
||
) |
Definition at line 783 of file KVLVContainer.cpp.
void KVLVContainer::ActivateItemWithColumnData | ( | const Char_t * | colname, |
Long_t | data, | ||
Bool_t | activate = kTRUE |
||
) |
Definition at line 728 of file KVLVContainer.cpp.
Find item with fUserData == userData in container and make it active (inactive if activate=kFALSE).
Definition at line 621 of file KVLVContainer.cpp.
The global context menu status (allowed or not allowed) is set by AllowContextMenu(). If required, this can be overridden for specific classes by calling this method for each required class. In this case, any objects in the list of precisely this class (not derived classes) will have the opposite behaviour to that defined by AllowContextMenu(), i.e. if context menus are globally disabled, this method defines the classes for which a context menu is authorised, and vice-versa.
Definition at line 1003 of file KVLVContainer.cpp.
void KVLVContainer::AddDataColumn | ( | const char * | columnName | ) |
Definition at line 1084 of file KVLVContainer.cpp.
|
virtual |
Add an item to the list.
Reimplemented from TGCompositeFrame.
Definition at line 435 of file KVLVContainer.cpp.
Deprecated: use AllowDoubleClick
Definition at line 222 of file KVLVContainer.h.
Call with on=kFALSE to disable objects' context menus opening with mouse right-click
Definition at line 216 of file KVLVContainer.h.
Call with on=kFALSE to disable reactivity of objects to mouse double-click
Definition at line 227 of file KVLVContainer.h.
|
private |
Default initialisation of list view container Multiple selection is enabled The parent list view widget handles messages generated by container. By default, we allow objects' context menu to be opened with right-click, and objects' Browse() method to be executed by double-clicking. This can be modified using AllowContextMenu(kFALSE) and AllowDoubleClick(kFALSE).
Definition at line 332 of file KVLVContainer.cpp.
|
private |
Definition at line 394 of file KVLVContainer.cpp.
|
virtual |
Display the list of objects in the container. If the list is very long (> KVListView.MaxListLength) we pop up a dialog box to ask if all items should be displayed which can take quite a long time
Definition at line 458 of file KVLVContainer.cpp.
Perform 'default' action when user double-left-clicks an object in the list. By default, this calls the Browse(TBrowser*) method of the object (defined for TObject, overridden in child classes). If SetDoubleClickAction() was called, the DoubleClickAction(TObject*) signal will be emitted with the address of the selected object. Calling AllowDoubleClick(kFALSE) will disable this.
Definition at line 882 of file KVLVContainer.cpp.
Definition at line 1049 of file KVLVContainer.cpp.
|
privatevirtual |
Fill list from list Pointers to objects are stored in internal list fUserItems for Refresh()
Definition at line 539 of file KVLVContainer.cpp.
Definition at line 644 of file KVLVContainer.cpp.
Definition at line 684 of file KVLVContainer.cpp.
Definition at line 664 of file KVLVContainer.cpp.
Find item with fUserData == userData in container.
Definition at line 598 of file KVLVContainer.cpp.
|
inlinevirtual |
Definition at line 169 of file KVLVContainer.h.
TObject * KVLVContainer::GetFirstInList | ( | ) |
Returns first object in currently displayed list.
Definition at line 909 of file KVLVContainer.cpp.
TObject * KVLVContainer::GetLastInList | ( | ) |
Returns last object in currently displayed list.
Definition at line 929 of file KVLVContainer.cpp.
|
inline |
Returns last clicked item in list
Definition at line 192 of file KVLVContainer.h.
|
inline |
Returns object corresponding to last clicked item in list
Definition at line 187 of file KVLVContainer.h.
|
inline |
Returns list of currently selected objects, in the order they were picked. Do NOT delete this list - it belongs to KVLVContainer.
Definition at line 201 of file KVLVContainer.h.
TList * KVLVContainer::GetSelectedItems | ( | ) |
Create and fill list with all currently selected items (KVLVEntry objects) USER MUST DELETE TLIST AFTER USE!!!
Definition at line 950 of file KVLVContainer.cpp.
TList * KVLVContainer::GetSelectedObjects | ( | ) |
Create and fill list with all currently selected objects (derived from TObject) USER MUST DELETE TLIST AFTER USE!!!
Definition at line 975 of file KVLVContainer.cpp.
|
inline |
return list of all objects in list (regardless of selection)
Definition at line 207 of file KVLVContainer.h.
Override TGContainer method in order to set fControlClick flag.
Reimplemented from TGFrame.
Definition at line 1059 of file KVLVContainer.cpp.
|
inline |
Definition at line 212 of file KVLVContainer.h.
Open context menu when user right-clicks an object in the list. Calling AllowContextMenu(kFALSE) will disable this. We also fill the list fPickOrderedObjects with the selected objects in the order of clicking
if fUseObjLabelAsRealClass=kTRUE (and if objects inherit from KVBase) then the context menu opened will be that of the class given by KVBase::GetLabel. The object's KVBase::GetObject() method must return the real object to use.
Definition at line 816 of file KVLVContainer.cpp.
|
virtual |
Redisplay the list of objects in the container. This can be used to refresh the contents of the window.
Definition at line 508 of file KVLVContainer.cpp.
|
virtual |
When the graphical list is emptied we need to empty the list of user objects also.
Reimplemented from TGCompositeFrame.
Definition at line 523 of file KVLVContainer.cpp.
|
virtual |
void SetNewColumnName(const char* columnName);
Override method in TGContainer If multiple selection is not enabled, do nothing
Reimplemented from TGContainer.
Definition at line 1097 of file KVLVContainer.cpp.
|
virtual |
Definition at line 587 of file KVLVContainer.cpp.
Definition at line 569 of file KVLVContainer.cpp.
void KVLVContainer::SetDoubleClickAction | ( | const char * | receiver_class, |
void * | receiver, | ||
const char * | slot | ||
) |
Overrides the default 'double-click' action. By default, double-clicking on an object in the list will call the Browse(TBrowser*) method of the selected object. Use this method to override this behaviour. When an object is double-clicked the method 'slot' of the object 'receiver' of class 'receiver_class' will be called. The method in question must have the signature receiver_class::slot(TObject*) The address of the selected (T)object is passed as argument.
Definition at line 1030 of file KVLVContainer.cpp.
Definition at line 237 of file KVLVContainer.h.
Definition at line 245 of file KVLVContainer.h.
void KVLVContainer::Sort | ( | int | column | ) |
Sort objects in container according to contents of given column.
Definition at line 411 of file KVLVContainer.cpp.
|
friend |
Definition at line 122 of file KVLVContainer.h.
|
friend |
Definition at line 121 of file KVLVContainer.h.
|
private |
can objects' context menu be opened with right-click ?
Definition at line 127 of file KVLVContainer.h.
|
private |
do something when object double-clicked ?
Definition at line 129 of file KVLVContainer.h.
|
private |
description of column data
Definition at line 136 of file KVLVContainer.h.
|
private |
used to display popup context menu for items
Definition at line 141 of file KVLVContainer.h.
|
private |
list of classes for which we override value of fAllowContextMenu
Definition at line 128 of file KVLVContainer.h.
|
private |
set to kTRUE when user ctrl-clicks an item
Definition at line 131 of file KVLVContainer.h.
|
private |
used to resize columns exactly once
Definition at line 124 of file KVLVContainer.h.
|
private |
internal use only, do not clear list of user items in RemoveAll()
Definition at line 133 of file KVLVContainer.h.
|
private |
number of data columns
Definition at line 140 of file KVLVContainer.h.
|
private |
Definition at line 145 of file KVLVContainer.h.
|
private |
list of currently selected objects, in order of selection
Definition at line 143 of file KVLVContainer.h.
|
private |
Definition at line 125 of file KVLVContainer.h.
|
private |
name of column (i.e. type of data) currently used to sort objects
Definition at line 138 of file KVLVContainer.h.
|
private |
direction of sorting for each column
Definition at line 139 of file KVLVContainer.h.
|
private |
current sorting mode of contents (ascending or descending)
Definition at line 137 of file KVLVContainer.h.
|
private |
if kTRUE, object's classname read from KVBase::GetLabel() (objects must be KVBase-derived!)
Definition at line 147 of file KVLVContainer.h.
|
private |
user-defined double-click action instead of Browse() method
Definition at line 130 of file KVLVContainer.h.
|
private |
list of currently displayed items, used by Refresh()
Definition at line 142 of file KVLVContainer.h.