118 int max_ascent, max_descent;
122 fTHeight = max_ascent + max_descent;
141 int max_ascent, max_descent;
177 int max_ascent, max_descent;
180 fTHeight = max_ascent + max_descent;
221 GetDefaultFontStruct(), options, back)
230 memcpy(gcv.
fDashes,
"\x5\x5", 3);
235 int max_ascent, max_descent;
240 max_ascent, max_descent);
241 fTHeight = max_ascent + max_descent;
274 static const char* dashed =
"\x3\x3";
275 static const char* dotted=
"\x1\x2";
276 static const char* dasheddotted =
"\x3\x4\x1\x4";
277 static const char* ls05 =
"\x5\x3\x1\x3";
278 static const char* ls06 =
"\x5\x3\x1\x3\x1\x3\x1\x3";
279 static const char* ls07 =
"\x5\x5";
280 static const char* ls08 =
"\x5\x3\x1\x3\x1\x3";
281 static const char* ls09 =
"\x20\x5";
282 static const char* ls10 =
"\x20\x10\x1\x10";
285 if (linestyle <= 1) {
372 GetDefaultFontStruct(), options, back)
374 int max_ascent, max_descent;
384 max_ascent, max_descent);
385 fTHeight = max_ascent + max_descent;
438 if (pic) ((
TGPicture *)pic)->AddReference();
447 virtual ~TGLBFrameElement() {}
459 const char *
t1 =
f1->GetText()->Data();
462 if ((d1 = atof(
t1)) && (d2 = atof(t2))) {
465 return strcmp(
t1, t2);
531 TGLBFrameElement *nw =
new TGLBFrameElement(lbe, lhints ? lhints :
fgDefaultHints);
552 if (
e->EntryId() == afterID)
break;
555 if (!el && afterID != -1) {
559 nw =
new TGLBFrameElement(lbe, lhints);
588 if (
e->EntryId() > lbe->
EntryId())
break;
595 nw =
new TGLBFrameElement(lbe, lhints);
621 if (
e->EntryId() ==
id) {
649 if ((
e->EntryId() >= from_ID) && (
e->EntryId() <= to_ID)) {
711 if (
f->EntryId() ==
id) {
746 if (
f->EntryId() ==
id)
747 return f->IsActive();
816 int xf0, yf0, xff, yff;
837 if (newpos < 0) newpos = 0;
859 xff = xf0 +
f->GetWidth();
860 yff = yf0 +
f->GetHeight();
863 (
x > xf0) && (
x < xff) && (
y > yf0) && (
y < yff);
889 xff = xf0 +
f->GetWidth();
890 yff = yf0 +
f->GetHeight();
893 (
x > xf0) && (
x < xff) && (
y > yf0) && (
y < yff) && !
f->IsActive();
947 int xf0, yf0, xff, yff;
952 if ((now-was) < 50)
return kFALSE;
979 xff = xf0 +
f->GetWidth();
980 yff = yf0 +
f->GetHeight();
982 (
x > xf0) && (
x < xff) && (
y > yf0) && (
y < yff);
1001 xff = xf0 +
f->GetWidth();
1002 yff = yf0 +
f->GetHeight();
1005 (
x > xf0) && (
x < xff) && (
y > yf0) && (
y < yff) && !
f->IsActive();
1043 if (vb &&
y > 0 &&
y < 10) {
1046 if (newpos < 0) newpos = 0;
1062 yff = yf0 +
f->GetHeight();
1063 if ((
y + pos.
fY > yf0) && (
y + pos.
fY < yff)) {
1099 if (
f->EntryId() ==
id)
1194 if (
gClient->GetStyle() > 1)
break;
1482 if ((
Int_t) cw < 0) {
1483 Warning(
"Layout",
"width would become too small, setting to 10");
1494 container->
Resize(cw, tch);
1625 Emit(
"Selected(Int_t,Int_t)", args);
1638 Emit(
"DoubleClicked(Int_t,Int_t)", args);
1663 out << std::endl <<
" // list box" << std::endl;
1665 out<<
" TGListBox *";
1671 out <<
");" << std::endl;
1673 out <<
"," <<
fWidgetId <<
");" << std::endl;
1681 if (option && strstr(option,
"keep_names"))
1682 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
1690 out <<
" " <<
GetName() <<
"->AddEntry(";
1692 out <<
");"<< std::endl;
1695 <<
");" << std::endl;
1707 out << quote << content << quote <<
"," <<
EntryId();
const Mask_t kGCLineStyle
const Mask_t kGCLineWidth
const Mask_t kButtonMotionMask
const Mask_t kButtonPressMask
const Mask_t kGCFillStyle
const Mask_t kPointerMotionMask
const Mask_t kButtonReleaseMask
include TDocParser_001 C image html pict1_TDocParser_001 png width
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.
TGLayoutManager * fLayoutManager
virtual TList * GetList() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual Int_t MustCleanup() const
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
static TGLayoutHints * fgDefaultHints
virtual void ActivateItem(TGFrameElement *el)
Activate item.
virtual void ClearViewPort()
Clear view port and redraw full content.
const TGWindow * fMsgWindow
virtual void DoRedraw()
Redraw content of container in the viewport region.
virtual TGDimension GetPageDimension() const
Returns page dimension.
virtual void Layout()
Layout container entries.
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click mouse event.
virtual void DoubleClicked(TGFrame *f, Int_t btn)
Emit DoubleClicked() signal.
virtual TGPosition GetPagePosition() const
Returns page position.
TGFrameElement * fLastActiveEl
FontStruct_t GetFontStruct() const
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
virtual void DoRedraw()
Redraw the frame.
static const TGGC & GetBlackGC()
Get black graphics context.
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.
virtual UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
virtual void DrawBorder()
Draw frame border.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
static Pixel_t fgDefaultSelectedBackground
virtual void Activate(Bool_t)
virtual Pixel_t GetForeground() const
Return frame foreground color.
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
static const TGGC & GetShadowGC()
Get shadow color graphics context.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
virtual void SetWidth(UInt_t w)
virtual void MapWindow()
map window
static Pixel_t fgWhitePixel
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
virtual void SetHeight(UInt_t h)
static const TGGC & GetBckgndGC()
Get background color graphics context.
virtual void UnmapWindow()
unmap window
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).
virtual void DoRedraw()
Redraw icon & text listbox entry.
virtual void SetPicture(const TGPicture *pic=0)
Change the icon of listbox entry containing icon & text.
virtual ~TGIconLBEntry()
Delete icon & text listbox entry.
TGIconLBEntry(const TGIconLBEntry &)
virtual void Update(TGLBEntry *e)
Update icon & text listbox entry.
const TGPicture * fPicture
virtual void DrawCopy(Handle_t id, Int_t x, Int_t y)
Draw copy on window/pixmap.
virtual void RemoveAll()
Remove all entries in this container.
virtual Bool_t GetSelection(Int_t id)
Returns kTrue if entry id is selected.
virtual void Layout()
Layout container.
virtual void SetListBox(TGListBox *lb)
virtual void OnAutoScroll()
Autoscroll while close to & beyond The Wall.
TGLBContainer(const TGLBContainer &)
virtual Int_t GetSelected() const
Returns id of selected entry.
virtual void ActivateItem(TGFrameElement *el)
Activate item.
virtual Bool_t GetMultipleSelections() const
virtual ~TGLBContainer()
Delete the listbox container.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in listbox container.
virtual TGLBEntry * Select(Int_t id, Bool_t sel)
Select / deselect the entry with the specified id.
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Remove entries from from_ID to to_ID (including).
virtual void Associate(const TGWindow *w)
virtual void AddEntry(TGLBEntry *lbe, TGLayoutHints *lhints)
Add listbox entry with hints to container.
virtual TGVScrollBar * GetVScrollbar() const
Return a pointer to vertical scroll bar.
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 SetVsbPosition(Int_t newPos)
Set new vertical scroll bar position.
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.
virtual void DoRedraw()
redraw
virtual void SetMultipleSelections(Bool_t multi)
Enables and disables multiple selections of entries.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in the listbox container.
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click mouse event in the listbox container.
virtual void SetBackgroundColor(Pixel_t col)
Set background color (override from TGWindow base class).
virtual void Activate(Bool_t a)
Toggle active state of listbox entry.
virtual void Toggle()
Toggle active state of listbox entry.
virtual void DoRedraw()
Redraw the frame.
TGLBEntry(const TGWindow *p=0, Int_t id=-1, UInt_t options=kHorizontalFrame, Pixel_t back=GetWhitePixel())
Base class entry constructor.
virtual void DoRedraw()
Redraw line style listbox entry.
TGLineLBEntry(const TGLineLBEntry &)
virtual ~TGLineLBEntry()
Delete line style listbox entry.
virtual void SetLineWidth(Int_t width)
Set or change line witdh in an entry.
virtual void DrawCopy(Handle_t id, Int_t x, Int_t y)
Draw copy on window/pixmap.
virtual void SetLineStyle(Style_t style)
Set the line style corresponding to the TPad line styles.
virtual void Update(TGLBEntry *e)
Update line style listbox entry.
virtual void InitListBox()
Initiate the internal classes of a list box.
virtual void AddEntrySort(TGString *s, Int_t id)
Add entry with specified string and id to listbox sorted by increasing id.
virtual ~TGListBox()
Delete a listbox widget.
virtual void SortByName(Bool_t ascend=kTRUE)
Sort entries by name.
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
virtual TGVScrollBar * GetVScrollbar() const
virtual Int_t GetNumberOfEntries() const
virtual TGDimension GetDefaultSize() const
Return default size of listbox widget.
virtual void DrawBorder()
Draw borders of the list box widget.
virtual TGLBEntry * GetSelectedEntry() const
virtual void RemoveEntry(Int_t id=-1)
remove entry with id.
TGListBox(const TGListBox &)
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 SetTopEntry(Int_t id=-1)
Scroll the entry with id to the top of the listbox.
virtual void AddEntry(TGString *s, Int_t id)
Add entry with specified string and id to listbox.
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 MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h)
Move and resize the listbox widget.
virtual void RemoveAll()
Remove all entries.
virtual void SelectionChanged()
virtual Bool_t GetMultipleSelections() const
void SetContainer(TGFrame *f)
TGVScrollBar * fVScrollbar
virtual void ChangeBackground(Pixel_t back)
Change background to all entries.
virtual TGLBEntry * GetEntry(Int_t id) const
Returns list box entry with specified id.
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
virtual TGFrame * GetContainer() const
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a list box widget as a C++ statement(s) on output stream out.
virtual void Layout()
Layout the listbox components.
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.
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
virtual void Selected(Int_t widgetId, Int_t id)
Emit Selected signal with list box id and entry id.
void Draw(Option_t *="")
Default Draw method for all objects.
Pixel_t GetBlackColor() const
Pixel_t GetSelectedFgndColor() const
const char * GetString() const
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
const TGString * GetText() const
static const TGFont * fgDefaultFont
TGTextLBEntry(const TGTextLBEntry &)
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a list box entry widget as a C++ statement(s) on output stream out.
virtual const char * GetTitle() const
Returns title of object.
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use for a text listbox entry.
virtual ~TGTextLBEntry()
Delete text listbox entry.
virtual void Update(TGLBEntry *e)
static const TGGC & GetDefaultGC()
Return default graphics context in use for a text listbox entry.
virtual void DoRedraw()
Redraw text listbox entry.
static TGGC * fgDefaultGC
virtual void DrawCopy(Handle_t id, Int_t x, Int_t y)
Draw text listbox entry on window/pixmap.
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.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void SetEditDisabled(UInt_t on=kEditDisable)
const TGWindow * GetParent() const
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
virtual void Add(TObject *obj)
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
virtual void AddAfter(const TObject *after, TObject *obj)
Insert object after object after in the list.
virtual void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual void Sort(Bool_t order=kSortAscending)
Sort linked list.
Mother of all ROOT objects.
virtual Bool_t IsSortable() const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual const char * GetTitle() const
Returns title of object.
virtual Int_t Compare(const TObject *obj) const
Compare abstract method.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
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.
static constexpr double s
Short_t Max(Short_t a, Short_t b)
Double_t Ceil(Double_t x)