TGLBContainer


class description - source file - inheritance tree

class TGLBContainer : public TGCompositeFrame


    public:
TGLBContainer TGLBContainer(TGWindow* p, UInt_t w, UInt_t h, UInt_t options = kSunkenFrame, ULong_t back = fgDefaultFrameBackground) TGLBContainer TGLBContainer(TGLBContainer&) virtual void ~TGLBContainer() virtual void AddEntry(TGLBEntry* lbe, TGLayoutHints* lhints) virtual void AddEntrySort(TGLBEntry* lbe, TGLayoutHints* lhints) virtual void Associate(TGWindow* w) TClass* Class() virtual Bool_t GetMultipleSelections() virtual Int_t GetPos(Int_t id) virtual Int_t GetSelected() virtual void GetSelectedEntries(TList* selected) virtual TGLBEntry* GetSelectedEntry() virtual Bool_t GetSelection(Int_t id) virtual Bool_t HandleButton(Event_t* event) virtual Bool_t HandleMotion(Event_t* event) virtual void InsertEntry(TGLBEntry* lbe, TGLayoutHints* lhints, Int_t afterID) virtual TClass* IsA() virtual void RemoveEntries(Int_t from_ID, Int_t to_ID) virtual void RemoveEntry(Int_t id) virtual TGLBEntry* Select(Int_t id, Bool_t sel) virtual TGLBEntry* Select(Int_t id) virtual void SetMultipleSelections(Bool_t multi) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)

Data Members

protected:
TGLBEntry* fLastActive last active listbox entry in single selection listbox static const TGWindow* fMsgWindow window handling container messages Bool_t fMultiSelect true if multi selection is switched on Int_t fChangeStatus defines the changes (select or unselect) while the mouse

Class Description

                                                                      
 TGListBox, TGLBContainer, TGLBEntry and TGTextLBEntry                
                                                                      
 A listbox is a box, possibly with scrollbar, containing entries.     
 Currently entries are simple text strings (TGTextLBEntry).           
 A TGListBox looks a lot like a TGCanvas. It has a TGViewPort         
 containing a TGLBContainer which contains the entries and it also    
 has a vertical scrollbar which becomes visible if there are more     
 items than fit in the visible part of the container.                 
                                                                      
 The TGListBox is user callable. The other classes are service        
 classes of the listbox.                                              
                                                                      
 Selecting an item in the listbox will generate the event:            
 kC_COMMAND, kCM_LISTBOX, listbox id, item id.                        
                                                                      


TGLBContainer(const TGWindow *p, UInt_t w, UInt_t h, UInt_t options, ULong_t back) : TGCompositeFrame(p, w, h, options, back)
 Create a listbox container.

~TGLBContainer()
 Delete the listbox container.

void AddEntry(TGLBEntry *lbe, TGLayoutHints *lhints)
 Add listbox entry with hints to container. To show entry call
 MapSubwindows() and Layout().

void InsertEntry(TGLBEntry *lbe, TGLayoutHints *lhints, Int_t afterID)
 Insert listbox entry after specified entry with id lastID. If lastID = -1
 then add entry at head of list. To show entry call MapSubwindows() and
 Layout().

void AddEntrySort(TGLBEntry *lbe, TGLayoutHints *lhints)
 Insert listbox entry before the list box entry with a higher id.
 To show entry call MapSubwindows() and Layout().

void RemoveEntry(Int_t id)
 Remove the entry with specified id from the listbox container.
 To update the listbox call Layout().

void RemoveEntries(Int_t from_ID, Int_t to_ID)
 Remove entries from from_ID to to_ID (including).
 To update the listbox call Layout().

TGLBEntry* Select(Int_t id)

TGLBEntry* Select(Int_t id, Bool_t sel)
 Select / deselect the entry with the specified id.
 Returns the selected TGLBEntry.

Int_t GetSelected() const
 Returns id of selected entry. In case of no selected entry or
 if multi selection is switched on returns -1.

Bool_t GetSelection(Int_t id)
 Returns kTrue if entry id is selected.

void GetSelectedEntries(TList *selected)
 Adds all selected entries (TGLBEntry) of the list box into
 the list selected.

void SetMultipleSelections(Bool_t multi)
 enables and disables multible selections of entries

Bool_t HandleButton(Event_t *event)
 Handle mouse button event in the listbox container.

Bool_t HandleMotion(Event_t *event)
 Handle mouse motion event in listbox container.

Int_t GetPos(Int_t id)
 Returns the position in the list box of the entry id.
 The first position has postion no 0. Returns -1 if entry id
 is not in the list of entries.



Inline Functions


                 void Associate(TGWindow* w)
           TGLBEntry* GetSelectedEntry()
               Bool_t GetMultipleSelections()
              TClass* Class()
              TClass* IsA()
                 void ShowMembers(TMemberInspector& insp, char* parent)
                 void Streamer(TBuffer& b)
        TGLBContainer TGLBContainer(TGLBContainer&)


Author: Fons Rademakers 12/01/98
Last update: 2.22/05 15/06/99 16.34.37 by Fons Rademakers
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.