KaliVeda
1.12/06
Heavy-Ion Analysis Toolkit
|
Extension of TGLVContainer for KVListView widget.
Definition at line 117 of file KVLVContainer.h.
Protected Member Functions | |
virtual void | ActivateItemFromSelectAll (TGFrameElement *el) |
Activate item. More... | |
void | default_init () |
void | DeleteColData () |
virtual void | FillList (const TCollection *=0) |
Protected Member Functions inherited from TGLVContainer | |
virtual void | ActivateItem (TGFrameElement *el) |
virtual void | DeActivateItem (TGFrameElement *el) |
Protected Member Functions inherited from TGContainer | |
virtual void | DoRedraw () |
virtual void | OnAutoScroll () |
virtual void | RepeatSearch () |
virtual void | SearchPattern () |
Protected Member Functions inherited from TGFrame | |
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 |
virtual void * | GetSender () |
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 |
Private Attributes | |
Bool_t | fAllowContextMenu |
can objects' context menu be opened with right-click ? More... | |
Bool_t | fAllowDoubleClick |
do something when object double-clicked ? More... | |
TList * | fContextMenuClassExceptions |
list of classes for which we override value of fAllowContextMenu More... | |
Bool_t | fControlClick |
set to kTRUE when user ctrl-clicks an item More... | |
Bool_t | fIsResized |
used to resize columns exactly once More... | |
Bool_t | fKeepUserItems |
internal use only, do not clear list of user items in RemoveAll() More... | |
Bool_t | fSort |
Bool_t | fUserDoubleClickAction |
user-defined double-click action instead of Browse() method More... | |
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 TGFrame | |
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 Int_t | GetCounter () |
Static Public Member Functions inherited from TObject | |
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 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 Bool_t | Disconnect (const char *class_name, const char *signal, void *receiver=0, const char *slot=0) |
static Bool_t | Disconnect (TQObject *sender, const char *signal=0, void *receiver=0, const char *slot=0) |
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 | |
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) |
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 |
#include <KVLVContainer.h>
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.
|
protectedvirtual |
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 220 of file KVLVContainer.h.
Call with on=kFALSE to disable objects' context menus opening with mouse right-click
Definition at line 214 of file KVLVContainer.h.
Call with on=kFALSE to disable reactivity of objects to mouse double-click
Definition at line 225 of file KVLVContainer.h.
|
protected |
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.
|
protected |
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.
|
protectedvirtual |
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 167 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 190 of file KVLVContainer.h.
|
inline |
Returns object corresponding to last clicked item in list
Definition at line 185 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 199 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 205 of file KVLVContainer.h.
Override TGContainer method in order to set fControlClick flag.
Reimplemented from TGLVContainer.
Definition at line 1059 of file KVLVContainer.cpp.
|
inline |
Definition at line 210 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 TGContainer.
Definition at line 523 of file KVLVContainer.cpp.
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 235 of file KVLVContainer.h.
Definition at line 243 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 120 of file KVLVContainer.h.
|
friend |
Definition at line 119 of file KVLVContainer.h.
|
private |
can objects' context menu be opened with right-click ?
Definition at line 125 of file KVLVContainer.h.
|
private |
do something when object double-clicked ?
Definition at line 127 of file KVLVContainer.h.
|
protected |
description of column data
Definition at line 134 of file KVLVContainer.h.
|
protected |
used to display popup context menu for items
Definition at line 139 of file KVLVContainer.h.
|
private |
list of classes for which we override value of fAllowContextMenu
Definition at line 126 of file KVLVContainer.h.
|
private |
set to kTRUE when user ctrl-clicks an item
Definition at line 129 of file KVLVContainer.h.
|
private |
used to resize columns exactly once
Definition at line 122 of file KVLVContainer.h.
|
private |
internal use only, do not clear list of user items in RemoveAll()
Definition at line 131 of file KVLVContainer.h.
|
protected |
number of data columns
Definition at line 138 of file KVLVContainer.h.
|
protected |
Definition at line 143 of file KVLVContainer.h.
|
protected |
list of currently selected objects, in order of selection
Definition at line 141 of file KVLVContainer.h.
|
private |
Definition at line 123 of file KVLVContainer.h.
|
protected |
name of column (i.e. type of data) currently used to sort objects
Definition at line 136 of file KVLVContainer.h.
|
protected |
direction of sorting for each column
Definition at line 137 of file KVLVContainer.h.
|
protected |
current sorting mode of contents (ascending or descending)
Definition at line 135 of file KVLVContainer.h.
|
protected |
if kTRUE, object's classname read from KVBase::GetLabel() (objects must be KVBase-derived!)
Definition at line 145 of file KVLVContainer.h.
|
private |
user-defined double-click action instead of Browse() method
Definition at line 128 of file KVLVContainer.h.
|
protected |
list of currently displayed items, used by Refresh()
Definition at line 140 of file KVLVContainer.h.