Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGGC.cxx
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Fons Rademakers 20/9/2000
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// //
14// TGGC and TGGCPool //
15// //
16// Encapsulate a graphics context used in the low level graphics. //
17// TGGCPool provides a pool of graphics contexts. //
18// //
19//////////////////////////////////////////////////////////////////////////
20
21#include "TGClient.h"
22#include "TGGC.h"
23#include "TVirtualX.h"
24#include "THashTable.h"
25#include "TColor.h"
26#include "TROOT.h"
27
28#include <iostream>
29#include <cstring>
30
31
33
34////////////////////////////////////////////////////////////////////////////////
35/// Create a graphics context (only called via TGGCPool::GetGC()).
36
38{
39 fContext = 0;
40 if (values) {
41 fValues = *values;
42 fContext = gVirtualX->CreateGC(gVirtualX->GetDefaultRootWindow(), values);
43 if (values->fMask & kGCDashList) {
44 if (values->fDashLen > (Int_t)sizeof(fValues.fDashes))
45 Warning("TGGC", "dash list can have only up to %ld elements",
46 (Long_t)sizeof(fValues.fDashes));
50 }
51 } else {
52 fValues = {};
53 fContext = 0;
54 }
55 SetRefCount(1);
56}
57
58////////////////////////////////////////////////////////////////////////////////
59/// Create a graphics context, registers GC in GCPool.
60
62{
63 fContext = 0;
64 // case of default ctor at program startup before gClient exists
65 if (!values) {
66 fValues = {};
67 fContext = 0;
68 SetRefCount(1);
69 return;
70 }
71
72 if (gClient)
73 gClient->GetGC(values, kTRUE);
74 else {
75 fContext = 0;
76 Error("TGGC", "TGClient not yet initialized, should never happen");
77 }
78}
79
80////////////////////////////////////////////////////////////////////////////////
81/// Copy a graphics context.
82
84{
85 fValues = g.fValues;
86 if (g.fContext) {
87 fContext = gVirtualX->CreateGC(gVirtualX->GetDefaultRootWindow(), &fValues);
91 } else
92 fContext = 0;
93 SetRefCount(1);
94
95 if (gClient)
96 gClient->GetGCPool()->fList->Add(this);
97}
98
99////////////////////////////////////////////////////////////////////////////////
100/// Delete graphics context.
101
103{
104 if (gClient)
105 gClient->GetGCPool()->ForceFreeGC(this);
106
107 if (fContext)
108 gVirtualX->DeleteGC(fContext);
109}
110
111////////////////////////////////////////////////////////////////////////////////
112/// Graphics context assignment operator.
113
115{
116 if (this != &rhs) {
117 if (!fContext && gClient) {
118 TGGC *gc = gClient->GetGCPool()->FindGC(this);
119 if (!gc)
120 gClient->GetGCPool()->fList->Add(this);
121 }
122 if (fContext)
123 gVirtualX->DeleteGC(fContext);
125 fValues = rhs.fValues;
126 fContext = gVirtualX->CreateGC(gVirtualX->GetDefaultRootWindow(), &fValues);
130 }
131 return *this;
132}
133
134////////////////////////////////////////////////////////////////////////////////
135/// Not inline due to a bug in g++ 2.96 20000731 (Red Hat Linux 7.0).
136
138{
139 return fContext;
140}
141
142////////////////////////////////////////////////////////////////////////////////
143/// Update values + mask.
144
146{
147 fValues.fMask |= values->fMask;
148
149 for (Mask_t bit = 1; bit <= fValues.fMask; bit <<= 1) {
150 switch (bit & values->fMask) {
151 default:
152 case 0:
153 continue;
154 case kGCFunction:
155 fValues.fFunction = values->fFunction;
156 break;
157 case kGCPlaneMask:
158 fValues.fPlaneMask = values->fPlaneMask;
159 break;
160 case kGCForeground:
162 break;
163 case kGCBackground:
165 break;
166 case kGCLineWidth:
167 fValues.fLineWidth = values->fLineWidth;
168 break;
169 case kGCLineStyle:
170 fValues.fLineStyle = values->fLineStyle;
171 break;
172 case kGCCapStyle:
173 fValues.fCapStyle = values->fCapStyle;
174 break;
175 case kGCJoinStyle:
176 fValues.fJoinStyle = values->fJoinStyle;
177 break;
178 case kGCFillStyle:
179 fValues.fFillStyle = values->fFillStyle;
180 break;
181 case kGCFillRule:
182 fValues.fFillRule = values->fFillRule;
183 break;
184 case kGCTile:
185 fValues.fTile = values->fTile;
186 break;
187 case kGCStipple:
188 fValues.fStipple = values->fStipple;
189 break;
191 fValues.fTsXOrigin = values->fTsXOrigin;
192 break;
194 fValues.fTsYOrigin = values->fTsYOrigin;
195 break;
196 case kGCFont:
197 fValues.fFont = values->fFont;
198 break;
199 case kGCSubwindowMode:
201 break;
204 break;
205 case kGCClipXOrigin:
207 break;
208 case kGCClipYOrigin:
210 break;
211 case kGCClipMask:
212 fValues.fClipMask = values->fClipMask;
213 break;
214 case kGCDashOffset:
216 break;
217 case kGCDashList:
218 if (values->fDashLen > (Int_t)sizeof(fValues.fDashes))
219 Warning("UpdateValues", "dash list can have only up to %ld elements",
220 (Long_t)sizeof(fValues.fDashes));
222 memcpy(fValues.fDashes, values->fDashes, fValues.fDashLen);
223 break;
224 case kGCArcMode:
225 fValues.fArcMode = values->fArcMode;
226 break;
227 }
228 }
229}
230
231////////////////////////////////////////////////////////////////////////////////
232/// Set attributes as specified in the values structure.
233
235{
236 if (!fContext && gClient) {
237 TGGC *gc = gClient->GetGCPool()->FindGC(this);
238 if (!gc)
239 gClient->GetGCPool()->fList->Add(this);
240 }
241
242 if (fContext)
243 gVirtualX->ChangeGC(fContext, values);
244 else
245 fContext = gVirtualX->CreateGC(gVirtualX->GetDefaultRootWindow(), values);
246 UpdateValues(values);
247 if (values->fMask & kGCDashList)
250}
251
252////////////////////////////////////////////////////////////////////////////////
253/// Set graphics context drawing function.
254
256{
257 GCValues_t values;
258 values.fFunction = v;
259 values.fMask = kGCFunction;
260 SetAttributes(&values);
261}
262
263////////////////////////////////////////////////////////////////////////////////
264/// Set plane mask.
265
267{
268 GCValues_t values;
269 values.fPlaneMask = v;
270 values.fMask = kGCPlaneMask;
271 SetAttributes(&values);
272}
273
274////////////////////////////////////////////////////////////////////////////////
275/// Set foreground color.
276
278{
279 GCValues_t values;
280 values.fForeground = v;
281 values.fMask = kGCForeground;
282 SetAttributes(&values);
283}
284
285////////////////////////////////////////////////////////////////////////////////
286/// Set background color.
287
289{
290 GCValues_t values;
291 values.fBackground = v;
292 values.fMask = kGCBackground;
293 SetAttributes(&values);
294}
295
296////////////////////////////////////////////////////////////////////////////////
297/// Set line width.
298
300{
301 GCValues_t values;
302 values.fLineWidth = v;
303 values.fMask = kGCLineWidth;
304 SetAttributes(&values);
305}
306
307////////////////////////////////////////////////////////////////////////////////
308/// Set line style (kLineSolid, kLineOnOffDash, kLineDoubleDash).
309
311{
312 GCValues_t values;
313 values.fLineStyle = v;
314 values.fMask = kGCLineStyle;
315 SetAttributes(&values);
316}
317
318////////////////////////////////////////////////////////////////////////////////
319/// Set cap style (kCapNotLast, kCapButt, kCapRound, kCapProjecting).
320
322{
323 GCValues_t values;
324 values.fCapStyle = v;
325 values.fMask = kGCCapStyle;
326 SetAttributes(&values);
327}
328
329////////////////////////////////////////////////////////////////////////////////
330/// Set line join style (kJoinMiter, kJoinRound, kJoinBevel).
331
333{
334 GCValues_t values;
335 values.fJoinStyle = v;
336 values.fMask = kGCJoinStyle;
337 SetAttributes(&values);
338}
339
340////////////////////////////////////////////////////////////////////////////////
341/// Set fill style (kFillSolid, kFillTiled, kFillStippled,
342/// kFillOpaeueStippled).
343
345{
346 GCValues_t values;
347 values.fFillStyle = v;
348 values.fMask = kGCFillStyle;
349 SetAttributes(&values);
350}
351
352////////////////////////////////////////////////////////////////////////////////
353/// Set fill rule (kEvenOddRule, kWindingRule).
354
356{
357 GCValues_t values;
358 values.fFillRule = v;
359 values.fMask = kGCFillRule;
360 SetAttributes(&values);
361}
362
363////////////////////////////////////////////////////////////////////////////////
364/// Set tile pixmap for tiling operations.
365
367{
368 GCValues_t values;
369 values.fTile = v;
370 values.fMask = kGCTile;
371 SetAttributes(&values);
372}
373
374////////////////////////////////////////////////////////////////////////////////
375/// Set 1 plane pixmap for stippling.
376
378{
379 GCValues_t values;
380 values.fStipple = v;
381 values.fMask = kGCStipple;
382 SetAttributes(&values);
383}
384
385////////////////////////////////////////////////////////////////////////////////
386/// X offset for tile or stipple operations.
387
389{
390 GCValues_t values;
391 values.fTsXOrigin = v;
392 values.fMask = kGCTileStipXOrigin;
393 SetAttributes(&values);
394}
395
396////////////////////////////////////////////////////////////////////////////////
397/// Y offset for tile or stipple operations.
398
400{
401 GCValues_t values;
402 values.fTsYOrigin = v;
403 values.fMask = kGCTileStipYOrigin;
404 SetAttributes(&values);
405}
406
407////////////////////////////////////////////////////////////////////////////////
408/// Set font.
409
411{
412 GCValues_t values;
413 values.fFont = v;
414 values.fMask = kGCFont;
415 SetAttributes(&values);
416}
417
418////////////////////////////////////////////////////////////////////////////////
419/// Set sub window mode (kClipByChildren, kIncludeInferiors).
420
422{
423 GCValues_t values;
424 values.fSubwindowMode = v;
425 values.fMask = kGCSubwindowMode;
426 SetAttributes(&values);
427}
428
429////////////////////////////////////////////////////////////////////////////////
430/// True if graphics exposure should be generated.
431
433{
434 GCValues_t values;
435 values.fGraphicsExposures = v;
437 SetAttributes(&values);
438}
439
440////////////////////////////////////////////////////////////////////////////////
441/// X origin for clipping.
442
444{
445 GCValues_t values;
446 values.fClipXOrigin = v;
447 values.fMask = kGCClipXOrigin;
448 SetAttributes(&values);
449}
450
451////////////////////////////////////////////////////////////////////////////////
452/// Y origin for clipping.
453
455{
456 GCValues_t values;
457 values.fClipYOrigin = v;
458 values.fMask = kGCClipYOrigin;
459 SetAttributes(&values);
460}
461
462////////////////////////////////////////////////////////////////////////////////
463/// Bitmap for clipping.
464
466{
467 GCValues_t values;
468 values.fClipMask = v;
469 values.fMask = kGCClipMask;
470 SetAttributes(&values);
471}
472
473////////////////////////////////////////////////////////////////////////////////
474/// Patterned/dashed line offset.
475
477{
478 GCValues_t values;
479 values.fDashOffset = v;
480 values.fMask = kGCDashOffset;
481 SetAttributes(&values);
482}
483
484////////////////////////////////////////////////////////////////////////////////
485/// Set dash pattern. First use SetDashOffset() if not 0.
486
487void TGGC::SetDashList(const char v[], Int_t len)
488{
489 GCValues_t values;
490 if (len > (Int_t)sizeof(values.fDashes))
491 Warning("SetDashList", "dash list can have only up to %ld elements",
492 (Long_t)sizeof(values.fDashes));
493 values.fDashLen = TMath::Min(len, (Int_t)sizeof(values.fDashes));
494 memcpy(values.fDashes, v, values.fDashLen);
495 values.fMask = kGCDashList;
496 SetAttributes(&values);
497}
498
499////////////////////////////////////////////////////////////////////////////////
500/// Set arc mode (kArcChord, kArcPieSlice).
501
503{
504 GCValues_t values;
505 values.fArcMode = v;
506 values.fMask = kGCArcMode;
507 SetAttributes(&values);
508}
509
510////////////////////////////////////////////////////////////////////////////////
511/// Print graphics contexts info.
512
514{
515 Printf("TGGC: mask = %x, handle = %lx, ref cnt = %u", fValues.fMask,
517}
518
519////////////////////////////////////////////////////////////////////////////////
520/// Returns GC mask as a string - used in SavePrimitive().
521
523{
524 TString mask;
525
526 Mask_t fmask = GetMask();
527
528 if (fmask & kGCFunction) {
529 if (mask.Length() == 0) mask = "kGCFunction";
530 else mask += " | kGCFunction";
531 }
532 if (fmask & kGCPlaneMask) {
533 if (mask.Length() == 0) mask = "kGCPlaneMask";
534 else mask += " | kGCPlaneMask";
535 }
536 if (fmask & kGCForeground) {
537 if (mask.Length() == 0) mask = "kGCForeground";
538 else mask += " | kGCForeground";
539 }
540 if (fmask & kGCBackground) {
541 if (mask.Length() == 0) mask = "kGCBackground";
542 else mask += " | kGCBackground";
543 }
544 if (fmask & kGCLineWidth) {
545 if (mask.Length() == 0) mask = "kGCLineWidth";
546 else mask += " | kGCLineWidth";
547 }
548 if (fmask & kGCLineStyle) {
549 if (mask.Length() == 0) mask = "kGCLineStyle";
550 else mask += " | kGCLineStyle";
551 }
552 if (fmask & kGCCapStyle) {
553 if (mask.Length() == 0) mask = "kGCCapStyle";
554 else mask += " | kGCCapStyle";
555 }
556 if (fmask & kGCJoinStyle) {
557 if (mask.Length() == 0) mask = "kGCJoinStyle";
558 else mask += " | kGCJoinStyle";
559 }
560 if (fmask & kGCFillStyle) {
561 if (mask.Length() == 0) mask = "kGCFillStyle";
562 else mask += " | kGCFillStyle";
563 }
564 if (fmask & kGCFillRule) {
565 if (mask.Length() == 0) mask = "kGCFillRule";
566 else mask += " | kGCFillRule";
567 }
568 if (fmask & kGCTile) {
569 if (mask.Length() == 0) mask = "kGCTile";
570 else mask += " | kGCTile";
571 }
572 if (fmask & kGCStipple) {
573 if (mask.Length() == 0) mask = "kGCStipple";
574 else mask += " | kGCStipple";
575 }
576 if (fmask & kGCTileStipXOrigin) {
577 if (mask.Length() == 0) mask = "kGCTileStipXOrigin";
578 else mask += " | kGCTileStipXOrigin";
579 }
580 if (fmask & kGCTileStipYOrigin) {
581 if (mask.Length() == 0) mask = "kGCTileStipYOrigin";
582 else mask += " | kGCTileStipYOrigin";
583 }
584 if (fmask & kGCFont) {
585 if (mask.Length() == 0) mask = "kGCFont";
586 else mask += " | kGCFont";
587 }
588 if (fmask & kGCSubwindowMode) {
589 if (mask.Length() == 0) mask = "kGCSubwindowMode";
590 else mask += " | kGCSubwindowMode";
591 }
592 if (fmask & kGCGraphicsExposures) {
593 if (mask.Length() == 0) mask = "kGCGraphicsExposures";
594 else mask += " | kGCGraphicsExposures";
595 }
596 if (fmask & kGCClipXOrigin) {
597 if (mask.Length() == 0) mask = "kGCClipXOrigin";
598 else mask += " | kGCClipXOrigin";
599 }
600 if (fmask & kGCClipYOrigin) {
601 if (mask.Length() == 0) mask = "kGCClipYOrigin";
602 else mask += " | kGCClipYOrigin";
603 }
604 if (fmask & kGCClipMask) {
605 if (mask.Length() == 0) mask = "kGCClipMask";
606 else mask += " | kGCClipMask";
607 }
608 if (fmask & kGCDashOffset) {
609 if (mask.Length() == 0) mask = "kGCDashOffset";
610 else mask += " | kGCDashOffset";
611 }
612 if (fmask & kGCDashList) {
613 if (mask.Length() == 0) mask = "kGCDashList";
614 else mask += " | kGCDashList";
615 }
616 if (fmask & kGCArcMode) {
617 if (mask.Length() == 0) mask = "kGCArcMode";
618 else mask += " | kGCArcMode";
619 }
620 return mask;
621}
622
623////////////////////////////////////////////////////////////////////////////////
624/// Save graphics context info as a C++ statement(s) on output stream out
625
626void TGGC::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
627{
628 if (gROOT->ClassSaved(TGGC::Class())) {
629 out << std::endl;
630 } else {
631 // declare graphics context object to reflect required user changes
632 out << std::endl;
633 out << " TGGC *uGC; // will reflect user GC changes" << std::endl;
634 }
635
636 Mask_t fmask = GetMask();
637
638 const char *colorname;
639 TString valname;
640 char quote ='"';
641 ULong_t color;
642
643 valname = TString::Format("val%s", option);
644
645 out << " // graphics context changes" << std::endl;
646 //out << " TGGC *uGC" << option << ";" << std::endl;
647 out << " GCValues_t " << valname.Data() << ";" << std::endl;
648 out << " " << valname.Data() << ".fMask = " << GetMaskString() << ";" << std::endl;
649
650 for (Mask_t bit = 1; bit <= fmask; bit <<= 1) {
651 switch (bit & fmask) {
652 default:
653 case 0:
654 continue;
655 case kGCFunction:
656 out << " " << valname.Data() << ".fFunction = ";
657 switch (GetFunction()) {
658 case kGXclear:
659 out << "kGXclear";
660 break;
661 case kGXand:
662 out << "kGXand";
663 break;
664 case kGXandReverse:
665 out << "kGXandReverse";
666 break;
667 case kGXcopy:
668 out << "kGXcopy";
669 break;
670 case kGXandInverted:
671 out << "kGXandInverted";
672 break;
673 case kGXnoop:
674 out << "kGXnoop";
675 break;
676 case kGXxor:
677 out << "kGXxor";
678 break;
679 case kGXor:
680 out << "kGXor";
681 break;
682 case kGXnor:
683 out << "kGXnor";
684 break;
685 case kGXequiv:
686 out << "kGXequiv";
687 break;
688 case kGXinvert:
689 out << "kGXinvert";
690 break;
691 case kGXorReverse:
692 out << "kGXorReverse";
693 break;
694 case kGXcopyInverted:
695 out << "kGXcopyInverted";
696 break;
697 case kGXorInverted:
698 out << "kGXorInverted";
699 break;
700 case kGXnand:
701 out << "kGXnand";
702 break;
703 case kGXset:
704 out << "kGXset";
705 break;
706 }
707 out << ";" << std::endl;
708 break;
709 case kGCPlaneMask:
710 out << " " << valname.Data() << ".fPlaneMask = " << GetPlaneMask() << ";" << std::endl;
711 break;
712 case kGCForeground:
713 color = GetForeground();
714 colorname = TColor::PixelAsHexString(color);
715 out << " gClient->GetColorByName(" << quote << colorname << quote
716 << "," << valname.Data() << ".fForeground);" << std::endl;
717 break;
718 case kGCBackground:
719 color = GetBackground();
720 colorname = TColor::PixelAsHexString(color);
721 out << " gClient->GetColorByName(" << quote << colorname << quote
722 << "," << valname.Data() << ".fBackground);" << std::endl;
723 break;
724 case kGCLineWidth:
725 out << " " << valname.Data() << ".fLineWidth = " << GetLineWidth() << ";" << std::endl;
726 break;
727 case kGCLineStyle:
728 out << " " << valname.Data() << ".fLineStyle = ";
729 switch (GetLineStyle()) {
730 case kLineSolid:
731 out << "kLineSolid";
732 break;
733 case kLineOnOffDash:
734 out << "kLineOnOffDash";
735 break;
736 case kLineDoubleDash:
737 out << "kLineDoubleDash";
738 break;
739 }
740 out << ";" << std::endl;
741 break;
742 case kGCCapStyle:
743 out << " " << valname.Data() << ".fCapStyle = ";
744 switch (GetCapStyle()) {
745 case kCapNotLast:
746 out << "kCapNotLast";
747 break;
748 case kCapButt:
749 out << "kCapButt";
750 break;
751 case kCapRound:
752 out << "kCapRound";
753 break;
754 case kCapProjecting:
755 out << "kCapProjecting";
756 break;
757 }
758 out << ";" << std::endl;
759 break;
760 case kGCJoinStyle:
761 out << " " << valname.Data() << ".fJoinStyle = ";
762 switch (GetJoinStyle()) {
763 case kJoinMiter:
764 out << "kJoinMiter";
765 break;
766 case kJoinRound:
767 out << "kJoinRound";
768 break;
769 case kJoinBevel:
770 out << "kJoinBevel";
771 break;
772 }
773 out << ";" << std::endl;
774 break;
775 case kGCFillStyle:
776 out << " " << valname.Data() << ".fFillStyle = ";
777 switch (GetFillStyle()) {
778 case kFillSolid:
779 out << "kFillSolid";
780 break;
781 case kFillTiled:
782 out << "kFillTiled";
783 break;
784 case kFillStippled:
785 out << "kFillStippled";
786 break;
788 out << "kFillOpaqueStippled";
789 break;
790 }
791 out << ";" << std::endl;
792 break;
793 case kGCFillRule:
794 out << " " << valname.Data() << ".fFillRule = ";
795 switch (GetFillRule()) {
796 case kEvenOddRule:
797 out << "kEvenOddRule";
798 break;
799 case kWindingRule:
800 out << "kWindingRule";
801 break;
802 }
803 out << ";" << std::endl;
804 break;
805 case kGCTile:
806 out << " " << valname.Data() << ".fTile = " << GetTile() << ";" << std::endl;
807 break;
808 case kGCStipple:
809 out << " " << valname.Data() << ".fStipple = " << GetStipple() << ";" << std::endl;
810 break;
812 out << " " << valname.Data() << ".fTsXOrigin = " << GetTileStipXOrigin() << ";" << std::endl;
813 break;
815 out << " " << valname.Data() << ".fTsYOrigin = " << GetTileStipYOrigin() << ";" << std::endl;
816 break;
817 case kGCFont:
818 out << " " << valname.Data() << ".fFont = ufont->GetFontHandle();" << std::endl;
819 break;
820 case kGCSubwindowMode:
821 out << " " << valname.Data() << ".fSubwindowMode = ";
822 switch (GetSubwindowMode()) {
823 case kClipByChildren:
824 out << "kClipByChildren";
825 break;
827 out << "kIncludeInferiors";
828 break;
829 }
830 out << ";" << std::endl;
831 break;
833 out << " " << valname.Data() << ".fGraphicsExposures = ";
835 out << "kTRUE";
836 else
837 out << "kFALSE";
838 out << ";" << std::endl;
839 break;
840 case kGCClipXOrigin:
841 out << " " << valname.Data() << ".fClipXOrigin = " << GetClipXOrigin() << ";" << std::endl;
842 break;
843 case kGCClipYOrigin:
844 out << " " << valname.Data() << ".fClipYOrigin = " << GetClipYOrigin() << ";" << std::endl;
845 break;
846 case kGCClipMask:
847 out << " " << valname.Data() << ".fClipMask = " << GetClipMask() << ";" << std::endl;
848 break;
849 case kGCDashOffset:
850 out << " " << valname.Data() << ".fDashOffset = " << GetDashOffset() << ";" << std::endl;
851 break;
852 case kGCDashList:
853 if (GetDashLen() > (Int_t)sizeof(GetDashes()))
854 Warning("TGGC::SavePrimitive", "dash list can have only up to %ld elements",
855 (Long_t)sizeof(GetDashes()));
856 out << " " << valname.Data() << ".fDashLen = "
857 << TMath::Min(GetDashLen(),(Int_t)sizeof(GetDashes())) << ";" << std::endl;
858 out << " memcpy(GetDashes()," << valname.Data() << ".fDashes,"
859 << valname.Data() << ".fDashLen);" << std::endl;
860 break;
861 case kGCArcMode:
862 out << " " << valname.Data() << ".fArcMode = ";
863 switch (GetArcMode()) {
864 case kArcChord:
865 out << "kArcChord";
866 break;
867 case kArcPieSlice:
868 out << "kArcPieSlice";
869 break;
870 }
871 out << ";" << std::endl;
872 break;
873 }
874 }
875 out << " uGC = gClient->GetGC(&" << valname.Data() << ", kTRUE);" << std::endl;
876}
877
878
880
881////////////////////////////////////////////////////////////////////////////////
882/// Create graphics context pool.
883
885{
886 fClient = client;
887 fList = new THashTable;
888 fList->SetOwner();
889}
890
891////////////////////////////////////////////////////////////////////////////////
892/// Delete graphics context pool.
893
895{
896 delete fList;
897}
898
899////////////////////////////////////////////////////////////////////////////////
900/// Force remove graphics context from list. Is only called via ~TGGC().
901
903{
904 TGGC *gc = (TGGC *) fList->FindObject(gct);
905
906 if (gc) {
907 if (gc->References() > 1)
908 Error("ForceFreeGC", "removed a shared graphics context\n"
909 "best to use graphics contexts via the TGGCPool()");
910 fList->Remove(gc);
911 }
912}
913
914////////////////////////////////////////////////////////////////////////////////
915/// Delete graphics context if it is not used anymore.
916
917void TGGCPool::FreeGC(const TGGC *gct)
918{
919 TGGC *gc = (TGGC *) fList->FindObject(gct);
920
921 if (gc) {
922 if (gc->RemoveReference() == 0) {
923 fList->Remove(gc);
924 delete gc;
925 }
926 }
927}
928
929////////////////////////////////////////////////////////////////////////////////
930/// Delete graphics context if it is not used anymore.
931
933{
934 TIter next(fList);
935
936 while (TGGC *gc = (TGGC *) next()) {
937 if (gc->fContext == gct) {
938 if (gc->RemoveReference() == 0) {
939 fList->Remove(gc);
940 delete gc;
941 return;
942 }
943 }
944 }
945}
946
947////////////////////////////////////////////////////////////////////////////////
948/// Find graphics context. Returns 0 in case gc is not found.
949
951{
952 return (TGGC*) fList->FindObject(gct);
953}
954
955////////////////////////////////////////////////////////////////////////////////
956/// Find graphics context based on its GContext_t handle. Returns 0
957/// in case gc is not found.
958
960{
961 TIter next(fList);
962
963 while (TGGC *gc = (TGGC *) next()) {
964 if (gc->fContext == gct)
965 return gc;
966 }
967 return 0;
968}
969
970////////////////////////////////////////////////////////////////////////////////
971/// returns graphics context based on its GContext_t handle.
972
974{
975 GCValues_t gval;
976 gVirtualX->GetGCValues(gct, gval);
977 return GetGC(&gval, kTRUE);
978}
979
980////////////////////////////////////////////////////////////////////////////////
981/// Get the best matching graphics context depending on values.
982/// If rw is false only a readonly, not modifiable graphics context
983/// is returned. If rw is true a new modifiable graphics context is
984/// returned.
985
987{
988 TGGC *gc, *best_match = 0;
989 Int_t matching_bits, best_matching_bits = -1;
990 Bool_t exact = kFALSE;
991
992 if (!values)
993 rw = kTRUE;
994
995 if (!rw) {
996
997 // First, try to find an exact matching GC.
998 // If no one found, then use the closest one.
999
1000 TIter next(fList);
1001
1002 while ((gc = (TGGC *) next())) {
1003 matching_bits = MatchGC(gc, values);
1004 if (matching_bits > best_matching_bits) {
1005 best_matching_bits = matching_bits;
1006 best_match = gc;
1007 if ((gc->fValues.fMask & values->fMask) == values->fMask) {
1008 exact = kTRUE;
1009 break;
1010 }
1011 }
1012 }
1013
1014 if (best_match) {
1015 if (gDebug > 0)
1016 Printf("<TGGCPool::GetGC>: %smatching GC found\n", exact ? "exact " : "");
1017 best_match->AddReference();
1018 if (!exact) {
1019 // add missing values to the best_match'ing GC...
1020 UpdateGC(best_match, values);
1021 }
1022 return best_match;
1023 }
1024 }
1025
1026 gc = new TGGC(values, kTRUE);
1027
1028 fList->Add(gc);
1029
1030 return gc;
1031}
1032
1033////////////////////////////////////////////////////////////////////////////////
1034/// Try to find matching graphics context. On success returns the amount
1035/// of matching bits (which may be zero if masks have no common bits),
1036/// -1 on failure (when there are common bits but not a single match).
1037
1039{
1040 Mask_t bit, common_bits;
1041 Int_t matching_bits = -1;
1042 Bool_t match = kFALSE;
1043 const GCValues_t *gcv = &gc->fValues;
1044
1045 common_bits = values->fMask & gcv->fMask;
1046
1047 if (common_bits == 0) return 0; // no common bits, a possible
1048 // candidate anyway.
1049
1050 // Careful, check first the tile and stipple mask bits, as these
1051 // influence nearly all other GC functions... (do the same for
1052 // some other such bits as GCFunction, etc...). Perhaps we should
1053 // allow only exact GC matches.
1054
1055 if (gcv->fMask & kGCTile)
1056 if ((gcv->fTile != kNone) && !(values->fMask & kGCTile)) return -1;
1057 if (values->fMask & kGCTile)
1058 if ((values->fTile != kNone) && !(gcv->fMask & kGCTile)) return -1;
1059 if (gcv->fMask & kGCStipple)
1060 if ((gcv->fStipple != kNone) && !(values->fMask & kGCStipple)) return -1;
1061 if (values->fMask & kGCStipple)
1062 if ((values->fStipple != kNone) && !(gcv->fMask & kGCStipple)) return -1;
1063
1064 for (bit = 1; bit <= common_bits; bit <<= 1) {
1065 switch (bit & common_bits) {
1066 default:
1067 case 0:
1068 continue;
1069 case kGCFunction:
1070 match = (values->fFunction == gcv->fFunction);
1071 break;
1072 case kGCPlaneMask:
1073 match = (values->fPlaneMask == gcv->fPlaneMask);
1074 break;
1075 case kGCForeground:
1076 match = (values->fForeground == gcv->fForeground);
1077 break;
1078 case kGCBackground:
1079 match = (values->fBackground == gcv->fBackground);
1080 break;
1081 case kGCLineWidth:
1082 match = (values->fLineWidth == gcv->fLineWidth);
1083 break;
1084 case kGCLineStyle:
1085 match = (values->fLineStyle == gcv->fLineStyle);
1086 break;
1087 case kGCCapStyle:
1088 match = (values->fCapStyle == gcv->fCapStyle);
1089 break;
1090 case kGCJoinStyle:
1091 match = (values->fJoinStyle == gcv->fJoinStyle);
1092 break;
1093 case kGCFillStyle:
1094 match = (values->fFillStyle == gcv->fFillStyle);
1095 break;
1096 case kGCFillRule:
1097 match = (values->fFillRule == gcv->fFillRule);
1098 break;
1099 case kGCTile:
1100 match = (values->fTile == gcv->fTile);
1101 break;
1102 case kGCStipple:
1103 match = (values->fStipple == gcv->fStipple);
1104 break;
1105 case kGCTileStipXOrigin:
1106 match = (values->fTsXOrigin == gcv->fTsXOrigin);
1107 break;
1108 case kGCTileStipYOrigin:
1109 match = (values->fTsYOrigin == gcv->fTsYOrigin);
1110 break;
1111 case kGCFont:
1112 match = (values->fFont == gcv->fFont);
1113 break;
1114 case kGCSubwindowMode:
1115 match = (values->fSubwindowMode == gcv->fSubwindowMode);
1116 break;
1118 match = (values->fGraphicsExposures == gcv->fGraphicsExposures);
1119 break;
1120 case kGCClipXOrigin:
1121 match = (values->fClipXOrigin == gcv->fClipXOrigin);
1122 break;
1123 case kGCClipYOrigin:
1124 match = (values->fClipYOrigin == gcv->fClipYOrigin);
1125 break;
1126 case kGCClipMask:
1127 match = (values->fClipMask == gcv->fClipMask);
1128 break;
1129 case kGCDashOffset:
1130 match = (values->fDashOffset == gcv->fDashOffset);
1131 break;
1132 case kGCDashList:
1133 if (values->fDashLen == gcv->fDashLen)
1134 match = (strncmp(values->fDashes, gcv->fDashes, gcv->fDashLen) == 0);
1135 break;
1136 case kGCArcMode:
1137 match = (values->fArcMode == gcv->fArcMode);
1138 break;
1139 }
1140 if (!match)
1141 return -1;
1142 matching_bits++;
1143 match = kFALSE;
1144 }
1145
1146 return matching_bits;
1147}
1148
1149////////////////////////////////////////////////////////////////////////////////
1150/// Update graphics context with the values spcified in values->fMask.
1151
1153{
1154 gc->SetAttributes(values);
1155}
1156
1157////////////////////////////////////////////////////////////////////////////////
1158/// List all graphics contexts in the pool.
1159
1161{
1162 fList->Print();
1163}
const Mask_t kGCCapStyle
Definition GuiTypes.h:292
const Mask_t kGCArcMode
Definition GuiTypes.h:308
const Mask_t kGCDashOffset
Definition GuiTypes.h:306
const Mask_t kGCBackground
Definition GuiTypes.h:289
const Mask_t kGCForeground
Definition GuiTypes.h:288
const Mask_t kGCLineStyle
Definition GuiTypes.h:291
const Mask_t kGCSubwindowMode
Definition GuiTypes.h:301
const Mask_t kGCLineWidth
Definition GuiTypes.h:290
const Mask_t kGCTile
Definition GuiTypes.h:296
const Mask_t kGCClipXOrigin
Definition GuiTypes.h:303
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index)
Definition GuiTypes.h:35
const Mask_t kGCDashList
Definition GuiTypes.h:307
const Mask_t kGCFillStyle
Definition GuiTypes.h:294
const Mask_t kGCJoinStyle
Definition GuiTypes.h:293
const Mask_t kGCFunction
Definition GuiTypes.h:286
EGraphicsFunction
Definition GuiTypes.h:67
@ kGXorReverse
src OR NOT dst
Definition GuiTypes.h:79
@ kGXnand
NOT src OR NOT dst.
Definition GuiTypes.h:82
@ kGXandReverse
src AND NOT dst
Definition GuiTypes.h:70
@ kGXor
src OR dst
Definition GuiTypes.h:75
@ kGXcopy
src
Definition GuiTypes.h:71
@ kGXorInverted
NOT src OR dst.
Definition GuiTypes.h:81
@ kGXandInverted
NOT src AND dst.
Definition GuiTypes.h:72
@ kGXequiv
NOT src XOR dst.
Definition GuiTypes.h:77
@ kGXset
1
Definition GuiTypes.h:83
@ kGXnor
NOT src AND NOT dst.
Definition GuiTypes.h:76
@ kGXnoop
dst
Definition GuiTypes.h:73
@ kGXinvert
NOT dst.
Definition GuiTypes.h:78
@ kGXxor
src XOR dst
Definition GuiTypes.h:74
@ kGXand
src AND dst
Definition GuiTypes.h:69
@ kGXclear
0
Definition GuiTypes.h:68
@ kGXcopyInverted
NOT src.
Definition GuiTypes.h:80
Handle_t Pixmap_t
Pixmap handle.
Definition GuiTypes.h:30
const Mask_t kGCTileStipXOrigin
Definition GuiTypes.h:298
const Mask_t kGCFont
Definition GuiTypes.h:300
const Handle_t kNone
Definition GuiTypes.h:88
@ kEvenOddRule
Definition GuiTypes.h:52
@ kArcPieSlice
Definition GuiTypes.h:54
@ kCapNotLast
Definition GuiTypes.h:49
@ kCapProjecting
Definition GuiTypes.h:49
@ kWindingRule
Definition GuiTypes.h:52
@ kFillOpaqueStippled
Definition GuiTypes.h:51
@ kClipByChildren
Definition GuiTypes.h:53
@ kLineDoubleDash
Definition GuiTypes.h:48
@ kCapButt
Definition GuiTypes.h:49
@ kCapRound
Definition GuiTypes.h:49
@ kJoinBevel
Definition GuiTypes.h:50
@ kIncludeInferiors
Definition GuiTypes.h:53
@ kFillStippled
Definition GuiTypes.h:51
@ kFillSolid
Definition GuiTypes.h:51
@ kLineSolid
Definition GuiTypes.h:48
@ kJoinRound
Definition GuiTypes.h:50
@ kJoinMiter
Definition GuiTypes.h:50
@ kLineOnOffDash
Definition GuiTypes.h:48
@ kArcChord
Definition GuiTypes.h:54
@ kFillTiled
Definition GuiTypes.h:51
const Mask_t kGCFillRule
Definition GuiTypes.h:295
Handle_t GContext_t
Graphics context handle.
Definition GuiTypes.h:38
const Mask_t kGCPlaneMask
Definition GuiTypes.h:287
const Mask_t kGCStipple
Definition GuiTypes.h:297
const Mask_t kGCGraphicsExposures
Definition GuiTypes.h:302
const Mask_t kGCClipYOrigin
Definition GuiTypes.h:304
const Mask_t kGCClipMask
Definition GuiTypes.h:305
const Mask_t kGCTileStipYOrigin
Definition GuiTypes.h:299
#define g(i)
Definition RSha256.hxx:105
const Bool_t kFALSE
Definition RtypesCore.h:92
unsigned long ULong_t
Definition RtypesCore.h:55
long Long_t
Definition RtypesCore.h:54
const Bool_t kTRUE
Definition RtypesCore.h:91
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:364
#define gClient
Definition TGClient.h:166
Int_t gDebug
Definition TROOT.cxx:590
#define gROOT
Definition TROOT.h:406
void Printf(const char *fmt,...)
#define gVirtualX
Definition TVirtualX.h:338
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
static const char * PixelAsHexString(ULong_t pixel)
Convert machine dependent pixel value (obtained via RGB2Pixel or via Number2Pixel() or via TColor::Ge...
Definition TColor.cxx:2109
THashTable * fList
Definition TGGC.h:117
virtual ~TGGCPool()
Delete graphics context pool.
Definition TGGC.cxx:894
Int_t MatchGC(const TGGC *gc, GCValues_t *values)
Try to find matching graphics context.
Definition TGGC.cxx:1038
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get the best matching graphics context depending on values.
Definition TGGC.cxx:986
void FreeGC(const TGGC *gc)
Delete graphics context if it is not used anymore.
Definition TGGC.cxx:917
friend class TGGC
Definition TGGC.h:114
TGGC * FindGC(const TGGC *gc)
Find graphics context. Returns 0 in case gc is not found.
Definition TGGC.cxx:950
void Print(Option_t *option="") const
List all graphics contexts in the pool.
Definition TGGC.cxx:1160
void ForceFreeGC(const TGGC *gc)
Force remove graphics context from list. Is only called via ~TGGC().
Definition TGGC.cxx:902
TGGCPool(const TGGCPool &gp)
Definition TGGC.h:124
void UpdateGC(TGGC *gc, GCValues_t *values)
Update graphics context with the values spcified in values->fMask.
Definition TGGC.cxx:1152
Definition TGGC.h:31
Pixmap_t GetTile() const
Definition TGGC.h:86
void SetArcMode(Int_t v)
Set arc mode (kArcChord, kArcPieSlice).
Definition TGGC.cxx:502
Int_t GetTileStipYOrigin() const
Definition TGGC.h:89
TGGC(GCValues_t *values, Bool_t calledByGCPool)
Create a graphics context (only called via TGGCPool::GetGC()).
Definition TGGC.cxx:37
Int_t GetJoinStyle() const
Definition TGGC.h:97
Bool_t GetGraphicsExposures() const
Definition TGGC.h:92
Int_t GetSubwindowMode() const
Definition TGGC.h:90
Int_t GetFillStyle() const
Definition TGGC.h:98
void SavePrimitive(std::ostream &out, Option_t *option="")
Save graphics context info as a C++ statement(s) on output stream out.
Definition TGGC.cxx:626
void SetLineWidth(Int_t v)
Set line width.
Definition TGGC.cxx:299
ULong_t GetPlaneMask() const
Definition TGGC.h:81
Int_t GetDashLen() const
Definition TGGC.h:101
void SetFont(FontH_t v)
Set font.
Definition TGGC.cxx:410
void SetPlaneMask(ULong_t v)
Set plane mask.
Definition TGGC.cxx:266
TGGC & operator=(const TGGC &rhs)
Graphics context assignment operator.
Definition TGGC.cxx:114
GContext_t fContext
Definition TGGC.h:37
void SetTileStipYOrigin(Int_t v)
Y offset for tile or stipple operations.
Definition TGGC.cxx:399
Pixmap_t GetClipMask() const
Definition TGGC.h:95
Int_t GetClipXOrigin() const
Definition TGGC.h:93
void SetFillStyle(Int_t v)
Set fill style (kFillSolid, kFillTiled, kFillStippled, kFillOpaeueStippled).
Definition TGGC.cxx:344
Pixel_t GetForeground() const
Definition TGGC.h:82
Int_t GetFillRule() const
Definition TGGC.h:99
GCValues_t fValues
Definition TGGC.h:36
void SetCapStyle(Int_t v)
Set cap style (kCapNotLast, kCapButt, kCapRound, kCapProjecting).
Definition TGGC.cxx:321
void Print(Option_t *option="") const
Print graphics contexts info.
Definition TGGC.cxx:513
const char * GetDashes() const
Definition TGGC.h:102
Int_t GetTileStipXOrigin() const
Definition TGGC.h:88
void SetForeground(Pixel_t v)
Set foreground color.
Definition TGGC.cxx:277
Int_t GetLineStyle() const
Definition TGGC.h:85
void SetClipMask(Pixmap_t v)
Bitmap for clipping.
Definition TGGC.cxx:465
void SetFillRule(Int_t v)
Set fill rule (kEvenOddRule, kWindingRule).
Definition TGGC.cxx:355
GContext_t operator()() const
Not inline due to a bug in g++ 2.96 20000731 (Red Hat Linux 7.0).
Definition TGGC.cxx:137
void SetDashOffset(Int_t v)
Patterned/dashed line offset.
Definition TGGC.cxx:476
void SetTileStipXOrigin(Int_t v)
X offset for tile or stipple operations.
Definition TGGC.cxx:388
void SetAttributes(GCValues_t *values)
Set attributes as specified in the values structure.
Definition TGGC.cxx:234
void SetDashList(const char v[], Int_t len)
Set dash pattern. First use SetDashOffset() if not 0.
Definition TGGC.cxx:487
EGraphicsFunction GetFunction() const
Definition TGGC.h:80
void SetJoinStyle(Int_t v)
Set line join style (kJoinMiter, kJoinRound, kJoinBevel).
Definition TGGC.cxx:332
void SetClipXOrigin(Int_t v)
X origin for clipping.
Definition TGGC.cxx:443
Int_t GetClipYOrigin() const
Definition TGGC.h:94
Pixel_t GetBackground() const
Definition TGGC.h:83
void SetTile(Pixmap_t v)
Set tile pixmap for tiling operations.
Definition TGGC.cxx:366
void SetClipYOrigin(Int_t v)
Y origin for clipping.
Definition TGGC.cxx:454
void UpdateValues(GCValues_t *v)
Update values + mask.
Definition TGGC.cxx:145
void SetBackground(Pixel_t v)
Set background color.
Definition TGGC.cxx:288
void SetFunction(EGraphicsFunction v)
Set graphics context drawing function.
Definition TGGC.cxx:255
void SetStipple(Pixmap_t v)
Set 1 plane pixmap for stippling.
Definition TGGC.cxx:377
Mask_t GetMask() const
Definition TGGC.h:79
Pixmap_t GetStipple() const
Definition TGGC.h:87
Int_t GetLineWidth() const
Definition TGGC.h:84
void SetGraphicsExposures(Bool_t v)
True if graphics exposure should be generated.
Definition TGGC.cxx:432
void SetLineStyle(Int_t v)
Set line style (kLineSolid, kLineOnOffDash, kLineDoubleDash).
Definition TGGC.cxx:310
Int_t GetDashOffset() const
Definition TGGC.h:100
Int_t GetCapStyle() const
Definition TGGC.h:96
virtual ~TGGC()
Delete graphics context.
Definition TGGC.cxx:102
Int_t GetArcMode() const
Definition TGGC.h:103
TString GetMaskString() const
Returns GC mask as a string - used in SavePrimitive().
Definition TGGC.cxx:522
void SetSubwindowMode(Int_t v)
Set sub window mode (kClipByChildren, kIncludeInferiors).
Definition TGGC.cxx:421
TGClient * fClient
Definition TGObject.h:37
THashTable implements a hash table to store TObject's.
Definition THashTable.h:35
TObject * Remove(TObject *obj)
Remove object from the hashtable.
void Add(TObject *obj)
Add object to the hash table.
void Print(Option_t *option, Int_t recurse) const
Print the collection header and its elements.
TObject * FindObject(const char *name) const
Find object using its name.
Mother of all ROOT objects.
Definition TObject.h:37
TObject & operator=(const TObject &rhs)
TObject assignment operator.
Definition TObject.h:283
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:879
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:893
Definitions for TRefCnt, base class for reference counted objects.
Definition TRefCnt.h:27
void AddReference()
Definition TRefCnt.h:40
void SetRefCount(UInt_t r)
Definition TRefCnt.h:39
UInt_t RemoveReference()
Definition TRefCnt.h:41
UInt_t References() const
Definition TRefCnt.h:38
Basic string class.
Definition TString.h:136
Ssiz_t Length() const
Definition TString.h:410
const char * Data() const
Definition TString.h:369
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition TString.cxx:2331
Short_t Min(Short_t a, Short_t b)
Definition TMathBase.h:180
Graphics context structure.
Definition GuiTypes.h:224
ULong_t fBackground
background pixel
Definition GuiTypes.h:228
Int_t fFillRule
kEvenOddRule, kWindingRule
Definition GuiTypes.h:236
Pixmap_t fClipMask
bitmap clipping; other calls for rects
Definition GuiTypes.h:247
Int_t fDashOffset
patterned/dashed line information
Definition GuiTypes.h:248
Int_t fClipYOrigin
Definition GuiTypes.h:246
Int_t fClipXOrigin
origin for clipping
Definition GuiTypes.h:245
Int_t fLineWidth
line width
Definition GuiTypes.h:229
Pixmap_t fStipple
stipple 1 plane pixmap for stippling
Definition GuiTypes.h:239
Mask_t fMask
bit mask specifying which fields are valid
Definition GuiTypes.h:251
Int_t fLineStyle
kLineSolid, kLineOnOffDash, kLineDoubleDash
Definition GuiTypes.h:230
Pixmap_t fTile
tile pixmap for tiling operations
Definition GuiTypes.h:238
Bool_t fGraphicsExposures
boolean, should exposures be generated
Definition GuiTypes.h:244
Int_t fJoinStyle
kJoinMiter, kJoinRound, kJoinBevel
Definition GuiTypes.h:233
Char_t fDashes[8]
dash pattern list (dash length per byte)
Definition GuiTypes.h:249
ULong_t fForeground
foreground pixel
Definition GuiTypes.h:227
ULong_t fPlaneMask
plane mask
Definition GuiTypes.h:226
Int_t fFillStyle
kFillSolid, kFillTiled, kFillStippled, kFillOpaeueStippled
Definition GuiTypes.h:234
FontH_t fFont
default text font for text operations
Definition GuiTypes.h:242
Int_t fTsXOrigin
offset for tile or stipple operations
Definition GuiTypes.h:240
EGraphicsFunction fFunction
logical operation
Definition GuiTypes.h:225
Int_t fDashLen
number of dashes in fDashes
Definition GuiTypes.h:250
Int_t fCapStyle
kCapNotLast, kCapButt, kCapRound, kCapProjecting
Definition GuiTypes.h:231
Int_t fArcMode
kArcChord, kArcPieSlice
Definition GuiTypes.h:237
Int_t fTsYOrigin
Definition GuiTypes.h:241
Int_t fSubwindowMode
kClipByChildren, kIncludeInferiors
Definition GuiTypes.h:243