12#ifndef ROOT_TGComboBox
13#define ROOT_TGComboBox
145 virtual void Selected(
const char *txt) {
Emit(
"Selected(char*)", txt); }
#define ClassDef(name, id)
virtual Int_t GetSelected() const
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request in text entry.
virtual void Selected(Int_t id)
virtual void InsertEntry(TGLBEntry *lbe, TGLayoutHints *lhints, Int_t afterID)
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events in the combo box.
virtual TGLBEntry * GetSelectedEntry() const
virtual TGTextEntry * GetTextEntry() const
virtual void AddEntry(TGString *s, Int_t id)
virtual void SortByName(Bool_t ascend=kTRUE)
virtual void RemoveAll()
Remove all entries from combo box.
virtual void Selected(const char *txt)
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 void RemoveEntries(Int_t from_ID, Int_t to_ID)
virtual Bool_t HandleSelection(Event_t *event)
Handle selection in text entry.
virtual void RemoveEntry(Int_t id=-1)
Remove entry. If id == -1, the currently selected entry is removed.
virtual TGListBox * GetListBox() const
virtual ~TGComboBox()
Delete a combo box widget.
virtual Bool_t HandleMotion(Event_t *event)
Handle pointer motion in text entry.
TGScrollBarElement * fDDButton
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...
TGComboBox & operator=(const TGComboBox &)
virtual void ReturnPressed()
Add new entry to combo box when return key pressed inside text entry ReturnPressed signal is emitted.
virtual Bool_t IsEnabled() const
virtual void NewEntry(const char *s="Entry")
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click in text entry.
virtual Bool_t IsTextInputEnabled() const
virtual void DrawBorder()
Draw border of combo box widget.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a combo box widget as a C++ statement(s) on output stream out.
virtual void InsertEntry(TGString *s, Int_t id, Int_t afterID)
virtual void SetEnabled(Bool_t on=kTRUE)
Set state of combo box. If kTRUE=enabled, kFALSE=disabled.
virtual void InsertEntry(const char *s, Int_t id, Int_t afterID)
virtual void Selected(Int_t widgetId, Int_t id)
Emit signal.
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
TGComboBox(const TGComboBox &)
virtual void EnableTextInput(Bool_t on)
Switch text input or readonly mode of combobox (not perfect yet).
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 AddEntry(const char *s, Int_t id)
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void Layout()
layout combobox
virtual Int_t GetNumberOfEntries() const
virtual void Init()
Initiate the internal classes of a combo box.
TGComboBoxPopup * fComboFrame
virtual void AddEntry(TGLBEntry *lbe, TGLayoutHints *lhints)
virtual ~TGFontTypeComboBox()
Text font combo box dtor.
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.
FontStruct_t fFonts[kMaxFonts]
static Pixel_t GetWhitePixel()
Get white pixel value.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
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 void SavePrimitive(std::ostream &out, Option_t *option="")
Save a line style combo box widget as a C++ statement(s).
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 SortByName(Bool_t ascend=kTRUE)
Sort entries by name.
virtual Int_t GetNumberOfEntries() const
virtual TGLBEntry * GetSelectedEntry() const
virtual void NewEntry(const char *s="Entry")
method used to add entry via context menu
virtual Int_t GetSelected() const
Return id of selected listbox item.
virtual void AddEntry(TGString *s, Int_t id)
Add entry with specified string and id to listbox.
virtual void InsertEntry(TGString *s, Int_t id, Int_t afterID)
Insert entry with specified string and id behind the entry with afterID.
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Remove a range of entries defined by from_ID and to_ID.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
static constexpr double s