12 #ifndef ROOT_TGListBox
13 #define ROOT_TGListBox
41 #ifndef ROOT_TGScrollBar
329 virtual void NewEntry(
const char *s =
"Entry");
372 virtual void Selected(
const char *txt) {
Emit(
"Selected(char*)", txt); }
FontStruct_t GetFontStruct() const
virtual Int_t GetNumberOfEntries() const
virtual void DrawCopy(Handle_t id, Int_t x, Int_t y)
Draw text listbox entry on window/pixmap.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a list box entry widget as a C++ statement(s) on output stream out.
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
virtual void AddEntry(TGString *s, Int_t id)
Add entry with specified string and id to listbox.
virtual void SetTopEntry(Int_t id=-1)
Scroll the entry with id to the top of the listbox.
virtual Int_t GetSelected() const
Return id of selected listbox item.
static TGGC * fgDefaultGC
virtual void Update(TGLBEntry *e)
virtual void SelectionChanged()
virtual ~TGLineLBEntry()
Delete line style listbox entry.
virtual void DoubleClicked(Int_t widgetId, Int_t id)
Emit DoubleClicked signal with list box id and entry id.
virtual void DoubleClicked(const char *txt)
virtual TGVScrollBar * GetVScrollbar() const
Return a pointer to vertical scroll bar.
TGTextLBEntry & operator=(const TGTextLBEntry &)
virtual void DrawCopy(Handle_t id, Int_t x, Int_t y)
Draw copy on window/pixmap.
TGLBContainer operator=(const TGLBContainer &)
const TGPicture * fPicture
static Pixel_t GetWhitePixel()
Get white pixel value.
virtual void Update(TGLBEntry *)
virtual TGDimension GetDefaultSize() const
Return default size of listbox widget.
TGLineLBEntry(const TGLineLBEntry &)
static const TGGC & GetDefaultGC()
Return default graphics context in use for a text listbox entry.
virtual void Associate(const TGWindow *w)
const TGPicture * GetPicture() const
virtual void SetPicture(const TGPicture *pic=0)
Change the icon of listbox entry containing icon & text.
virtual void RemoveEntry(Int_t id)
Remove the entry with specified id from the listbox container.
virtual TList * GetList() const
virtual void SetLayoutManager(TGLayoutManager *)
Set the layout manager for the composite frame.
TGTextLBEntry(const TGTextLBEntry &)
virtual void SetMultipleSelections(Bool_t multi=kTRUE)
virtual UInt_t GetDefaultWidth() const
virtual void Layout()
Layout container.
virtual void DoRedraw()
Redraw the frame.
virtual void Activate(Bool_t a)
Toggle active state of listbox entry.
virtual void DoRedraw()
redraw
virtual TGLBEntry * Select(Int_t id, Bool_t sel)
Select / deselect the entry with the specified id.
virtual void Toggle()
Toggle active state of listbox entry.
const TGWindow * fMsgWindow
virtual void DrawCopy(Handle_t id, Int_t x, Int_t y)
Draw copy on window/pixmap.
TGListBox operator=(const TGListBox &)
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Remove a range of entries defined by from_ID and to_ID.
TGIconLBEntry operator=(const TGIconLBEntry &)
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const
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 MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h)
Move and resize the listbox widget.
TGLineLBEntry operator=(const TGLineLBEntry &)
virtual void SetTitle(const char *text)
virtual ~TGTextLBEntry()
Delete text listbox entry.
TGListBox(const TGListBox &)
virtual ~TGListBox()
Delete a listbox widget.
#define ClassDef(name, id)
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual ~TGIconLBEntry()
Delete icon & text listbox entry.
virtual void Selected(Int_t widgetId, Int_t id)
Emit Selected signal with list box id and entry id.
virtual void InitListBox()
Initiate the internal classes of a list box.
void SetContainer(TGFrame *f)
TGLBContainer(const TGLBContainer &)
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
virtual void GetSelectedEntries(TList *selected)
Adds all selected entries (TGLBEntry) of the list box into the list selected.
virtual void Resize(TGDimension size)
Resize the frame.
TGLBEntry * GetSelectedEntry() const
virtual TGFrame * GetContainer() const
virtual void SortByName(Bool_t ascend=kTRUE)
Sort entries by name.
virtual void ActivateItem(TGFrameElement *el)
Activate item.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in listbox container.
void Emit(const char *signal)
Acitvate signal without args.
Style_t GetLineStyle() const
virtual TGLBEntry * Select(Int_t id, Bool_t sel=kTRUE)
virtual void SetVsbPosition(Int_t newPos)
Set new vertical scroll bar position.
virtual Int_t GetPos(Int_t id)
Returns the position in the list box of the entry id.
TGLBEntry(const TGWindow *p=0, Int_t id=-1, UInt_t options=kHorizontalFrame, Pixel_t back=GetWhitePixel())
virtual void AddEntry(TGLBEntry *lbe, TGLayoutHints *lhints)
Add listbox entry with hints to container.
virtual TGVScrollBar * GetVScrollbar() const
virtual void RemoveAll()
Remove all entries.
virtual void SetListBox(TGListBox *lb)
virtual void SetLineWidth(Int_t width)
Set or change line witdh in an entry.
TGIconLBEntry(const TGIconLBEntry &)
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click mouse event in the listbox container.
virtual Bool_t GetSelection(Int_t id)
Returns kTrue if entry id is selected.
virtual void GetSelectedEntries(TList *selected)
Adds all selected entries (TGLBEntry) of the list box into the list selected.
void SetContainer(TGFrame *f)
Add container frame to the viewport.
virtual void DoRedraw()
Redraw line style listbox entry.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void AddEntrySort(TGLBEntry *lbe, TGLayoutHints *lhints)
Insert listbox entry before the list box entry with a higher id.
virtual void AddEntrySort(TGString *s, Int_t id)
Add entry with specified string and id to listbox sorted by increasing id.
virtual Bool_t GetMultipleSelections() const
virtual Int_t GetSelected() const
Returns id of selected entry.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void Update(TGLBEntry *e)
Update line style listbox entry.
virtual void InsertEntry(TGLBEntry *lbe, TGLayoutHints *lhints, Int_t afterID)
Insert listbox entry after specified entry with id afterID.
virtual ~TGLBContainer()
Delete the listbox container.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages generated by the listbox container and forward messages to the listbox message handl...
virtual TGViewPort * GetViewPort() const
void SetText(TGString *new_text)
Set or change text in text entry.
virtual void DrawBorder()
Draw borders of the list box widget.
virtual Bool_t GetMultipleSelections() const
virtual Int_t GetLineWidth() const
virtual Int_t GetSize() const
virtual Bool_t GetSelection(Int_t id)
virtual void SetLineStyle(Style_t style)
Set the line style corresponding to the TPad line styles.
virtual void Selected(Int_t id)
GContext_t GetNormGC() const
TGListBox * GetListBox() const
virtual TGLBEntry * GetSelectedEntry() const
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void DoRedraw()
Redraw icon & text listbox entry.
virtual void NewEntry(const char *s="Entry")
method used to add entry via context menu
static const TGFont * fgDefaultFont
TGVScrollBar * fVScrollbar
virtual void Layout()
Layout the listbox components.
virtual void SetBackgroundColor(Pixel_t col)
Set background color (override from TGWindow base class).
virtual void Update(TGLBEntry *e)
Update icon & text listbox entry.
virtual void SetMultipleSelections(Bool_t multi)
Enables and disables multiple selections of entries.
virtual void DoubleClicked(Int_t id)
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Remove entries from from_ID to to_ID (including).
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in the listbox container.
virtual void IntegralHeight(Bool_t mode)
virtual void Selected(const char *txt)
TGFrame * GetContainer() const
const TGString * GetText() const
virtual void ChangeBackground(Pixel_t back)
Change background to all entries.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a list box widget as a C++ statement(s) on output stream out.
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use for a text listbox entry.
double norm(double *x, double *p)
virtual void OnAutoScroll()
Autoscroll while close to & beyond The Wall.
virtual void DoRedraw()
Redraw text listbox entry.
virtual void RemoveAll()
Remove all entries in this container.
virtual TGLBEntry * GetEntry(Int_t id) const
Returns list box entry with specified id.
virtual void RemoveEntry(Int_t id=-1)
remove entry with id.
UInt_t GetItemVsize() const
virtual TGScrollBar * GetScrollBar() const