library: libGui
#include "TGComboBox.h"

TGComboBox


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

class TGComboBox : public TGCompositeFrame, public TGWidget

Inheritance Chart:
TObject
<-
TGObject
<-
TGWindow
TQObject
<-
TGFrame
<-
TGCompositeFrame
TGWidget
<-
TGComboBox
<-
TGFontTypeComboBox
TGFSComboBox
TGLineStyleComboBox
TGLineWidthComboBox

    protected:
virtual void Init() public:
TGComboBox(const TGWindow* p = 0, Int_t id = -1, UInt_t options = kHorizontalFrame|kSunkenFrame|kDoubleBorder, Pixel_t back = GetWhitePixel()) TGComboBox(const TGWindow* p, const char* text, Int_t id = -1, UInt_t options = kHorizontalFrame|kSunkenFrame|kDoubleBorder, Pixel_t back = GetWhitePixel()) TGComboBox(const TGComboBox&) virtual ~TGComboBox() virtual void AddEntry(TGString* s, Int_t id) virtual void AddEntry(const char* s, Int_t id) virtual void AddEntry(TGLBEntry* lbe, TGLayoutHints* lhints) static TClass* Class() virtual void DrawBorder() virtual void EnableTextInput(Bool_t on) virtual TGLBEntry* FindEntry(const char* s) const virtual TGDimension GetDefaultSize() const virtual TGListBox* GetListBox() const virtual Int_t GetNumberOfEntries() const virtual Int_t GetSelected() const virtual TGLBEntry* GetSelectedEntry() const virtual TGTextEntry* GetTextEntry() const virtual Bool_t HandleButton(Event_t* event) virtual Bool_t HandleDoubleClick(Event_t* event) virtual Bool_t HandleMotion(Event_t* event) virtual Bool_t HandleSelection(Event_t* event) virtual Bool_t HandleSelectionRequest(Event_t* event) virtual void InsertEntry(TGString* s, Int_t id, Int_t afterID) virtual void InsertEntry(const char* s, Int_t id, Int_t afterID) virtual void InsertEntry(TGLBEntry* lbe, TGLayoutHints* lhints, Int_t afterID) virtual TClass* IsA() const virtual Bool_t IsEnabled() const virtual Bool_t IsTextInputEnabled() const virtual void NewEntry(const char* s = "Entry") virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) virtual void RemoveAll() virtual void RemoveEntries(Int_t from_ID, Int_t to_ID) virtual void RemoveEntry(Int_t id = -1) virtual void ReturnPressed() virtual void SavePrimitive(ostream& out, Option_t* option = "") virtual void Select(Int_t id, Bool_t emit = kTRUE) virtual void Selected(Int_t widgetId, Int_t id) virtual void Selected(Int_t id) virtual void Selected(const char* txt) virtual void SetEnabled(Bool_t on = kTRUE) virtual void SetTopEntry(TGLBEntry* e, TGLayoutHints* lh) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void SortByName(Bool_t ascend = kTRUE) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
TGLBEntry* fSelEntry selected item frame TGTextEntry* fTextEntry text entry TGScrollBarElement* fDDButton button controlling drop down of popup TGComboBoxPopup* fComboFrame popup containing a listbox TGListBox* fListBox the listbox with text items const TGPicture* fBpic down arrow picture used in fDDButton TGLayoutHints* fLhs layout hints for selected item frame TGLayoutHints* fLhb layout hints for fDDButton TGLayoutHints* fLhdd layout hints for fListBox

Class Description

                                                                      
 TGComboBox, TGComboBoxPopup                                          
                                                                      
 A combobox (also known as a drop down listbox) allows the selection  
 of one item out of a list of items. The selected item is visible in  
 a little window. To view the list of possible items one has to click 
 on a button on the right of the little window. This will drop down   
 a listbox. After selecting an item from the listbox the box will     
 disappear and the newly selected item will be shown in the little    
 window.                                                              
                                                                      
 The TGComboBox is user callable. The TGComboBoxPopup is a service    
 class of the combobox.                                               
                                                                      
 Selecting an item in the combobox will generate the event:           
 kC_COMMAND, kCM_COMBOBOX, combobox id, item id.                      
                                                                      

TGComboBox(const TGWindow *p, Int_t id, UInt_t options, ULong_t back)
 Create a combo box widget.
TGComboBox(const TGWindow *p, const char *text, Int_t id, UInt_t options, ULong_t back)
 Create an editable combo box widget.
~TGComboBox()
 Delete a combo box widget.
void Init()
 Initiate the internal classes of a combo box.
void DrawBorder()
 Draw border of combo box widget.
void EnableTextInput(Bool_t on)
 Switch text input or readonly mode of combobox (not perfect yet).
void SetTopEntry(TGLBEntry *e, TGLayoutHints *lh)
 Set a new combo box value (normally update of text string in
 fSelEntry is done via fSelEntry::Update()).
void Select(Int_t id, Bool_t emit)
 Make the selected item visible in the combo box window
 and emit signals according to the second parameter.
Bool_t HandleButton(Event_t *event)
 Handle mouse button events in the combo box.
void RemoveEntry(Int_t id)
 Remove entry. If id == -1, the currently selected entry is removed
Bool_t HandleDoubleClick(Event_t *event)
 Handle double click in text entry.
Bool_t HandleMotion(Event_t *event)
 Handle pointer motion in text entry.
Bool_t HandleSelection(Event_t *event)
 Handle selection in text entry.
Bool_t HandleSelectionRequest(Event_t *event)
 Handle selection request in text entry.
Bool_t ProcessMessage(Long_t msg, Long_t, Long_t parm2)
 Process messages generated by the listbox and forward
 messages to the combobox message handling window. Parm2 contains
 the id of the selected listbox entry.
void Selected(Int_t widgetId, Int_t id)
 Emit signal.
void SetEnabled(Bool_t on)
 Set state of combo box. If kTRUE=enabled, kFALSE=disabled.
void ReturnPressed()
 Add new entry to combo box when return key pressed inside text entry
 ReturnPressed signal is emitted.
void RemoveAll()
 Remove all entries from combo box.
void SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 Save a combo box widget as a C++ statement(s) on output stream out.
TGComboBox(const TGWindow *p = 0, Int_t id = -1, UInt_t options = kHorizontalFrame | kSunkenFrame | kDoubleBorder, Pixel_t back = GetWhitePixel())
TGDimension GetDefaultSize()
void AddEntry(TGString *s, Int_t id)
void AddEntry(const char *s, Int_t id)
void AddEntry(TGLBEntry *lbe, TGLayoutHints *lhints)
void InsertEntry(TGString *s, Int_t id, Int_t afterID)
void InsertEntry(const char *s, Int_t id, Int_t afterID)
void InsertEntry(TGLBEntry *lbe, TGLayoutHints *lhints, Int_t afterID)
void NewEntry(const char *s = "Entry")
Bool_t IsTextInputEnabled()
void RemoveEntries(Int_t from_ID, Int_t to_ID)
Int_t GetNumberOfEntries()
Int_t GetSelected()
Bool_t IsEnabled()
void SortByName(Bool_t ascend = kTRUE)
void Selected(Int_t widgetId, Int_t id)
void Selected(Int_t id)

Author: Fons Rademakers 13/01/98
Last update: root/gui:$Name: $:$Id: TGComboBox.cxx,v 1.47 2006/07/06 09:39:18 antcheva Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - 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.