12#ifndef ROOT_TGComboBox
13#define ROOT_TGComboBox
125 virtual void Selected(
const char *txt) {
Emit(
"Selected(char*)", txt); }
ULong_t Pixel_t
Pixel value.
Handle_t FontStruct_t
Pointer to font structure.
#define ClassDefOverride(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char text
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
void Layout() override
layout combobox
Bool_t HandleSelection(Event_t *event) override
Handle selection in text entry.
TGLBEntry * fSelEntry
selected item frame
TGComboBox(const TGComboBox &)=delete
virtual void Selected(Int_t id)
void RemoveAll() override
Remove all entries from combo box.
virtual void InsertEntry(TGLBEntry *lbe, TGLayoutHints *lhints, Int_t afterID)
TGDimension GetDefaultSize() const override
std::cout << fWidth << "x" << fHeight << std::endl;
virtual TGLBEntry * GetSelectedEntry() const
virtual TGTextEntry * GetTextEntry() const
virtual void AddEntry(TGString *s, Int_t id)
void DrawBorder() override
Draw border of combo box widget.
virtual void SortByName(Bool_t ascend=kTRUE)
TGListBox * fListBox
the listbox with text items
TGComboBox & operator=(const TGComboBox &)=delete
virtual void Selected(const char *txt)
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a combo box widget as a C++ statement(s) on output stream out.
Bool_t HandleDoubleClick(Event_t *event) override
Handle double click in text entry.
~TGComboBox() override
Delete a combo box widget.
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 void RemoveEntry(Int_t id=-1)
Remove entry. If id == -1, the currently selected entry is removed.
virtual TGListBox * GetListBox() const
TGTextEntry * fTextEntry
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
Bool_t HandleSelectionRequest(Event_t *event) override
Handle selection request in text entry.
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")
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override
Process messages generated by the listbox and forward messages to the combobox message handling windo...
virtual Bool_t IsTextInputEnabled() const
Bool_t HandleButton(Event_t *event) override
Handle mouse button events in the combo box.
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.
Bool_t HandleMotion(Event_t *event) override
Handle pointer motion in text entry.
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 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.
~TGFontTypeComboBox() override
Text font combo box dtor.
FontStruct_t fFonts[kMaxFonts]
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
static Pixel_t GetWhitePixel()
Get white pixel value.
UInt_t fHeight
frame height
This class describes layout hints used by the layout classes.
The TGLineStyleComboBox user callable and it creates a combobox for selecting the line style.
void SavePrimitive(std::ostream &out, Option_t *option="") override
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.
void SavePrimitive(std::ostream &out, Option_t *option="") override
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.