library: libGui #include "TGListView.h"

# TGLVEntry

class description - source file - inheritance tree (.pdf)

## class TGLVEntry : public TGFrame

| Inheritance Chart:
`TObject`
| <- | `TGObject`
| <- | `TGWindow`
`TQObject`
| <- | `TGFrame`
| <- | `TGLVEntry` |
<- |
`TGFileItem` |
`TTVLVEntry` |

        protected:

                 virtual void DoRedraw()
          static FontStruct_t GetDefaultFontStruct()
           static const TGGC& GetDefaultGC() const

        public:

                              TGLVEntry(const TGWindow* p = 0, const TGPicture* bigpic = 0, const TGPicture* smallpic = 0, TGString* name = 0, TGString** subnames = 0, EListViewMode ViewMode = kLVDetails, UInt_t options = kChildFrame, Pixel_t back = GetWhitePixel())
                              TGLVEntry(const TGLVContainer* p, const TString& name, const TString& cname, TGString** subnames = 0, UInt_t options = kChildFrame, Pixel_t back = GetWhitePixel())
                              TGLVEntry(const TGLVEntry&)
                      virtual ~TGLVEntry()
                 virtual void Activate(Bool_t a)
               static TClass* Class()
                 virtual void DrawCopy(Handle_t id, Int_t x, Int_t y)
          virtual TGDimension GetDefaultSize() const
                    TGString* GetItemName() const
             const TGPicture* GetPicture() const
                virtual Int_t GetSubnameWidth(Int_t idx) const
          virtual const char* GetTitle() const
                        void* GetUserData() const
                EListViewMode GetViewMode() const
              virtual TClass* IsA() const
               virtual Bool_t IsActive() const
                 virtual void SetColumns(Int_t* cpos, Int_t* jmode)
                         void SetItemName(const char* name)
                 virtual void SetPictures(const TGPicture* bigpic = 0, const TGPicture* smallpic = 0)
                 virtual void SetSubnames(const char* n1 = "", const char* n2 = "", const char* n3 = "", const char* n4 = "", const char* n5 = "", const char* n6 = "", const char* n7 = "", const char* n8 = "", const char* n9 = "", const char* n10 = "", const char* n11 = "", const char* n12 = "")
                 virtual void SetTitle(const char* text)
                         void SetUserData(void* userData)
                 virtual void SetViewMode(EListViewMode viewMode)
                 virtual void ShowMembers(TMemberInspector& insp, char* parent)
                 virtual void Streamer(TBuffer& b)
                         void StreamerNVirtual(TBuffer& b)

### Data Members

        protected:

                     TGString* fName          name of item
                    TGString** fSubnames      sub names of item (details)
                        Int_t* fCpos          position of sub names
                        Int_t* fJmode         alignment for sub names
                        Int_t* fCtw           width of sub names
                        UInt_t fTWidth        width of name
                        UInt_t fTHeight       height of name
                        Bool_t fActive        true if item is active
                 EListViewMode fViewMode      list view viewing mode
              const TGPicture* fBigPic        big icon
              const TGPicture* fSmallPic      small icon
              const TGPicture* fCurrent       current icon
            TGSelectedPicture* fSelPic        selected icon
                    GContext_t fNormGC        drawing graphics context
                  FontStruct_t fFontStruct    text font
                         void* fUserData      pointer to user data structure
          static const TGFont* fgDefaultFont
                  static TGGC* fgDefaultGC

## Class Description

     TGListView, TGLVContainer and TGLVEntry

     A list view is a widget that can contain a number of items
     arranged in a grid or list. The items can be represented either
     by a string or by an icon.

     The TGListView is user callable. The other classes are service
     classes of the list view.

     A list view can generate the following events:
     kC_CONTAINER, kCT_SELCHANGED, total items, selected items.
     kC_CONTAINER, kCT_ITEMCLICK, which button, location (y<<16|x).
     kC_CONTAINER, kCT_ITEMDBLCLICK, which button, location (y<<16|x).

TGLVEntry(const TGWindow *p, const TGPicture *bigpic, const TGPicture *smallpic, TGString *name, TGString **subnames, EListViewMode viewMode, UInt_t options, ULong_t back) : TGFrame(p, 10, 10, options, back)

     Create a list view item.

TGLVEntry(const TGLVContainer *p, const TString& name, const TString& cname, TGString **subnames, UInt_t options, Pixel_t back) : TGFrame(p, 10, 10, options, back)

     Create a list view item.

     name - is name of item.
     cname - is name of icon. In most cases this is class name of object
             associated with this item.

~TGLVEntry()

     Delete a list view item.

void SetSubnames(const char* n1,const char* n2,const char* n3, const char* n4,const char* n5,const char* n6, const char* n7,const char* n8,const char* n9, const char* n10,const char* n11,const char* n12)

     Sets new subnames.

void Activate(Bool_t a)

     Make list view item active.

void SetViewMode(EListViewMode viewMode)

     Set the view mode for this list item.

void SetPictures(const TGPicture *bigpic, const TGPicture *smallpic)

     change pictures

void DoRedraw()

     Redraw list view item.
     List view item is placed and layouted in the container frame,
     but is drawn in viewport.

void DrawCopy(Handle_t id, Int_t x, Int_t y)

     Draw list view item in other window.
     List view item is placed and layout in the container frame,
     but is drawn in viewport.

TGDimension GetDefaultSize() const

     Get default size of list item.

FontStruct_t GetDefaultFontStruct()

const TGGC& GetDefaultGC()

### Inline Functions

                      Bool_t IsActive() const
                   TGString* GetItemName() const
                 const char* GetTitle() const
                        void SetTitle(const char* text)
                        void SetItemName(const char* name)
            const TGPicture* GetPicture() const
               EListViewMode GetViewMode() const
                        void SetUserData(void* userData)
                       void* GetUserData() const
                        void SetColumns(Int_t* cpos, Int_t* jmode)
                       Int_t GetSubnameWidth(Int_t idx) const
                     TClass* Class()
                     TClass* IsA() const
                        void ShowMembers(TMemberInspector& insp, char* parent)
                        void Streamer(TBuffer& b)
                        void StreamerNVirtual(TBuffer& b)
                   TGLVEntry TGLVEntry(const TGLVEntry&)

Author: Fons Rademakers 17/01/98
Last update: root/gui:$Name: $:$Id: TGListView.cxx,v 1.31 2005/05/27 12:24:44 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *