12 #ifndef ROOT_TGComboBox
13 #define ROOT_TGComboBox
36 #ifndef ROOT_TGListBox
147 virtual void Selected(
const char *txt) {
Emit(
"Selected(char*)", txt); }
virtual Int_t GetNumberOfEntries() const
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void AddEntry(TGLBEntry *lbe, TGLayoutHints *lhints)
virtual void AddEntry(TGString *s, Int_t id)
Add entry with specified string and id to listbox.
virtual void NewEntry(const char *s="Entry")
virtual Int_t GetSelected() const
Return id of selected listbox item.
virtual void AddEntry(const char *s, Int_t id)
TGScrollBarElement * fDDButton
virtual Bool_t HandleMotion(Event_t *event)
Handle pointer motion in text entry.
static Pixel_t GetWhitePixel()
Get white pixel value.
TGComboBox & operator=(const TGComboBox &)
TGComboBox(const TGComboBox &)
virtual void DrawBorder()
Draw border of combo box widget.
virtual void InsertEntry(TGString *s, Int_t id, Int_t afterID)
virtual Int_t GetNumberOfEntries() const
TGLineStyleComboBox(const TGWindow *p=0, Int_t id=-1, UInt_t options=kHorizontalFrame|kSunkenFrame|kDoubleBorder, Pixel_t back=GetWhitePixel())
Create a line style combo box.
virtual Bool_t IsTextInputEnabled() const
virtual TGLBEntry * GetSelectedEntry() const
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Remove a range of entries defined by from_ID and to_ID.
TGComboBoxPopup * fComboFrame
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual Bool_t IsEnabled() const
virtual void InsertEntry(TGString *s, Int_t id, Int_t afterID)
Insert entry with specified string and id behind the entry with afterID.
#define ClassDef(name, id)
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
virtual void SetTopEntry(TGLBEntry *e, TGLayoutHints *lh)
Set a new combo box value (normally update of text string in fSelEntry is done via fSelEntry::Update(...
virtual ~TGComboBox()
Delete a combo box widget.
virtual void RemoveAll()
Remove all entries from combo box.
virtual void SortByName(Bool_t ascend=kTRUE)
Sort entries by name.
virtual void SortByName(Bool_t ascend=kTRUE)
void Emit(const char *signal)
Acitvate signal without args.
virtual void InsertEntry(TGLBEntry *lbe, TGLayoutHints *lhints, Int_t afterID)
virtual Int_t GetSelected() const
virtual void InsertEntry(const char *s, Int_t id, Int_t afterID)
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click in text entry.
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a line style combo box widget as a C++ statement(s).
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a combo box widget as a C++ statement(s) on output stream out.
virtual TGListBox * GetListBox() const
virtual void EnableTextInput(Bool_t on)
Switch text input or readonly mode of combobox (not perfect yet).
virtual ~TGFontTypeComboBox()
Text font combo box dtor.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events in the combo box.
virtual void SetEnabled(Bool_t on=kTRUE)
Set state of combo box. If kTRUE=enabled, kFALSE=disabled.
TGFontTypeComboBox(const TGWindow *p=0, Int_t id=-1, UInt_t options=kHorizontalFrame|kSunkenFrame|kDoubleBorder, Pixel_t bask=GetWhitePixel())
Create a text font combo box.
virtual void AddEntry(TGString *s, Int_t id)
virtual Bool_t HandleSelection(Event_t *event)
Handle selection in text entry.
virtual void Selected(Int_t widgetId, Int_t id)
Emit signal.
virtual void Selected(const char *txt)
virtual TGLBEntry * GetSelectedEntry() const
virtual void NewEntry(const char *s="Entry")
method used to add entry via context menu
TGLineWidthComboBox(const TGWindow *p=0, Int_t id=-1, UInt_t options=kHorizontalFrame|kSunkenFrame|kDoubleBorder, Pixel_t back=GetWhitePixel(), Bool_t none=kFALSE)
Create a line width combo box.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a line width combo box widget as a C++ statement(s).
virtual void ReturnPressed()
Add new entry to combo box when return key pressed inside text entry ReturnPressed signal is emitted...
virtual void Selected(Int_t id)
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages generated by the listbox and forward messages to the combobox message handling windo...
virtual void RemoveEntry(Int_t id=-1)
Remove entry. If id == -1, the currently selected entry is removed.
virtual void Init()
Initiate the internal classes of a combo box.
FontStruct_t fFonts[kMaxFonts]
virtual void Layout()
layout combobox
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request in text entry.
virtual TGTextEntry * GetTextEntry() const