12#ifndef ROOT_TGComboBox
13#define ROOT_TGComboBox
125 virtual void Selected(
const char *txt) {
Emit(
"Selected(char*)", txt); }
Handle_t FontStruct_t
Pointer to font structure.
ULong_t Pixel_t
Pixel value.
#define ClassDef(name, id)
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
virtual Int_t GetSelected() const
TGLBEntry * fSelEntry
selected item frame
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request in text entry.
TGComboBox(const TGComboBox &)=delete
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 Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Process messages generated by the listbox and forward messages to the combobox message handling windo...
virtual void SortByName(Bool_t ascend=kTRUE)
TGListBox * fListBox
the listbox with text items
virtual void RemoveAll()
Remove all entries from combo box.
TGComboBox & operator=(const TGComboBox &)=delete
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.
TGTextEntry * fTextEntry
text entry
virtual Bool_t HandleMotion(Event_t *event)
Handle pointer motion in text entry.
TGScrollBarElement * fDDButton
button controlling drop down of popup
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...
TGLayoutHints * fLhs
layout hints for selected item frame
TGLayoutHints * fLhdd
layout hints for fListBox
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, done only when selected entry changed.
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
virtual void EnableTextInput(Bool_t on)
Switch text input or readonly mode of combobox (not perfect yet).
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
popup containing a listbox
const TGPicture * fBpic
down arrow picture used in fDDButton
TGLayoutHints * fLhb
layout hints for fDDButton
virtual void AddEntry(TGLBEntry *lbe, TGLayoutHints *lhints)
The base class for composite widgets (menu bars, list boxes, etc.).
The TGFontTypeComboBox is user callable and it creates a combobox for selecting the font.
virtual ~TGFontTypeComboBox()
Text font combo box dtor.
FontStruct_t fFonts[kMaxFonts]
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
static Pixel_t GetWhitePixel()
Get white pixel value.
UInt_t fHeight
frame height
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
This class describes layout hints used by the layout classes.
The TGLineStyleComboBox user callable and it creates a combobox for selecting the line style.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a line style combo box widget as a C++ statement(s).
The TGLineWidthComboBox user callable and it creates a combobox for selecting the line width.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a line width combo box widget as a C++ statement(s).
A listbox is a box, possibly with scrollbar, containing entries.
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.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
A TGTextEntry is a one line text input widget.
ROOT GUI Window base class.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.