TGListBox


class description - source file - inheritance tree

class TGListBox : public TGCompositeFrame


    protected:
virtual void InitListBox() void SetContainer(TGFrame* f) public:
TGListBox TGListBox(TGWindow* p, Int_t id, UInt_t options = kSunkenFrame|kDoubleBorder, ULong_t back = fgWhitePixel) TGListBox TGListBox(TGListBox&) virtual void ~TGListBox() virtual void AddEntry(TGString* s, Int_t id) virtual void AddEntry(char* s, Int_t id) virtual void AddEntry(TGLBEntry* lbe, TGLayoutHints* lhints) virtual void AddEntrySort(TGString* s, Int_t id) virtual void AddEntrySort(char* s, Int_t id) virtual void AddEntrySort(TGLBEntry* lbe, TGLayoutHints* lhints) virtual void Associate(TGWindow* w) TClass* Class() virtual void DrawBorder() TGFrame* GetContainer() virtual TGDimension GetDefaultSize() virtual Bool_t GetMultipleSelections() virtual Int_t GetSelected() virtual void GetSelectedEntries(TList* selected) virtual TGLBEntry* GetSelectedEntry() virtual Bool_t GetSelection(Int_t id) TGFrame* GetViewPort() virtual void InsertEntry(TGString* s, Int_t id, Int_t afterID) virtual void InsertEntry(char* s, Int_t id, Int_t afterID) virtual void InsertEntry(TGLBEntry* lbe, TGLayoutHints* lhints, Int_t afterID) virtual void IntegralHeight(Bool_t mode) virtual TClass* IsA() virtual void Layout() virtual void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h) virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) virtual void RemoveEntries(Int_t from_ID, Int_t to_ID) virtual void RemoveEntry(Int_t id) virtual void Resize(UInt_t w, UInt_t h) virtual void Resize(TGDimension size) virtual TGLBEntry* Select(Int_t id, Bool_t sel = kTRUE) virtual void SetMultipleSelections(Bool_t multi) virtual void SetTopEntry(Int_t id) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)

Data Members

protected:
Int_t fListBoxId listbox widget id UInt_t fItemVsize maximum height of single entry Bool_t fIntegralHeight true if height should be multiple of fItemVsize TGLBContainer* fLbc listbox container TGViewPort* fVport listbox viewport (see TGCanvas.h) TGVScrollBar* fVScrollbar vertical scrollbar static const TGWindow* fMsgWindow window handling listbox messages

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.                        
                                                                      


TGListBox(const TGWindow *p, Int_t id, UInt_t options, ULong_t back) : TGCompositeFrame(p, 10, 10, options, back)
 Create a listbox.

~TGListBox()
 Delete a listbox widget.

void InitListBox()
 initiate the internal classes of a list box

void DrawBorder()
 Draw borders of the list box widget.

void AddEntry(TGString *s, Int_t id)
 Add entry with specified string and id to listbox. The id will be
 used in the event processing routine when the item is selected.
 The string will be adopted by the listbox.

void AddEntry(const char *s, Int_t id)
 Add entry with specified string and id to listbox. The id will be
 used in the event processing routine when the item is selected.

void AddEntry(TGLBEntry *lbe, TGLayoutHints *lhints)
 Add specified TGLBEntry and TGLayoutHints to listbox. The
 entry and layout will be adopted and later deleted by the listbox.

void AddEntrySort(TGString *s, Int_t id)
 Add entry with specified string and id to listbox sorted by increasing id.
 This sorting works proberly only if EntrySort functions are used to add
 entries without mixing them with other add or insert functions.  The id will be
 used in the event processing routine when the item is selected.
 The string will be adopted by the listbox.

void AddEntrySort(const char *s, Int_t id)
 Add entry with specified string and id to listbox sorted by increasing id.
 This sorting works proberly only if EntrySort functions are used to add
 entries without mixing them with other add or insert functions. The id will be
 used in the event processing routine when the item is selected.

void AddEntrySort(TGLBEntry *lbe, TGLayoutHints *lhints)
 Add specified TGLBEntry and TGLayoutHints to listbox sorted by increasing id.
 This sorting works proberly only if EntrySort functions are used to add
 entries without mixing them with other add or insert functions. The
 entry and layout will be adopted and later deleted by the listbox.

void InsertEntry(TGString *s, Int_t id, Int_t afterID)
 Insert entry with specified string and id behind the entry with afterID.
 The string will be adopted and later deleted by the listbox.

void InsertEntry(const char *s, Int_t id, Int_t afterID)
 Insert entry with specified string and id behind the entry with afterID.

void InsertEntry(TGLBEntry *lbe, TGLayoutHints *lhints, int afterID)
 Insert the specified TGLBEntry and layout hints behind afterID.
 The entry and layout will be adopted and later deleted by the listbox.

void SetTopEntry(Int_t id)
 Scroll the entry with id to the top of the listbox.

void Resize(UInt_t w, UInt_t h)
 Resize the listbox widget. If fIntegralHeight is true make the height
 an integral number of the maximum height of a single entry.

void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h)
 Move and resize the listbox widget.

TGDimension GetDefaultSize() const
 Return default size of listbox widget.

void Layout()
 Layout the listbox components.

Int_t GetSelected() const
 Return id of selected listbox item.

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

Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t)
 Process messages generated by the listbox container and forward
 messages to the listbox message handling window.



Inline Functions


               void SetContainer(TGFrame* f)
               void RemoveEntry(Int_t id)
               void RemoveEntries(Int_t from_ID, Int_t to_ID)
               void SetMultipleSelections(Bool_t multi)
             Bool_t GetMultipleSelections()
           TGFrame* GetContainer()
           TGFrame* GetViewPort()
               void Resize(TGDimension size)
               void IntegralHeight(Bool_t mode)
               void Associate(TGWindow* w)
         TGLBEntry* Select(Int_t id, Bool_t sel = kTRUE)
             Bool_t GetSelection(Int_t id)
         TGLBEntry* GetSelectedEntry()
            TClass* Class()
            TClass* IsA()
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
          TGListBox TGListBox(TGListBox&)


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.