Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGListBox.cxx
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Fons Rademakers 12/01/98
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11/**************************************************************************
12
13 This source is based on Xclass95, a Win95-looking GUI toolkit.
14 Copyright (C) 1996, 1997 David Barth, Ricky Ralston, Hector Peraza.
15
16 Xclass95 is free software; you can redistribute it and/or
17 modify it under the terms of the GNU Library General Public
18 License as published by the Free Software Foundation; either
19 version 2 of the License, or (at your option) any later version.
20
21**************************************************************************/
22
23
24/** \class TGListBox
25 \ingroup guiwidgets
26
27A listbox is a box, possibly with scrollbar, containing entries.
28Currently entries are simple text strings (TGTextLBEntry).
29A TGListBox looks a lot like a TGCanvas. It has a TGViewPort
30containing a TGLBContainer which contains the entries and it also
31has a vertical scrollbar which becomes visible if there are more
32items than fit in the visible part of the container.
33
34The TGListBox is user callable. The other classes are service
35classes of the listbox.
36
37A listbox contains a container frame which is viewed through a
38viewport. If the container is larger than the viewport than a
39vertical scrollbar is added.
40
41Selecting an item in the listbox will generate the event:
42 - kC_COMMAND, kCM_LISTBOX, listbox id, item id.
43
44\class TGLBEntry
45\ingroup guiwidgets
46
47Basic listbox entries.
48Listbox entries are created by a TGListBox and not by the user.
49
50\class TGTextLBEntry
51\ingroup guiwidgets
52
53Text string listbox entries.
54A TGTextLBEntry is for TGListBox internal use.
55
56\class TGLineLBEntry
57\ingroup guiwidgets
58
59Line style and width listbox entries.
60Line example and width number
61
62\class TGIconLBEntry
63\ingroup guiwidgets
64
65Icon + text listbox entry.
66
67\class TGLBContainer
68\ingroup guiwidgets
69
70A Composite frame that contains a list of TGLBEnties.
71A TGLBContainer is for TGListBox internal use.
72
73*/
74
75
76#include "TGPicture.h"
77#include "TGListBox.h"
78#include "TGResourcePool.h"
79#include "TSystem.h"
80#include "TMath.h"
81#include "TVirtualX.h"
82
83#include <cstdlib>
84#include <iostream>
85
86
89
95
96////////////////////////////////////////////////////////////////////////////////
97/// Base class entry constructor.
98
99TGLBEntry::TGLBEntry(const TGWindow *p, Int_t id, UInt_t options, Pixel_t back) :
100 TGFrame(p, 10, 10, options | kOwnBackground, back)
101{
102 fActive = kFALSE;
103 fEntryId = id;
104 fBkcolor = back;
106
108}
109
110////////////////////////////////////////////////////////////////////////////////
111/// Toggle active state of listbox entry.
112
114{
115 if (fActive == a) return;
116 fActive = a;
117 DoRedraw();
118}
119
120////////////////////////////////////////////////////////////////////////////////
121/// Toggle active state of listbox entry.
122
124{
125 fActive = !fActive;
126 DoRedraw();
127}
128
129
130////////////////////////////////////////////////////////////////////////////////
131/// Create a text listbox entry. The TGString is adopted.
132
134 GContext_t norm, FontStruct_t font, UInt_t options, ULong_t back) :
135 TGLBEntry(p, id, options, back)
136{
137 fText = s;
139 fFontStruct = font;
140 fNormGC = norm;
141 fTWidth = 0;
142
143 int max_ascent, max_descent;
144
145 if (fText) fTWidth = gVirtualX->TextWidth(fFontStruct, fText->GetString(), fText->GetLength());
146 gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);
147 fTHeight = max_ascent + max_descent;
148 Resize(fTWidth, fTHeight + 1);
151}
152
153////////////////////////////////////////////////////////////////////////////////
154/// Delete text listbox entry.
155
157{
158 if (fText) delete fText;
159}
160
161////////////////////////////////////////////////////////////////////////////////
162/// Draw text listbox entry on window/pixmap.
163
165{
166 int max_ascent, max_descent;
167
168 y += (fHeight - fTHeight) >> 1;
169
170 gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);
171
172 if (fActive) {
174 gVirtualX->FillRectangle(id,fNormGC, x, y, fWidth, fHeight);
176 fText->Draw(id, fNormGC, x + 3, y + max_ascent);
177 } else {
178 gVirtualX->SetForeground(fNormGC, fBkcolor);
179 gVirtualX->FillRectangle(id, fNormGC, x, y, fWidth, fHeight);
180 gVirtualX->SetForeground(fNormGC, GetForeground());
181 fText->Draw(id, fNormGC, x + 3, y + max_ascent);
182 }
183}
184
185////////////////////////////////////////////////////////////////////////////////
186/// Redraw text listbox entry.
187
189{
190 if (fId) DrawCopy(fId, 0, 0);
191}
192
193////////////////////////////////////////////////////////////////////////////////
194/// Set or change text in text entry.
195
197{
198 if (fText) delete fText;
199 fText = new_text;
201
202 int max_ascent, max_descent;
204 gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);
205 fTHeight = max_ascent + max_descent;
206
207 Resize(fTWidth + 3, fTHeight + 1);
208
209 DoRedraw();
210}
211
212////////////////////////////////////////////////////////////////////////////////
213/// Return default font structure in use for a text listbox entry.
214
216{
217 if (!fgDefaultFont)
218 fgDefaultFont = gClient->GetResourcePool()->GetDefaultFont();
220}
221
222////////////////////////////////////////////////////////////////////////////////
223/// Return default graphics context in use for a text listbox entry.
224
226{
227 if (!fgDefaultGC)
228 fgDefaultGC = new TGGC(*gClient->GetResourcePool()->GetFrameGC());
229 return *fgDefaultGC;
230}
231
232
233////////////////////////////////////////////////////////////////////////////////
234/// Create the line style listbox entry.
235
236TGLineLBEntry::TGLineLBEntry(const TGWindow *p, Int_t id, const char *str,
237 UInt_t w, Style_t style, UInt_t options, ULong_t back) :
238 TGTextLBEntry(p, new TGString(str), id, GetDefaultGC()(),
239 GetDefaultFontStruct(), options, back)
240{
241 GCValues_t gcv;
242
244 fLineWidth = gcv.fLineWidth = w;
246 gcv.fDashLen = 2;
247 gcv.fDashOffset = 0;
248 memcpy(gcv.fDashes, "\x5\x5", 3);
250 fLineGC = fClient->GetGC(&gcv, kTRUE);
252
253 int max_ascent, max_descent;
254
255 fTWidth = gVirtualX->TextWidth(GetDefaultFontStruct(), "8", 1);
256 fTWidth += 15; // for drawing
257 gVirtualX->GetFontProperties(GetDefaultFontStruct(),
258 max_ascent, max_descent);
259 fTHeight = max_ascent + max_descent;
260 fLineLength = 0;
261
262 Resize(fTWidth, fTHeight + 1);
265}
266
267////////////////////////////////////////////////////////////////////////////////
268/// Delete line style listbox entry.
269
271{
273}
274
275////////////////////////////////////////////////////////////////////////////////
276/// Update line style listbox entry.
277
279{
281
283 fLineGC = ((TGLineLBEntry *)e)->GetLineGC();
285}
286
287////////////////////////////////////////////////////////////////////////////////
288/// Set the line style corresponding to the TPad line styles.
289
291{
292 static const char* dashed = "\x3\x3";
293 static const char* dotted= "\x1\x2";
294 static const char* dasheddotted = "\x3\x4\x1\x4";
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";
301
302
303 if (linestyle <= 1) {
305 } else {
306 switch (linestyle) {
307 case 2:
308 fLineGC->SetDashList(dashed, 2);
309 break;
310 case 3:
311 fLineGC->SetDashList(dotted, 2);
312 break;
313 case 4:
314 fLineGC->SetDashList(dasheddotted, 4);
315 break;
316 case 5:
317 fLineGC->SetDashList(ls05, 4);
318 break;
319 case 6:
320 fLineGC->SetDashList(ls06, 8);
321 break;
322 case 7:
323 fLineGC->SetDashList(ls07, 2);
324 break;
325 case 8:
326 fLineGC->SetDashList(ls08, 6);
327 break;
328 case 9:
329 fLineGC->SetDashList(ls09, 2);
330 break;
331 case 10:
332 fLineGC->SetDashList(ls10, 4);
333 break;
334 }
335 }
336 fLineGC->SetCapStyle(0); // flat cap
337 fLineStyle = linestyle;
338}
339
340////////////////////////////////////////////////////////////////////////////////
341/// Set or change line width in an entry.
342
344{
347}
348
349////////////////////////////////////////////////////////////////////////////////
350/// Draw copy on window/pixmap.
351
353{
355 if (!strcmp(TGTextLBEntry::GetTitle(),"None")) return;
356 if (fActive) {
357 gVirtualX->SetForeground(fLineGC->GetGC(),
359 } else {
360 gVirtualX->SetForeground(fLineGC->GetGC(),
362 }
363 gVirtualX->DrawLine(id, fLineGC->GetGC(), x + fTWidth + 5, y + fHeight/2,
364 x + fWidth - 5, y + fHeight/2);
365}
366
367////////////////////////////////////////////////////////////////////////////////
368/// Redraw line style listbox entry.
369
371{
372 if (fId) DrawCopy(fId, 0, 0);
373}
374
375
376////////////////////////////////////////////////////////////////////////////////
377/// Create the icon & text listbox entry.
378
379TGIconLBEntry::TGIconLBEntry(const TGWindow *p, Int_t id, const char *str,
380 const TGPicture *pic,
381 UInt_t /*w*/, Style_t /*style*/, UInt_t options, ULong_t back) :
382 TGTextLBEntry(p, new TGString(str), id, GetDefaultGC()(),
383 GetDefaultFontStruct(), options, back)
384{
385 int max_ascent, max_descent;
386
387 fPicture = pic;
388 if (fPicture) {
389 fTWidth += fPicture->GetWidth() + 4;
390 ((TGPicture *)fPicture)->AddReference();
391 }
392 else
393 fTWidth += 20;
394 gVirtualX->GetFontProperties(GetDefaultFontStruct(),
395 max_ascent, max_descent);
396 fTHeight = max_ascent + max_descent;
399
400 Resize(fTWidth, fTHeight + 1);
403}
404
405////////////////////////////////////////////////////////////////////////////////
406/// Delete icon & text listbox entry.
407
409{
411}
412
413////////////////////////////////////////////////////////////////////////////////
414/// Update icon & text listbox entry.
415
417{
419}
420
421////////////////////////////////////////////////////////////////////////////////
422/// Draw copy on window/pixmap.
423
425{
426 Int_t off_x = 0;
427 if (fPicture) {
428 fPicture->Draw(id, fNormGC, x + 2, y);
429 off_x = fPicture->GetWidth() + 4;
430 }
431 TGTextLBEntry::DrawCopy(id, x + off_x, y);
432}
433
434////////////////////////////////////////////////////////////////////////////////
435/// Redraw icon & text listbox entry.
436
438{
439 if (fId) DrawCopy(fId, 0, 0);
440}
441
442////////////////////////////////////////////////////////////////////////////////
443/// Change the icon of listbox entry containing icon & text.
444
446{
448
449 if (pic) ((TGPicture *)pic)->AddReference();
450
451 fPicture = pic;
452}
453
454/////////////////////////////////////////////////////////////////////////////////
456public:
458 virtual ~TGLBFrameElement() {}
459
460 Bool_t IsSortable() const { return kTRUE; }
461 Int_t Compare(const TObject *obj) const {
462 if (!fFrame->InheritsFrom(TGTextLBEntry::Class())) {
463 return 0;
464 }
467
468
469 double d1, d2;
470 const char *t1 = f1->GetText()->Data();
471 const char *t2 = f2->GetText()->Data();
472
473 if ((d1 = atof(t1)) && (d2 = atof(t2))) {
474 return (d1 > d2);
475 } else {
476 return strcmp(t1, t2);
477 }
478 return 0;
479 }
480};
481
482
483////////////////////////////////////////////////////////////////////////////////
484/// Create a listbox container.
485
487 UInt_t options, ULong_t back) :
488 TGContainer(p, w, h, options, back)
489{
490 fLastActive = 0;
491 fMsgWindow = p;
494 fListBox = 0;
495
498}
499
500////////////////////////////////////////////////////////////////////////////////
501/// Delete the listbox container.
502
504{
505 Cleanup();
506}
507
508////////////////////////////////////////////////////////////////////////////////
509/// Layout container
510
512{
515}
516
517////////////////////////////////////////////////////////////////////////////////
518/// redraw
519
521{
522 return TGContainer::DoRedraw();
523}
524
525////////////////////////////////////////////////////////////////////////////////
526/// Add listbox entry with hints to container. To show entry call
527/// MapSubwindows() and Layout().
528
530{
531 // DEPRECATED: the color should always be set in the TGLBEntry ctor
532 //lbe->SetBackgroundColor(fgWhitePixel);
533
534 TGLBFrameElement *nw = new TGLBFrameElement(lbe, lhints ? lhints : fgDefaultHints);
535 fList->Add(nw);
537}
538
539////////////////////////////////////////////////////////////////////////////////
540/// Insert listbox entry after specified entry with id afterID. If afterID = -1
541/// then add entry at head of list. To show entry call MapSubwindows() and
542/// Layout().
543
545{
546 // DEPRECATED: the color should always be set in the TGLBEntry ctor
547 //lbe->SetBackgroundColor(fgWhitePixel);
548
549 TGLBEntry *e;
550 TGFrameElement *el, *nw;
551 TIter next(fList);
552
553 while ((el = (TGFrameElement *) next())) {
554 e = (TGLBEntry *) el->fFrame;
555 if (e->EntryId() == afterID) break;
556 }
557
558 if (!el && afterID != -1) {
559 nw = new TGLBFrameElement(lbe, lhints ? lhints : fgDefaultHints);
560 fList->Add(nw);
561 } else {
562 nw = new TGLBFrameElement(lbe, lhints);
563 nw->fFrame = lbe;
564 nw->fLayout = lhints;
565 nw->fState = 1;
566 //lbe->SetFrameElement(nw);
567
568 if (afterID == -1)
569 fList->AddFirst(nw);
570 else
571 fList->AddAfter(el, nw);
572 }
574}
575
576////////////////////////////////////////////////////////////////////////////////
577/// Insert listbox entry before the list box entry with a higher id.
578/// To show entry call MapSubwindows() and Layout().
579
581{
582 // DEPRECATED: the color should always be set in the TGLBEntry ctor
583 //lbe->SetBackgroundColor(fgWhitePixel);
584
585 TGLBEntry *e;
586 TGFrameElement *el, *nw;
587 TIter next(fList);
588
589 while ((el = (TGFrameElement *) next())) {
590 e = (TGLBEntry *) el->fFrame;
591 if (e->EntryId() > lbe->EntryId()) break;
592 }
593
594 if (!el) {
595 nw = new TGLBFrameElement(lbe, lhints ? lhints : fgDefaultHints);
596 fList->Add(nw);
597 } else {
598 nw = new TGLBFrameElement(lbe, lhints);
599 nw->fFrame = lbe;
600 nw->fLayout = lhints;
601 nw->fState = 1;
602 //lbe->SetFrameElement(nw);
603
604 fList->AddBefore(el, nw);
605 }
607}
608
609////////////////////////////////////////////////////////////////////////////////
610/// Remove the entry with specified id from the listbox container.
611/// To update the listbox call Layout().
612
614{
615 TGLBEntry *e;
616 TGFrameElement *el;
618
619 TIter next(fList);
620
621 while ((el = (TGFrameElement *) next())) {
622 e = (TGLBEntry *) el->fFrame;
623 l = el->fLayout;
624 if (e->EntryId() == id) {
625 if (fLastActive == e) fLastActive = 0;
626 e->DestroyWindow();
627 fList->Remove(el); // avoid calling RemoveFrame(e)
628 delete el; // item
629 delete e;
630 delete l;
631 break;
632 }
633 }
635}
636
637////////////////////////////////////////////////////////////////////////////////
638/// Remove entries from from_ID to to_ID (including).
639/// To update the listbox call Layout().
640
642{
643 TGLBEntry *e;
644 TGFrameElement *el;
646
647 TIter next(fList);
648
649 while ((el = (TGFrameElement *) next())) {
650 e = (TGLBEntry *) el->fFrame;
651 l = el->fLayout;
652 if ((e->EntryId() >= from_ID) && (e->EntryId() <= to_ID)) {
653 if (fLastActive == e) fLastActive = 0;
654 e->DestroyWindow();
655 fList->Remove(el); // avoid calling RemoveFrame(e)
656 delete el; // idem
657 delete e;
658 delete l;
659 }
660 }
662}
663
664////////////////////////////////////////////////////////////////////////////////
665/// Remove all entries in this container.
666
668{
669 TGLBEntry *e;
670 TGFrameElement *el;
672
673 TIter next(fList);
674
675 while ((el = (TGFrameElement *) next())) {
676 e = (TGLBEntry *) el->fFrame;
677 l = el->fLayout;
678 if (fLastActive == e) fLastActive = 0;
679 if (e)
680 e->DestroyWindow();
681 fList->Remove(el); // avoid calling RemoveFrame(e)
682 delete el; // item
683 delete e;
684 delete l;
685 }
687}
688
689////////////////////////////////////////////////////////////////////////////////
690/// Select the entry with the specified id.
691/// Returns the selected TGLBEntry.
692
694{
695 return Select(id, kTRUE);
696}
697
698////////////////////////////////////////////////////////////////////////////////
699/// Select / deselect the entry with the specified id.
700/// Returns the selected TGLBEntry.
701
703{
704 TGLBEntry *f;
705 TGFrameElement *el;
706
707 if (!fMultiSelect && fLastActive) {
709 fLastActive = 0;
710 }
711
712 TIter next(fList);
713 while ((el = (TGFrameElement *) next())) {
714 f = (TGLBEntry *) el->fFrame;
715 if (f->EntryId() == id) {
716 f->Activate(sel);
717 if (fMultiSelect == kFALSE && sel == kTRUE) {
718 fLastActive = f;
719 fLastActiveEl = el;
720 }
722 return f;
723 }
724 }
725
726 return 0;
727}
728
729////////////////////////////////////////////////////////////////////////////////
730/// Returns id of selected entry. In case of no selected entry or
731/// if multi selection is switched on returns -1.
732
734{
735 if (fLastActive == 0) return -1;
736 return fLastActive->EntryId();
737}
738
739////////////////////////////////////////////////////////////////////////////////
740/// Returns kTrue if entry id is selected.
741
743{
744 TGLBEntry *f;
745 TGFrameElement *el;
746
747 TIter next(fList);
748 while ((el = (TGFrameElement *) next())) {
749 f = (TGLBEntry *) el->fFrame;
750 if (f->EntryId() == id)
751 return f->IsActive();
752 }
753
754 return kFALSE;
755}
756
757////////////////////////////////////////////////////////////////////////////////
758/// Adds all selected entries (TGLBEntry) of the list box into
759/// the list selected.
760
762{
763 TGLBEntry *f;
764 TGFrameElement *el;
765
766 TIter next(fList);
767 while ((el = (TGFrameElement *) next())) {
768 f = (TGLBEntry *) el->fFrame;
769 if (f->IsActive()) {
770 selected->Add(f);
771 }
772 }
773}
774
775////////////////////////////////////////////////////////////////////////////////
776/// Enables and disables multiple selections of entries.
777
779{
780 TGFrameElement *el;
781
782 fMultiSelect = multi;
783 if (!fMultiSelect) {
784 // deselect all entries
785 TIter next(fList);
786 while ((el = (TGFrameElement *) next())) {
787 ((TGLBEntry *)(el->fFrame))->Activate(kFALSE);
788 }
789 }
790 fLastActive = 0;
791 fLastActiveEl = 0;
793}
794
795////////////////////////////////////////////////////////////////////////////////
796/// Return a pointer to vertical scroll bar.
797
799{
800 return fListBox ? fListBox->GetVScrollbar() : 0;
801}
802
803////////////////////////////////////////////////////////////////////////////////
804/// Set new vertical scroll bar position.
805
807{
809
810 if (vb && vb->IsMapped()) {
811 vb->SetPosition(newPos);
812 }
813}
814
815////////////////////////////////////////////////////////////////////////////////
816/// Handle mouse button event in the listbox container.
817
819{
820 int xf0, yf0, xff, yff;
821
822 TGLBEntry *f;
823 TGFrameElement *el;
824 TGLBEntry *last = fLastActive;
825
827 Int_t x = pos.fX + event->fX;
828 Int_t y = pos.fY + event->fY;
829 Bool_t activate = kFALSE;
830
831 // do not handle "context menu button" during guibuilding
832 if (fClient->IsEditable() && (event->fCode == kButton3)) {
833 return kTRUE;
834 }
835
837
838 if ((event->fCode == kButton4) && vb){
839 // scroll 2 lines up (a button down is always followed by a button up)
840 Int_t newpos = vb->GetPosition() - 1;
841 if (newpos < 0) newpos = 0;
842 vb->SetPosition(newpos);
844 return kTRUE;
845 }
846 if ((event->fCode == kButton5) && vb) {
847 // scroll 2 lines down (a button down is always followed by a button up)
848 Int_t newpos = vb->GetPosition() + 1;
849 vb->SetPosition(newpos);
851 return kTRUE;
852 }
853
854 gVirtualX->SetInputFocus(fId);
855
856 if (fMultiSelect) {
857 if (event->fType == kButtonPress) {
858 TIter next(fList);
859 while ((el = (TGFrameElement *) next())) {
860 f = (TGLBEntry *) el->fFrame;
861 xf0 = f->GetX();
862 yf0 = f->GetY();
863 xff = xf0 + f->GetWidth();
864 yff = yf0 + f->GetHeight();
865
866 activate = fMapSubwindows ? (f->GetId() == (Window_t)event->fUser[0]) :
867 (x > xf0) && (x < xff) && (y > yf0) && (y < yff);
868
869 if (activate) {
870 fLastActive = f;
871 fLastActiveEl = el;
872 f->Toggle();
873 fChangeStatus = f->IsActive() ? 1 : 0;
875 f->EntryId(), 0);
876 break;
877 }
878 }
879 } else {
880 fChangeStatus = -1;
881 }
882 } else {
883 if (event->fType == kButtonPress) {
884 if (fLastActive) {
886 fLastActive = 0;
887 }
888 TIter next(fList);
889 while ((el = (TGFrameElement *) next())) {
890 f = (TGLBEntry *) el->fFrame;
891 xf0 = f->GetX();
892 yf0 = f->GetY();
893 xff = xf0 + f->GetWidth();
894 yff = yf0 + f->GetHeight();
895
896 activate = fMapSubwindows ? (f->GetId() == (Window_t)event->fUser[0]) :
897 (x > xf0) && (x < xff) && (y > yf0) && (y < yff) && !f->IsActive();
898
899 if (activate) {
900 f->Activate(kTRUE);
901 fLastActive = f;
902 fLastActiveEl = el;
903 } else {
904 f->Activate(kFALSE);
905 }
906 }
907 } else {
908 if (fLastActive) {
909 f = fLastActive;
911 f->EntryId(), 0);
912 }
913 }
914 }
915 if (event->fType == kButtonRelease) {
918 }
919 if (fChangeStatus || (last != fLastActive))
921 // trick to avoid mouse move events between the mouse click
922 // and the unmapping...
923 if (fListBox->GetParent()->InheritsFrom("TGComboBoxPopup"))
925 return kTRUE;
926}
927
928////////////////////////////////////////////////////////////////////////////////
929/// Handle double click mouse event in the listbox container.
930
932{
933 if (!fMultiSelect) {
934 if (fLastActive) {
937 f->EntryId(), 0);
938 DoubleClicked(f, ev->fCode);
939 DoubleClicked(f, ev->fCode, ev->fXRoot, ev->fYRoot);
940 }
941 return kTRUE;
942 }
944}
945
946////////////////////////////////////////////////////////////////////////////////
947/// Handle mouse motion event in listbox container.
948
950{
951 int xf0, yf0, xff, yff;
952
953 static Long64_t was = gSystem->Now();
954 Long64_t now = gSystem->Now();
955
956 if ((now-was) < 50) return kFALSE;
957 was = now;
958
959 TGLBEntry *f;
960 TGFrameElement *el;
963 Int_t x = pos.fX + event->fX;
964 Int_t y = pos.fY + event->fY;
965 Bool_t activate = kFALSE;
966 TGLBEntry *last = fLastActive;
967
968 if (fMultiSelect) {
969
970 if ((event->fY < 10) || (event->fY > Int_t(dim.fHeight) - 10)) {
971 if (!fScrolling) {
974 }
976 }
977 else if (fChangeStatus >= 0) {
978 TIter next(fList);
979 while ((el = (TGFrameElement *) next())) {
980 f = (TGLBEntry *) el->fFrame;
981 xf0 = f->GetX();
982 yf0 = f->GetY();
983 xff = xf0 + f->GetWidth();
984 yff = yf0 + f->GetHeight();
985 activate = fMapSubwindows ? (f->GetId() == (Window_t)event->fUser[0]) :
986 (x > xf0) && (x < xff) && (y > yf0) && (y < yff);
987
988 if (activate) {
989 if (fChangeStatus != (f->IsActive() ? 1 : 0)) {
990 f->Toggle();
993 f->EntryId(), 0);
994 }
995 break;
996 }
997 }
998 }
999 } else if (fListBox->GetParent()->InheritsFrom("TGComboBoxPopup")) {
1000 TIter next(fList);
1001 while ((el = (TGFrameElement *) next())) {
1002 f = (TGLBEntry *) el->fFrame;
1003 xf0 = f->GetX();
1004 yf0 = f->GetY();
1005 xff = xf0 + f->GetWidth();
1006 yff = yf0 + f->GetHeight();
1007
1008 activate = fMapSubwindows ? (f->GetId() == (Window_t)event->fUser[0]) :
1009 (x > xf0) && (x < xff) && (y > yf0) && (y < yff) && !f->IsActive();
1010
1011 if (activate) {
1012 f->Activate(kTRUE);
1013 fLastActive = f;
1014 fLastActiveEl = el;
1015 } else {
1016 f->Activate(kFALSE);
1017 }
1018 if (last != fLastActive) {
1019 ClearViewPort();
1020 }
1021 }
1022 }
1023 return kTRUE;
1024}
1025
1026////////////////////////////////////////////////////////////////////////////////
1027/// Autoscroll while close to & beyond The Wall
1028
1030{
1031 TGFrameElement* el = 0;
1032 TGLBEntry *f = 0;
1033 Int_t yf0, yff;
1034 Bool_t changed = kFALSE;
1035
1038
1039 Window_t dum1, dum2;
1040 Event_t ev;
1041 ev.fType = kButtonPress;
1042 Int_t x, y;
1043
1044 // Where's the cursor?
1045 gVirtualX->QueryPointer(fId,dum1,dum2,ev.fXRoot,ev.fYRoot,x,y,ev.fState);
1047 if (vb && y > 0 && y < 10) {
1048 // scroll 1 line up
1049 Int_t newpos = vb->GetPosition() - 1;
1050 if (newpos < 0) newpos = 0;
1051 vb->SetPosition(newpos);
1052 changed = kTRUE;
1053 }
1054 else if (vb && y > (Int_t)dim.fHeight - 10 && y < (Int_t)dim.fHeight) {
1055 // scroll 1 line down
1056 Int_t newpos = vb->GetPosition() + 1;
1057 vb->SetPosition(newpos);
1058 changed = kTRUE;
1059 }
1060 if (changed && fChangeStatus >= 0) {
1061 pos = GetPagePosition();
1062 TIter next(fList);
1063 while ((el = (TGFrameElement *) next())) {
1064 f = (TGLBEntry *) el->fFrame;
1065 yf0 = f->GetY();
1066 yff = yf0 + f->GetHeight();
1067 if ((y + pos.fY > yf0) && (y + pos.fY < yff)) {
1068 if (fChangeStatus != (f->IsActive() ? 1 : 0)) {
1069 f->Toggle();
1070 ClearViewPort();
1072 f->EntryId(), 0);
1073 }
1074 break;
1075 }
1076 }
1077 }
1078}
1079
1080////////////////////////////////////////////////////////////////////////////////
1081/// Activate item.
1082
1084{
1086 fLastActive = (TGLBEntry *)el->fFrame;
1087}
1088
1089////////////////////////////////////////////////////////////////////////////////
1090/// Returns the position in the list box of the entry id.
1091/// The first position has position no 0. Returns -1 if entry id
1092/// is not in the list of entries.
1093
1095{
1096 Int_t pos = 0;
1097 TGLBEntry *f;
1098 TGFrameElement *el;
1099
1100 TIter next(fList);
1101 while ((el = (TGFrameElement *) next())) {
1102 f = (TGLBEntry *) el->fFrame;
1103 if (f->EntryId() == id)
1104 return pos;
1105 pos++;
1106 }
1107
1108 return -1;
1109}
1110
1111
1112////////////////////////////////////////////////////////////////////////////////
1113/// Create a listbox.
1114
1116 UInt_t options, ULong_t back) :
1117 TGCompositeFrame(p, 10, 10, options, back)
1118{
1119 fMsgWindow = p;
1120 fWidgetId = id;
1121
1122 fItemVsize = 1;
1124
1125 InitListBox();
1126}
1127
1128////////////////////////////////////////////////////////////////////////////////
1129/// Delete a listbox widget.
1130
1132{
1133 if (!MustCleanup()) {
1134 delete fVScrollbar;
1135 delete fVport;
1136 delete fLbc;
1137 }
1138}
1139
1140////////////////////////////////////////////////////////////////////////////////
1141/// Initiate the internal classes of a list box.
1142
1144{
1149 fLbc->Associate(this);
1150 fLbc->SetListBox(this);
1152
1153 AddFrame(fVport, 0);
1155
1156 fVScrollbar->Associate(this);
1157
1162
1167
1168 // layout manager is not used
1169 delete fLayoutManager;
1170 fLayoutManager = 0;
1171}
1172
1173////////////////////////////////////////////////////////////////////////////////
1174/// Draw borders of the list box widget.
1175
1177{
1179
1181 gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, fWidth-2, 0);
1182 gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, 0, fHeight-2);
1183 gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, fWidth-3, 1);
1184 gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, 1, fHeight-3);
1185 if (gClient->GetStyle() > 1) break;
1186 gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, fWidth-1, fHeight-1);
1187 gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, fHeight-1, fWidth-1, 0);
1188 gVirtualX->DrawLine(fId, GetBckgndGC()(), 1, fHeight-2, fWidth-2, fHeight-2);
1189 gVirtualX->DrawLine(fId, GetBckgndGC()(), fWidth-2, 1, fWidth-2, fHeight-2);
1190 break;
1191
1192 default:
1194 break;
1195 }
1196}
1197
1198////////////////////////////////////////////////////////////////////////////////
1199/// Add entry with specified string and id to listbox. The id will be
1200/// used in the event processing routine when the item is selected.
1201/// The string will be adopted by the listbox.
1202
1204{
1205 TGTextLBEntry *lbe;
1206 TGLayoutHints *lhints;
1207
1208 lbe = new TGTextLBEntry(fLbc, s, id);
1209 lhints = new TGLayoutHints(kLHintsExpandX | kLHintsTop);
1211 fLbc->AddEntry(lbe, lhints);
1212}
1213
1214////////////////////////////////////////////////////////////////////////////////
1215/// Add entry with specified string and id to listbox. The id will be
1216/// used in the event processing routine when the item is selected.
1217
1218void TGListBox::AddEntry(const char *s, Int_t id)
1219{
1220 AddEntry(new TGString(s), id);
1221}
1222
1223////////////////////////////////////////////////////////////////////////////////
1224/// Add specified TGLBEntry and TGLayoutHints to listbox. The
1225/// entry and layout will be adopted and later deleted by the listbox.
1226
1228{
1230 fLbc->AddEntry(lbe, lhints);
1231}
1232
1233////////////////////////////////////////////////////////////////////////////////
1234/// Add entry with specified string and id to listbox sorted by increasing id.
1235/// This sorting works properly only if EntrySort functions are used to add
1236/// entries without mixing them with other add or insert functions. The id will be
1237/// used in the event processing routine when the item is selected.
1238/// The string will be adopted by the listbox.
1239
1241{
1242 TGTextLBEntry *lbe;
1243 TGLayoutHints *lhints;
1244
1245 lbe = new TGTextLBEntry(fLbc, s, id);
1246 lhints = new TGLayoutHints(kLHintsExpandX | kLHintsTop);
1248 fLbc->AddEntrySort(lbe, lhints);
1249}
1250
1251////////////////////////////////////////////////////////////////////////////////
1252/// Add entry with specified string and id to listbox sorted by increasing id.
1253/// This sorting works properly only if EntrySort functions are used to add
1254/// entries without mixing them with other add or insert functions. The id will be
1255/// used in the event processing routine when the item is selected.
1256
1257void TGListBox::AddEntrySort(const char *s, Int_t id)
1258{
1259 AddEntrySort(new TGString(s), id);
1260}
1261
1262////////////////////////////////////////////////////////////////////////////////
1263/// Add specified TGLBEntry and TGLayoutHints to listbox sorted by increasing id.
1264/// This sorting works properly only if EntrySort functions are used to add
1265/// entries without mixing them with other add or insert functions. The
1266/// entry and layout will be adopted and later deleted by the listbox.
1267
1269{
1271 fLbc->AddEntrySort(lbe, lhints);
1272}
1273
1274////////////////////////////////////////////////////////////////////////////////
1275/// Insert entry with specified string and id behind the entry with afterID.
1276/// The string will be adopted and later deleted by the listbox.
1277
1279{
1280 TGTextLBEntry *lbe;
1281 TGLayoutHints *lhints;
1282
1283 lbe = new TGTextLBEntry(fLbc, s, id);
1284 lhints = new TGLayoutHints(kLHintsExpandX | kLHintsTop);
1286 fLbc->InsertEntry(lbe, lhints, afterID);
1287}
1288
1289////////////////////////////////////////////////////////////////////////////////
1290/// Insert entry with specified string and id behind the entry with afterID.
1291
1292void TGListBox::InsertEntry(const char *s, Int_t id, Int_t afterID)
1293{
1294 InsertEntry(new TGString(s), id, afterID);
1295}
1296
1297////////////////////////////////////////////////////////////////////////////////
1298/// method used to add entry via context menu
1299
1300void TGListBox::NewEntry(const char *s)
1301{
1302 Int_t selected = fLbc->GetSelected();
1303
1304 // no selected entry or the last entry
1305 if ((selected < 0) || (selected == GetNumberOfEntries())) {
1307 } else {
1308 InsertEntry(s, GetNumberOfEntries()+1, selected);
1309 }
1310 Layout();
1311}
1312
1313////////////////////////////////////////////////////////////////////////////////
1314/// remove entry with id.
1315/// If id = -1 - the selected entry/entries is/are removed.
1316///
1317
1319{
1320 if (id >= 0) {
1321 fLbc->RemoveEntry(id);
1322 Layout();
1323 return;
1324 }
1325 if (!fLbc->GetMultipleSelections()) {
1327 Layout();
1328 return;
1329 }
1330 TList li;
1332 TGLBEntry *e;
1333 TIter next(&li);
1334
1335 while ((e = (TGLBEntry*)next())) {
1336 fLbc->RemoveEntry(e->EntryId());
1337 }
1338 Layout();
1339}
1340
1341////////////////////////////////////////////////////////////////////////////////
1342/// Remove all entries.
1343
1345{
1346 fLbc->RemoveAll();
1347 Layout();
1348}
1349
1350////////////////////////////////////////////////////////////////////////////////
1351/// Remove a range of entries defined by from_ID and to_ID.
1352
1354{
1355 fLbc->RemoveEntries(from_ID, to_ID);
1356 Layout();
1357}
1358
1359////////////////////////////////////////////////////////////////////////////////
1360/// Insert the specified TGLBEntry and layout hints behind afterID.
1361/// The entry and layout will be adopted and later deleted by the listbox.
1362
1363void TGListBox::InsertEntry(TGLBEntry *lbe, TGLayoutHints *lhints, int afterID)
1364{
1366 fLbc->InsertEntry(lbe, lhints, afterID);
1367}
1368
1369////////////////////////////////////////////////////////////////////////////////
1370/// Returns list box entry with specified id.
1371
1373{
1374 TIter next(fLbc->GetList());
1375 TGFrameElement *el;
1376
1377 while ((el = (TGFrameElement *)next())) {
1378 TGLBEntry *lbe = (TGLBEntry *)el->fFrame;
1379 if (lbe->EntryId() == id) return lbe;
1380 }
1381 return 0;
1382}
1383
1384////////////////////////////////////////////////////////////////////////////////
1385/// Scroll the entry with id to the top of the listbox.
1386
1388{
1389 Int_t idPos;
1390
1391 idPos = fLbc->GetPos(id);
1392
1393 // id not found in list of entries
1394 if (idPos < 0)
1395 return;
1396
1397 // call layout to define the range of the scroll bars
1398 Layout();
1399
1400 // SetPosition will send a message which will handled by
1401 // the function TGListBox::ProcessMessage. Now ProcessMessage will
1402 // set the viewport. SetPosition also will check that the idPos is
1403 // not out of range.
1404 fVScrollbar->SetPosition(idPos);
1405}
1406
1407////////////////////////////////////////////////////////////////////////////////
1408/// Resize the listbox widget. If fIntegralHeight is true make the height
1409/// an integral number of the maximum height of a single entry.
1410
1412{
1413 if (fIntegralHeight)
1415 + (fBorderWidth << 1);
1416
1418 DoRedraw();
1419}
1420
1421////////////////////////////////////////////////////////////////////////////////
1422/// Move and resize the listbox widget.
1423
1425{
1426 if (fIntegralHeight)
1428 + (fBorderWidth << 1);
1430 DoRedraw();
1431}
1432
1433////////////////////////////////////////////////////////////////////////////////
1434/// Return default size of listbox widget.
1435
1437{
1438 UInt_t h;
1439
1440 if (fIntegralHeight)
1442 + (fBorderWidth << 1);
1443 else
1444 h = fHeight;
1445
1446 return TGDimension(fWidth, h);
1447}
1448
1449////////////////////////////////////////////////////////////////////////////////
1450/// Layout the listbox components.
1451
1453{
1454 TGFrame *container;
1455 UInt_t cw, ch, tch;
1456 Bool_t need_vsb;
1457
1458 need_vsb = kFALSE;
1459
1460 container = fVport->GetContainer();
1461
1462 // test whether we need vertical scrollbar or not
1463
1464 cw = fWidth - (fBorderWidth << 1);
1465 ch = fHeight - (fBorderWidth << 1);
1466
1467 container->SetWidth(cw);
1468 container->SetHeight(ch);
1469
1470 if (container->GetDefaultHeight() > ch) {
1471 need_vsb = kTRUE;
1473 if ((Int_t) cw < 0) {
1474 Warning("Layout", "width would become too small, setting to 10");
1475 cw = 10;
1476 }
1477 container->SetWidth(cw);
1478 }
1479
1481 container->Layout();
1482
1483 tch = TMath::Max(container->GetDefaultHeight(), ch);
1484 container->SetHeight(0); // force a resize in TGFrame::Resize
1485 container->Resize(cw, tch);
1486 //fVport->SetPos(0, 0);
1487
1488 if (need_vsb) {
1491 } else {
1494 }
1495
1498 //fClient->NeedRedraw(container);
1499 ((TGContainer *)container)->ClearViewPort();
1500}
1501
1502////////////////////////////////////////////////////////////////////////////////
1503/// Sort entries by name
1504
1506{
1507 fLbc->GetList()->Sort(ascend);
1508 Layout();
1510}
1511
1512////////////////////////////////////////////////////////////////////////////////
1513/// Return id of selected listbox item.
1514
1516{
1518 return ct->GetSelected();
1519}
1520
1521////////////////////////////////////////////////////////////////////////////////
1522/// Adds all selected entries (TGLBEntry) of the list box into
1523/// the list selected.
1524
1526{
1527 fLbc->GetSelectedEntries(selected);
1528}
1529
1530////////////////////////////////////////////////////////////////////////////////
1531/// Change background to all entries
1532
1534{
1535 fBackground = back;
1536
1537 TIter next(fLbc->GetList());
1538 TGFrameElement *el;
1539
1540 while ((el = (TGFrameElement *)next())) {
1541 TGLBEntry *lbe = (TGLBEntry *)el->fFrame;
1542 lbe->SetBackgroundColor(back);
1543 }
1545}
1546
1547////////////////////////////////////////////////////////////////////////////////
1548/// Process messages generated by the listbox container and forward
1549/// messages to the listbox message handling window.
1550
1552{
1553 switch (GET_MSG(msg)) {
1554 case kC_VSCROLL:
1555 switch (GET_SUBMSG(msg)) {
1556 case kSB_SLIDERTRACK:
1557 case kSB_SLIDERPOS:
1558 fVport->SetVPos(Int_t(-parm1 * fItemVsize));
1559 break;
1560 }
1561 break;
1562
1563 case kC_CONTAINER:
1564 switch (GET_SUBMSG(msg)) {
1565 case kCT_ITEMCLICK:
1566 {
1568 fWidgetId, parm1);
1570 TGLBEntry *entry = GetSelectedEntry();
1571 if (entry) {
1572 if (entry->InheritsFrom(TGTextLBEntry::Class())) {
1573 const char *text;
1574 text = ((TGTextLBEntry*)entry)->GetText()->GetString();
1575 Selected(text);
1576 }
1577 Selected(fWidgetId, (Int_t) parm1);
1578 Selected((Int_t) parm1);
1579 }
1580 }
1581 break;
1582 case kCT_ITEMDBLCLICK:
1583 if (!GetMultipleSelections()) {
1584 TGLBEntry *entry = GetSelectedEntry();
1585 if (entry) {
1586 if (entry->InheritsFrom(TGTextLBEntry::Class())) {
1587 const char *text;
1588 text = ((TGTextLBEntry*)entry)->GetText()->GetString();
1590 }
1591 DoubleClicked(fWidgetId, (Int_t) parm1);
1592 DoubleClicked((Int_t) parm1);
1593 }
1594 }
1595 break;
1596 }
1597 break;
1598
1599 default:
1600 break;
1601
1602 }
1603 return kTRUE;
1604}
1605
1606////////////////////////////////////////////////////////////////////////////////
1607/// Emit Selected signal with list box id and entry id.
1608
1610{
1611 Long_t args[2];
1612
1613 args[0] = widgetId;
1614 args[1] = id;
1615
1616 Emit("Selected(Int_t,Int_t)", args);
1617}
1618
1619////////////////////////////////////////////////////////////////////////////////
1620/// Emit DoubleClicked signal with list box id and entry id.
1621
1623{
1624 Long_t args[2];
1625
1626 args[0] = widgetId;
1627 args[1] = id;
1628
1629 Emit("DoubleClicked(Int_t,Int_t)", args);
1630}
1631
1632////////////////////////////////////////////////////////////////////////////////
1633/// Find entry by name.
1634
1636{
1637 TList *list = fLbc->GetList();
1638 TGFrameElement *el = (TGFrameElement *)list->First();
1639 while (el) {
1640 if (el->fFrame->GetTitle() == TString(name))
1641 return (TGLBEntry *)el->fFrame;
1642 el = (TGFrameElement *)list->After(el);
1643 }
1644 return 0;
1645}
1646
1647////////////////////////////////////////////////////////////////////////////////
1648/// Save a list box widget as a C++ statement(s) on output stream out.
1649
1650void TGListBox::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
1651{
1652 if (fBackground != GetWhitePixel()) SaveUserColor(out, option);
1653
1654 out << std::endl << " // list box" << std::endl;
1655
1656 out<<" TGListBox *";
1657 out << GetName() << " = new TGListBox(" << fParent->GetName();
1658
1659 if (fBackground == GetWhitePixel()) {
1660 if (GetOptions() == (kSunkenFrame | kDoubleBorder)) {
1661 if (fWidgetId == -1) {
1662 out <<");" << std::endl;
1663 } else {
1664 out << "," << fWidgetId << ");" << std::endl;
1665 }
1666 } else {
1667 out << "," << fWidgetId << "," << GetOptionString() <<");" << std::endl;
1668 }
1669 } else {
1670 out << "," << fWidgetId << "," << GetOptionString() << ",ucolor);" << std::endl;
1671 }
1672 if (option && strstr(option, "keep_names"))
1673 out << " " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
1674
1675 if (!fLbc->GetList()) return;
1676
1677 TGFrameElement *el;
1678 TIter next(fLbc->GetList());
1679
1680 while ((el = (TGFrameElement *) next())) {
1681 out << " " << GetName() << "->AddEntry(";
1682 el->fFrame->SavePrimitive(out, option);
1683 out << ");"<< std::endl;
1684 }
1685 out << " " << GetName() << "->Resize(" << GetWidth() << "," << GetHeight()
1686 << ");" << std::endl;
1687}
1688
1689////////////////////////////////////////////////////////////////////////////////
1690/// Save a list box entry widget as a C++ statement(s) on output stream out.
1691
1692void TGTextLBEntry::SavePrimitive(std::ostream &out, Option_t * /*= ""*/)
1693{
1694 TString content = GetText()->GetString();
1695 content.ReplaceAll('\\', "\\\\");
1696 content.ReplaceAll("\"", "\\\"");
1697 char quote = '"';
1698 out << quote << content << quote << "," << EntryId();
1699}
@ kButtonRelease
Definition GuiTypes.h:60
@ kButtonPress
Definition GuiTypes.h:60
const Mask_t kGCLineStyle
Definition GuiTypes.h:291
const Mask_t kGCLineWidth
Definition GuiTypes.h:290
const Mask_t kButtonMotionMask
Definition GuiTypes.h:164
const Mask_t kButtonPressMask
Definition GuiTypes.h:161
const Mask_t kGCDashList
Definition GuiTypes.h:307
const Mask_t kGCFillStyle
Definition GuiTypes.h:294
const Mask_t kPointerMotionMask
Definition GuiTypes.h:163
@ kChildFrame
Definition GuiTypes.h:379
@ kRaisedFrame
Definition GuiTypes.h:384
@ kSunkenFrame
Definition GuiTypes.h:383
@ kVerticalFrame
Definition GuiTypes.h:381
@ kDoubleBorder
Definition GuiTypes.h:385
@ kOwnBackground
Definition GuiTypes.h:391
@ kDefaultScrollBarWidth
Definition GuiTypes.h:86
@ kFillSolid
Definition GuiTypes.h:51
@ kLineSolid
Definition GuiTypes.h:48
@ kLineOnOffDash
Definition GuiTypes.h:48
Handle_t GContext_t
Graphics context handle.
Definition GuiTypes.h:38
const Mask_t kButtonReleaseMask
Definition GuiTypes.h:162
Handle_t FontStruct_t
Pointer to font structure.
Definition GuiTypes.h:39
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
@ kButton4
Definition GuiTypes.h:215
@ kButton5
Definition GuiTypes.h:215
@ kButton3
Definition GuiTypes.h:214
Handle_t Window_t
Window handle.
Definition GuiTypes.h:29
ULongptr_t Handle_t
Generic resource handle.
Definition GuiTypes.h:26
#define f(i)
Definition RSha256.hxx:104
#define a(i)
Definition RSha256.hxx:99
#define h(i)
Definition RSha256.hxx:106
#define e(i)
Definition RSha256.hxx:103
int Int_t
Definition RtypesCore.h:45
long Longptr_t
Definition RtypesCore.h:82
const Bool_t kFALSE
Definition RtypesCore.h:101
unsigned long ULong_t
Definition RtypesCore.h:55
long Long_t
Definition RtypesCore.h:54
double Double_t
Definition RtypesCore.h:59
long long Long64_t
Definition RtypesCore.h:80
short Style_t
Definition RtypesCore.h:89
const Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:364
include TDocParser_001 C image html pict1_TDocParser_001 png width
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Definition TError.cxx:231
#define gClient
Definition TGClient.h:157
@ kLHintsTop
Definition TGLayout.h:27
@ kLHintsExpandX
Definition TGLayout.h:30
XFontStruct * id
Definition TGX11.cxx:109
char name[80]
Definition TGX11.cxx:110
R__EXTERN TSystem * gSystem
Definition TSystem.h:559
#define gVirtualX
Definition TVirtualX.h:338
Int_t MK_MSG(EWidgetMessageTypes msg, EWidgetMessageTypes submsg)
Int_t GET_MSG(Long_t val)
@ kSB_SLIDERTRACK
@ kSB_SLIDERPOS
@ kC_VSCROLL
@ kCT_ITEMCLICK
@ kC_COMMAND
@ kCM_LISTBOX
@ kCT_ITEMDBLCLICK
@ kC_CONTAINER
Int_t GET_SUBMSG(Long_t val)
Bool_t IsEditable() const
Definition TGClient.h:89
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get graphics context from the gc pool.
Definition TGClient.cxx:320
void FreeGC(const TGGC *gc)
Free a graphics context.
Definition TGClient.cxx:328
const TGResourcePool * GetResourcePool() const
Definition TGClient.h:124
void FreePicture(const TGPicture *pic)
Free picture resource.
Definition TGClient.cxx:308
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
TGLayoutManager * fLayoutManager
layout manager
Definition TGFrame.h:291
virtual TList * GetList() const
Definition TGFrame.h:310
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1117
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition TGFrame.cxx:967
virtual Int_t MustCleanup() const
Definition TGFrame.h:361
Bool_t fMapSubwindows
kTRUE - map subwindows
Definition TGFrame.h:295
TList * fList
container of frame elements
Definition TGFrame.h:292
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
Definition TGFrame.cxx:1022
static TGLayoutHints * fgDefaultHints
Definition TGFrame.h:297
Manages a content area.
Definition TGCanvas.h:31
virtual void ActivateItem(TGFrameElement *el)
Activate item.
Definition TGCanvas.cxx:701
TTimer * fScrollTimer
autoscroll timer
Definition TGCanvas.h:50
virtual void ClearViewPort()
Clear view port and redraw full content.
Definition TGCanvas.cxx:891
const TGWindow * fMsgWindow
window handling container messages
Definition TGCanvas.h:42
Bool_t fScrolling
kTRUE - when scrolling is ON
Definition TGCanvas.h:59
virtual void DoRedraw()
Redraw content of container in the viewport region.
Definition TGCanvas.cxx:800
virtual TGDimension GetPageDimension() const
Returns page dimension.
Definition TGCanvas.cxx:751
virtual void Layout()
Layout container entries.
Definition TGCanvas.cxx:422
TGViewPort * fViewPort
container viewport
Definition TGCanvas.h:40
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click mouse event.
virtual void DoubleClicked(TGFrame *f, Int_t btn)
Emit DoubleClicked() signal.
Definition TGCanvas.cxx:538
virtual TGPosition GetPagePosition() const
Returns page position.
Definition TGCanvas.cxx:737
TGFrameElement * fLastActiveEl
last active item
Definition TGCanvas.h:43
UInt_t fHeight
Definition TGDimension.h:21
Encapsulate fonts used in the GUI system.
Definition TGFont.h:140
FontStruct_t GetFontStruct() const
Definition TGFont.h:184
TGLayoutHints * fLayout
Definition TGLayout.h:114
TGFrame * fFrame
Definition TGLayout.h:112
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition TGFrame.h:80
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition TGFrame.cxx:339
virtual void DoRedraw()
Redraw the frame.
Definition TGFrame.cxx:430
static const TGGC & GetBlackGC()
Get black graphics context.
Definition TGFrame.cxx:735
UInt_t fOptions
frame options
Definition TGFrame.h:94
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
Definition TGFrame.cxx:348
static Pixel_t GetWhitePixel()
Get white pixel value.
Definition TGFrame.cxx:709
UInt_t fHeight
frame height
Definition TGFrame.h:88
virtual UInt_t GetDefaultWidth() const
Definition TGFrame.h:190
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:191
virtual void DrawBorder()
Draw frame border.
Definition TGFrame.cxx:421
Int_t fBorderWidth
frame border width
Definition TGFrame.h:93
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3231
static Pixel_t fgDefaultSelectedBackground
Definition TGFrame.h:102
virtual void Activate(Bool_t)
Definition TGFrame.h:210
virtual Pixel_t GetForeground() const
Return frame foreground color.
Definition TGFrame.cxx:303
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition TGFrame.cxx:755
virtual UInt_t GetOptions() const
Definition TGFrame.h:197
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
Definition TGFrame.cxx:2504
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
Definition TGFrame.cxx:645
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition TGFrame.cxx:765
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition TGFrame.cxx:605
UInt_t fWidth
frame width
Definition TGFrame.h:87
UInt_t GetHeight() const
Definition TGFrame.h:225
virtual void Layout()
Definition TGFrame.h:199
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
Definition TGFrame.cxx:629
virtual void SetWidth(UInt_t w)
Definition TGFrame.h:246
virtual void MapWindow()
map window
Definition TGFrame.h:204
static Pixel_t fgWhitePixel
Definition TGFrame.h:103
UInt_t GetWidth() const
Definition TGFrame.h:224
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Definition TGFrame.cxx:2477
virtual void SetHeight(UInt_t h)
Definition TGFrame.h:247
Pixel_t fBackground
frame background color
Definition TGFrame.h:95
static const TGGC & GetBckgndGC()
Get background color graphics context.
Definition TGFrame.cxx:775
virtual void UnmapWindow()
unmap window
Definition TGFrame.h:206
Encapsulate a graphics context used in the low level graphics.
Definition TGGC.h:22
GContext_t GetGC() const
Definition TGGC.h:41
void SetLineWidth(Int_t v)
Set line width.
Definition TGGC.cxx:300
void SetCapStyle(Int_t v)
Set cap style (kCapNotLast, kCapButt, kCapRound, kCapProjecting).
Definition TGGC.cxx:322
void SetDashList(const char v[], Int_t len)
Set dash pattern. First use SetDashOffset() if not 0.
Definition TGGC.cxx:488
void SetLineStyle(Int_t v)
Set line style (kLineSolid, kLineOnOffDash, kLineDoubleDash).
Definition TGGC.cxx:311
virtual void DoRedraw()
Redraw icon & text listbox entry.
virtual void SetPicture(const TGPicture *pic=nullptr)
Change the icon of listbox entry containing icon & text.
virtual ~TGIconLBEntry()
Delete icon & text listbox entry.
TGIconLBEntry(const TGIconLBEntry &)=delete
virtual void Update(TGLBEntry *e)
Update icon & text listbox entry.
const TGPicture * fPicture
Definition TGListBox.h:139
virtual void DrawCopy(Handle_t id, Int_t x, Int_t y)
Draw copy on window/pixmap.
A Composite frame that contains a list of TGLBEnties.
Definition TGListBox.h:163
virtual void RemoveAll()
Remove all entries in this container.
TGLBContainer(const TGLBContainer &)=delete
Bool_t fMultiSelect
true if multi selection is switched on
Definition TGListBox.h:174
virtual Bool_t GetSelection(Int_t id)
Returns kTrue if entry id is selected.
virtual void Layout()
Layout container.
virtual void SetListBox(TGListBox *lb)
Definition TGListBox.h:196
virtual void OnAutoScroll()
Autoscroll while close to & beyond The Wall.
Int_t fChangeStatus
defines the changes (select or unselect) while the mouse moves over a multi selectable list box
Definition TGListBox.h:175
virtual Int_t GetSelected() const
Returns id of selected entry.
virtual void ActivateItem(TGFrameElement *el)
Activate item.
virtual Bool_t GetMultipleSelections() const
Definition TGListBox.h:215
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.
TGLBEntry * fLastActive
last active listbox entry in single selection listbox
Definition TGListBox.h:172
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)
Definition TGListBox.h:195
TGListBox * fListBox
list box which contains this container
Definition TGListBox.h:173
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.
Basic listbox entries.
Definition TGListBox.h:24
Pixel_t fBkcolor
entry background color
Definition TGListBox.h:28
virtual void SetBackgroundColor(Pixel_t col)
Set background color (override from TGWindow base class).
Definition TGListBox.h:42
Int_t fEntryId
message id of listbox entry
Definition TGListBox.h:27
virtual void Activate(Bool_t a)
Toggle active state of listbox entry.
virtual void Toggle()
Toggle active state of listbox entry.
Int_t EntryId() const
Definition TGListBox.h:40
Bool_t fActive
true if entry is active
Definition TGListBox.h:29
virtual void DoRedraw()
Redraw the frame.
Definition TGListBox.h:31
TGLBEntry(const TGWindow *p=0, Int_t id=-1, UInt_t options=kHorizontalFrame, Pixel_t back=GetWhitePixel())
Base class entry constructor.
Definition TGListBox.cxx:99
TGLBFrameElement(TGFrame *f, TGLayoutHints *l)
Int_t Compare(const TObject *obj) const
Compare abstract method.
virtual ~TGLBFrameElement()
Bool_t IsSortable() const
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
Line style and width listbox entries.
Definition TGListBox.h:97
Style_t fLineStyle
line style
Definition TGListBox.h:105
TGGC * fLineGC
line graphics context
Definition TGListBox.h:107
virtual void DoRedraw()
Redraw line style listbox entry.
UInt_t fLineLength
line length
Definition TGListBox.h:106
UInt_t fLineWidth
line width
Definition TGListBox.h:104
virtual ~TGLineLBEntry()
Delete line style listbox entry.
virtual void SetLineWidth(Int_t width)
Set or change line width 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.
TGLineLBEntry(const TGLineLBEntry &)=delete
virtual void Update(TGLBEntry *e)
Update line style listbox entry.
A listbox is a box, possibly with scrollbar, containing entries.
Definition TGListBox.h:221
virtual void InitListBox()
Initiate the internal classes of a list box.
Bool_t fIntegralHeight
true if height should be multiple of fItemVsize
Definition TGListBox.h:229
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 ~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
Definition TGListBox.h:270
TGViewPort * fVport
listbox viewport (see TGCanvas.h)
Definition TGListBox.h:231
UInt_t fItemVsize
maximum height of single entry
Definition TGListBox.h:228
virtual Int_t GetNumberOfEntries() const
Definition TGListBox.h:263
TGLBContainer * fLbc
listbox container
Definition TGListBox.h:230
virtual TGDimension GetDefaultSize() const
Return default size of listbox widget.
virtual void DrawBorder()
Draw borders of the list box widget.
virtual TGLBEntry * GetSelectedEntry() const
Definition TGListBox.h:288
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
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 Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Process messages generated by the listbox container and forward messages to the listbox message handl...
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()
Definition TGListBox.h:300
virtual Bool_t GetMultipleSelections() const
Definition TGListBox.h:261
void SetContainer(TGFrame *f)
Definition TGListBox.h:234
TGVScrollBar * fVScrollbar
vertical scrollbar
Definition TGListBox.h:232
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 TGViewPort * GetViewPort() const
Definition TGListBox.h:268
virtual TGFrame * GetContainer() const
Definition TGListBox.h:267
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.
TGClient * fClient
Connection to display server.
Definition TGObject.h:27
Handle_t fId
X11/Win32 Window identifier.
Definition TGObject.h:26
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition TGPicture.h:25
UInt_t GetHeight() const
Definition TGPicture.h:53
void Draw(Option_t *="")
Default Draw method for all objects.
Definition TGPicture.h:46
UInt_t GetWidth() const
Definition TGPicture.h:52
Int_t fY
y position
Definition TGDimension.h:39
Int_t fX
x position
Definition TGDimension.h:38
Pixel_t GetBlackColor() const
Pixel_t GetSelectedFgndColor() const
virtual Int_t GetPosition() const
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
Definition TGString.h:20
Int_t GetLength() const
Definition TGString.h:29
const char * GetString() const
Definition TGString.h:30
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
Definition TGString.cxx:56
Text string listbox entries.
Definition TGListBox.h:48
UInt_t fTWidth
text width
Definition TGListBox.h:52
Bool_t fTextChanged
true if text has been changed
Definition TGListBox.h:54
const TGString * GetText() const
Definition TGListBox.h:79
GContext_t fNormGC
text drawing graphics context
Definition TGListBox.h:55
static const TGFont * fgDefaultFont
Definition TGListBox.h:60
UInt_t fTHeight
text height
Definition TGListBox.h:53
TGString * fText
entry text string
Definition TGListBox.h:51
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a list box entry widget as a C++ statement(s) on output stream out.
FontStruct_t fFontStruct
font used to draw string
Definition TGListBox.h:56
virtual const char * GetTitle() const
Returns title of object.
Definition TGListBox.h:81
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)
Definition TGListBox.h:85
static const TGGC & GetDefaultGC()
Return default graphics context in use for a text listbox entry.
TGTextLBEntry(const TGTextLBEntry &)=delete
virtual void DoRedraw()
Redraw text listbox entry.
static TGGC * fgDefaultGC
Definition TGListBox.h:61
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.
The TGVScrollBar will generate the following event messages: kC_VSCROLL, kSB_SLIDERPOS,...
virtual void SetPosition(Int_t pos)
Set logical slider position of vertical scrollbar.
virtual void SetRange(Int_t range, Int_t page_size)
Set range of vertical scrollbar.
TGFrame * GetContainer() const
Definition TGCanvas.h:173
virtual void SetVPos(Int_t ypos)
Moves content of container frame in vertical direction.
Definition TGCanvas.cxx:229
Int_t fWidgetId
the widget id (used for event processing)
Definition TGWidget.h:46
virtual void Associate(const TGWindow *w)
Definition TGWidget.h:72
const TGWindow * fMsgWindow
window which handles widget events
Definition TGWidget.h:48
ROOT GUI Window base class.
Definition TGWindow.h:23
virtual void SetWindowName(const char *name=0)
Set window name.
Definition TGWindow.cxx:129
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition TGWindow.cxx:336
virtual void SetEditDisabled(UInt_t on=kEditDisable)
Definition TGWindow.h:106
const TGWindow * fParent
Parent window.
Definition TGWindow.h:28
@ kEditDisableLayout
window layout cannot be edited
Definition TGWindow.h:53
@ kEditDisableBtnEnable
window can handle mouse button events
Definition TGWindow.h:57
@ kEditDisableGrab
window grab cannot be edited
Definition TGWindow.h:52
@ kEditDisable
disable edit of this window
Definition TGWindow.h:50
@ kEditDisableKeyEnable
window can handle keyboard events
Definition TGWindow.h:58
virtual void DestroyWindow()
destroy window
Definition TGWindow.cxx:192
const TGWindow * GetParent() const
Definition TGWindow.h:76
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
Definition TGWindow.cxx:295
UInt_t fEditDisabled
flags used for "guibuilding"
Definition TGWindow.h:32
A doubly linked list.
Definition TList.h:38
virtual void Add(TObject *obj)
Definition TList.h:81
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
Definition TList.cxx:330
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Definition TList.cxx:822
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
Definition TList.cxx:100
virtual void AddAfter(const TObject *after, TObject *obj)
Insert object after object after in the list.
Definition TList.cxx:250
virtual void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
Definition TList.cxx:196
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Definition TList.cxx:659
virtual void Sort(Bool_t order=kSortAscending)
Sort linked list.
Definition TList.cxx:937
Mother of all ROOT objects.
Definition TObject.h:41
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition TObject.cxx:515
virtual const char * GetTitle() const
Returns title of object.
Definition TObject.cxx:473
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition TQObject.h:164
void AddReference()
Definition TRefCnt.h:40
Basic string class.
Definition TString.h:136
const char * Data() const
Definition TString.h:369
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition TString.h:692
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.
Definition TSystem.cxx:466
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
Definition TSystem.cxx:474
virtual TTimer * RemoveTimer(TTimer *t)
Remove timer from list of system timers.
Definition TSystem.cxx:484
void Reset()
Reset the timer.
Definition TTimer.cxx:157
TText * text
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
TF1 * f1
Definition legend1.C:11
Short_t Max(Short_t a, Short_t b)
Definition TMathBase.h:208
Double_t Ceil(Double_t x)
Definition TMath.h:645
Event structure.
Definition GuiTypes.h:174
EGEventType fType
of event (see EGEventType)
Definition GuiTypes.h:175
Int_t fXRoot
Definition GuiTypes.h:179
UInt_t fState
key or button mask
Definition GuiTypes.h:181
Int_t fYRoot
coordinates relative to root
Definition GuiTypes.h:179
UInt_t fCode
key or button code
Definition GuiTypes.h:180
Graphics context structure.
Definition GuiTypes.h:224
Int_t fDashOffset
patterned/dashed line information
Definition GuiTypes.h:248
Int_t fLineWidth
line width
Definition GuiTypes.h:229
Mask_t fMask
bit mask specifying which fields are valid
Definition GuiTypes.h:251
Int_t fLineStyle
kLineSolid, kLineOnOffDash, kLineDoubleDash
Definition GuiTypes.h:230
Char_t fDashes[8]
dash pattern list (dash length per byte)
Definition GuiTypes.h:249
Int_t fFillStyle
kFillSolid, kFillTiled, kFillStippled, kFillOpaeueStippled
Definition GuiTypes.h:234
Int_t fDashLen
number of dashes in fDashes
Definition GuiTypes.h:250
TCanvas * style()
Definition style.C:1
auto * l
Definition textangle.C:4
auto * t1
Definition textangle.C:20