239 GetDefaultFontStruct(), options, back)
292 static const char*
dashed =
"\x3\x3";
293 static const char*
dotted=
"\x1\x2";
295 static const char*
ls05 =
"\x5\x3\x1\x3";
296 static const char*
ls06 =
"\x5\x3\x1\x3\x1\x3\x1\x3";
297 static const char*
ls07 =
"\x5\x5";
298 static const char*
ls08 =
"\x5\x3\x1\x3\x1\x3";
299 static const char*
ls09 =
"\x20\x5";
300 static const char*
ls10 =
"\x20\x10\x1\x10";
383 GetDefaultFontStruct(), options, back)
471 const char *
t1 =
f1->GetText()->Data();
474 if ((
d1 = atof(
t1)) && (
d2 = atof(
t2))) {
592 if (
e->EntryId() >
lbe->EntryId())
break;
625 if (
e->EntryId() ==
id) {
716 if (
f->EntryId() ==
id) {
751 if (
f->EntryId() ==
id)
752 return f->IsActive();
811 if (
vb &&
vb->IsMapped()) {
1048 if (
vb &&
y > 0 &&
y < 10) {
1104 if (
f->EntryId() ==
id)
1186 if (
gClient->GetStyle() > 1)
break;
1380 if (
lbe->EntryId() ==
id)
return lbe;
1471 if (
container->GetDefaultHeight() > ch) {
1474 if ((
Int_t) cw < 0) {
1475 Warning(
"Layout",
"width would become too small, setting to 10");
1519 return ct->GetSelected();
1543 lbe->SetBackgroundColor(back);
1617 Emit(
"Selected(Int_t,Int_t)", args);
1630 Emit(
"DoubleClicked(Int_t,Int_t)", args);
1655 out << std::endl <<
" // list box" << std::endl;
1657 out<<
" TGListBox *";
1663 out <<
");" << std::endl;
1665 out <<
"," <<
fWidgetId <<
");" << std::endl;
1674 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
1682 out <<
" " <<
GetName() <<
"->AddEntry(";
1683 el->fFrame->SavePrimitive(out,
option);
1684 out <<
");"<< std::endl;
1687 <<
");" << std::endl;
1696 content.ReplaceAll(
'\',
"\\");
1697 content.ReplaceAll(
"\"",
"\\"");
const Mask_t kGCLineStyle
const Mask_t kGCLineWidth
const Mask_t kButtonMotionMask
const Mask_t kButtonPressMask
const Mask_t kGCFillStyle
Handle_t Window_t
Window handle.
Handle_t GContext_t
Graphics context handle.
const Mask_t kPointerMotionMask
const Mask_t kButtonReleaseMask
ULong_t Pixel_t
Pixel value.
ULongptr_t Handle_t
Generic resource handle.
Handle_t FontStruct_t
Pointer to font structure.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char text
R__EXTERN TSystem * gSystem
Bool_t IsEditable() const
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get graphics context from the gc pool.
void FreeGC(const TGGC *gc)
Free a graphics context.
const TGResourcePool * GetResourcePool() const
void FreePicture(const TGPicture *pic)
Free picture resource.
The base class for composite widgets (menu bars, list boxes, etc.).
TGLayoutManager * fLayoutManager
layout manager
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual TList * GetList() const
Int_t MustCleanup() const override
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Bool_t fMapSubwindows
kTRUE - map subwindows
TList * fList
container of frame elements
static TGLayoutHints * fgDefaultHints
void SetEditDisabled(UInt_t on=1) override
Set edit disable flag for this frame and subframes.
virtual void ActivateItem(TGFrameElement *el)
Activate item.
TTimer * fScrollTimer
autoscroll timer
Bool_t HandleDoubleClick(Event_t *event) override
Handle double click mouse event.
virtual void ClearViewPort()
Clear view port and redraw full content.
const TGWindow * fMsgWindow
window handling container messages
void Layout() override
Layout container entries.
void DoRedraw() override
Redraw content of container in the viewport region.
Bool_t fScrolling
kTRUE - when scrolling is ON
virtual TGDimension GetPageDimension() const
Returns page dimension.
TGViewPort * fViewPort
container viewport
virtual void DoubleClicked(TGFrame *f, Int_t btn)
Emit DoubleClicked() signal.
virtual TGPosition GetPagePosition() const
Returns page position.
TGFrameElement * fLastActiveEl
last active item
Encapsulate fonts used in the GUI system.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0) override
Move and/or resize the frame.
static const TGGC & GetBlackGC()
Get black graphics context.
UInt_t fOptions
frame options
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
static Pixel_t GetWhitePixel()
Get white pixel value.
UInt_t fHeight
frame height
virtual UInt_t GetDefaultWidth() const
virtual void DrawBorder()
Draw frame border.
Int_t fBorderWidth
frame border width
static Pixel_t fgDefaultSelectedBackground
virtual void Activate(Bool_t)
void DoRedraw() override
Redraw the frame.
void MapWindow() override
map window
virtual Pixel_t GetForeground() const
Return frame foreground color.
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
void UnmapWindow() override
unmap window
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
static const TGGC & GetShadowGC()
Get shadow color graphics context.
static Pixel_t fgWhitePixel
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Pixel_t fBackground
frame background color
static const TGGC & GetBckgndGC()
Get background color graphics context.
Encapsulate a graphics context used in the low level graphics.
void SetLineWidth(Int_t v)
Set line width.
void SetCapStyle(Int_t v)
Set cap style (kCapNotLast, kCapButt, kCapRound, kCapProjecting).
void SetDashList(const char v[], Int_t len)
Set dash pattern. First use SetDashOffset() if not 0.
void SetLineStyle(Int_t v)
Set line style (kLineSolid, kLineOnOffDash, kLineDoubleDash).
void DoRedraw() override
Redraw icon & text listbox entry.
~TGIconLBEntry() override
Delete icon & text listbox entry.
virtual void SetPicture(const TGPicture *pic=nullptr)
Change the icon of listbox entry containing icon & text.
void DrawCopy(Handle_t id, Int_t x, Int_t y) override
Draw copy on window/pixmap.
TGIconLBEntry(const TGIconLBEntry &)=delete
const TGPicture * fPicture
void Update(TGLBEntry *e) override
Update icon & text listbox entry.
A Composite frame that contains a list of TGLBEnties.
TGLBContainer(const TGLBContainer &)=delete
Bool_t fMultiSelect
true if multi selection is switched on
virtual Bool_t GetSelection(Int_t id)
Returns kTrue if entry id is selected.
void OnAutoScroll() override
Autoscroll while close to & beyond The Wall.
virtual void SetListBox(TGListBox *lb)
void RemoveAll() override
Remove all entries in this container.
void SetVsbPosition(Int_t newPos) override
Set new vertical scroll bar position.
TGVScrollBar * GetVScrollbar() const override
Return a pointer to vertical scroll bar.
Int_t fChangeStatus
defines the changes (select or unselect) while the mouse moves over a multi selectable list box
virtual Int_t GetSelected() const
Returns id of selected entry.
Bool_t HandleButton(Event_t *event) override
Handle mouse button event in the listbox container.
virtual Bool_t GetMultipleSelections() const
void Layout() override
Layout container.
void ActivateItem(TGFrameElement *el) override
Activate item.
virtual TGLBEntry * Select(Int_t id, Bool_t sel)
Select / deselect the entry with the specified id.
TGLBEntry * fLastActive
last active listbox entry in single selection listbox
Bool_t HandleDoubleClick(Event_t *event) override
Handle double click mouse event in the listbox container.
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Remove entries from from_ID to to_ID (including).
TGListBox * fListBox
list box which contains this container
virtual void AddEntry(TGLBEntry *lbe, TGLayoutHints *lhints)
Add listbox entry with hints to container.
virtual Int_t GetPos(Int_t id)
Returns the position in the list box of the entry id.
virtual void AddEntrySort(TGLBEntry *lbe, TGLayoutHints *lhints)
Insert listbox entry before the list box entry with a higher id.
virtual void InsertEntry(TGLBEntry *lbe, TGLayoutHints *lhints, Int_t afterID)
Insert listbox entry after specified entry with id afterID.
virtual void RemoveEntry(Int_t id)
Remove the entry with specified id from the listbox container.
virtual void GetSelectedEntries(TList *selected)
Adds all selected entries (TGLBEntry) of the list box into the list selected.
void DoRedraw() override
redraw
void Associate(const TGWindow *w) override
~TGLBContainer() override
Delete the listbox container.
Bool_t HandleMotion(Event_t *event) override
Handle mouse motion event in listbox container.
virtual void SetMultipleSelections(Bool_t multi)
Enables and disables multiple selections of entries.
Pixel_t fBkcolor
entry background color
Int_t fEntryId
message id of listbox entry
void DoRedraw() override
Redraw the frame.
virtual void Toggle()
Toggle active state of listbox entry.
Bool_t fActive
true if entry is active
TGLBEntry(const TGWindow *p=nullptr, Int_t id=-1, UInt_t options=kHorizontalFrame, Pixel_t back=GetWhitePixel())
Base class entry constructor.
void Activate(Bool_t a) override
Toggle active state of listbox entry.
TGLBFrameElement(TGFrame *f, TGLayoutHints *l)
Int_t Compare(const TObject *obj) const override
Compare abstract method.
~TGLBFrameElement() override
Bool_t IsSortable() const override
This class describes layout hints used by the layout classes.
Line style and width listbox entries.
Style_t fLineStyle
line style
TGGC * fLineGC
line graphics context
UInt_t fLineLength
line length
UInt_t fLineWidth
line width
void DrawCopy(Handle_t id, Int_t x, Int_t y) override
Draw copy on window/pixmap.
void DoRedraw() override
Redraw line style listbox entry.
void Update(TGLBEntry *e) override
Update line style listbox entry.
virtual void SetLineWidth(Int_t width)
Set or change line width in an entry.
virtual void SetLineStyle(Style_t style)
Set the line style corresponding to the TPad line styles.
~TGLineLBEntry() override
Delete line style listbox entry.
TGLineLBEntry(const TGLineLBEntry &)=delete
A listbox is a box, possibly with scrollbar, containing entries.
virtual void InitListBox()
Initiate the internal classes of a list box.
Bool_t fIntegralHeight
true if height should be multiple of fItemVsize
virtual void AddEntrySort(TGString *s, Int_t id)
Add entry with specified string and id to listbox sorted by increasing id.
TGListBox(const TGListBox &)=delete
virtual void SortByName(Bool_t ascend=kTRUE)
Sort entries by name.
virtual TGVScrollBar * GetVScrollbar() const
TGViewPort * fVport
listbox viewport (see TGCanvas.h)
UInt_t fItemVsize
maximum height of single entry
TGDimension GetDefaultSize() const override
Return default size of listbox widget.
virtual Int_t GetNumberOfEntries() const
TGLBContainer * fLbc
listbox container
virtual TGLBEntry * GetSelectedEntry() const
virtual void RemoveEntry(Int_t id=-1)
remove entry with id.
virtual void NewEntry(const char *s="Entry")
method used to add entry via context menu
void Resize(UInt_t w, UInt_t h) override
Resize the listbox widget.
virtual Int_t GetSelected() const
Return id of selected listbox item.
~TGListBox() override
Delete a listbox widget.
void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h) override
Move and resize the listbox widget.
virtual void SetTopEntry(Int_t id=-1)
Scroll the entry with id to the top of the listbox.
void ChangeBackground(Pixel_t back) override
Change background to all entries.
virtual void AddEntry(TGString *s, Int_t id)
Add entry with specified string and id to listbox.
void Layout() override
Layout the listbox components.
virtual void DoubleClicked(Int_t widgetId, Int_t id)
Emit DoubleClicked signal with list box id and entry id.
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 SelectionChanged()
virtual Bool_t GetMultipleSelections() const
void SetContainer(TGFrame *f)
TGVScrollBar * fVScrollbar
vertical scrollbar
void DrawBorder() override
Draw borders of the list box widget.
virtual TGLBEntry * GetEntry(Int_t id) const
Returns list box entry with specified id.
virtual TGViewPort * GetViewPort() const
virtual TGFrame * GetContainer() const
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a list box widget as a C++ statement(s) on output stream out.
virtual void GetSelectedEntries(TList *selected)
Adds all selected entries (TGLBEntry) of the list box into the list selected.
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Remove a range of entries defined by from_ID and to_ID.
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override
Process messages generated by the listbox container and forward messages to the listbox message handl...
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
void RemoveAll() override
Remove all entries.
virtual void Selected(Int_t widgetId, Int_t id)
Emit Selected signal with list box id and entry id.
TGClient * fClient
Connection to display server.
Handle_t fId
X11/Win32 Window identifier.
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...
const char * GetString() const
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
Text string listbox entries.
Bool_t fTextChanged
true if text has been changed
const TGString * GetText() const
GContext_t fNormGC
text drawing graphics context
static const TGFont * fgDefaultFont
void DoRedraw() override
Redraw text listbox entry.
void SavePrimitive(std::ostream &out, Option_t *="") override
Save a list box entry widget as a C++ statement(s) on output stream out.
void DrawCopy(Handle_t id, Int_t x, Int_t y) override
Draw text listbox entry on window/pixmap.
const char * GetTitle() const override
Returns title of object.
UInt_t fTHeight
text height
~TGTextLBEntry() override
Delete text listbox entry.
TGString * fText
entry text string
void Update(TGLBEntry *e) override
FontStruct_t fFontStruct
font used to draw string
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use for a text listbox entry.
static const TGGC & GetDefaultGC()
Return default graphics context in use for a text listbox entry.
TGTextLBEntry(const TGTextLBEntry &)=delete
static TGGC * fgDefaultGC
void SetText(TGString *new_text)
Set or change text in text entry.
TGFrame * GetContainer() const
virtual void SetVPos(Int_t ypos)
Moves content of container frame in vertical direction.
ROOT GUI Window base class.
virtual void SetEditDisabled(UInt_t on=kEditDisable)
const TGWindow * fParent
Parent window.
@ kEditDisableLayout
window layout cannot be edited
@ kEditDisableBtnEnable
window can handle mouse button events
@ kEditDisableGrab
window grab cannot be edited
@ kEditDisable
disable edit of this window
@ kEditDisableKeyEnable
window can handle keyboard events
virtual void DestroyWindow()
destroy window
virtual void SetWindowName(const char *name=nullptr)
Set window name.
const TGWindow * GetParent() const
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
UInt_t fEditDisabled
flags used for "guibuilding"
void AddAfter(const TObject *after, TObject *obj) override
Insert object after object after in the list.
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
void AddBefore(const TObject *before, TObject *obj) override
Insert object before object before in the list.
void AddFirst(TObject *obj) override
Add object at the beginning of the list.
Mother of all ROOT objects.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
virtual TTimer * RemoveTimer(TTimer *t)
Remove timer from list of system timers.
void Reset()
Reset the timer.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Ceil(Double_t x)
Rounds x upward, returning the smallest integral value that is not less than x.
EGEventType fType
of event (see EGEventType)
Int_t fY
pointer x, y coordinates in event window
UInt_t fCode
key or button code
Longptr_t fUser[5]
5 longs can be used by client message events NOTE: only [0], [1] and [2] may be used.
Graphics context structure.