Logo ROOT  
Reference Guide
TGImageMap.cxx
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Valeriy Onuchin & Fons Rademakers 18/10/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// TGImageMap (with TGRegion and TGRegionWithId help classes) //
15// //
16// A TGImageMap provides the functionality like a clickable image in //
17// a web browser with sensitive regions (MAP HTML tag). //
18// //
19//////////////////////////////////////////////////////////////////////////
20
21#include "TGImageMap.h"
22#include "TRefCnt.h"
23#include "TGMenu.h"
24#include "TGToolTip.h"
25#include "TList.h"
26#include "TArrayS.h"
27#include "TVirtualX.h"
28
29
33
34
35TGRegionWithId *gCurrentRegion; // current region
36
38static Int_t gPointerX; // current X mouse position
39static Int_t gPointerY; // current Y mouse position
40
41
42
43class TGRegionData : public TRefCnt {
44
45friend class TGRegion;
46
47private:
48 Region_t fRgn; // region handle
49 Bool_t fIsNull; // true if null region
50
51public:
52 TGRegionData() { fRgn = 0; fIsNull = kTRUE; AddReference(); }
53 ~TGRegionData() { }
54 TGRegionData &operator=(const TGRegionData &r);
55};
56
57////////////////////////////////////////////////////////////////////////////////
58/// Assignemnt of region data object.
59
60TGRegionData &TGRegionData::operator=(const TGRegionData &r)
61{
62 if (this != &r) {
63 fRefs = r.fRefs;
64 fRgn = r.fRgn;
65 fIsNull = r.fIsNull;
66 }
67 return *this;
68}
69
70
71////////////////////////////////////////////////////////////////////////////////
72////////////////////////////////////////////////////////////////////////////////
73/// Create a region object.
74
76{
77 if (!gEmptyRegion) // avoid too many allocs
79
81 fData->AddReference();
82}
83
84////////////////////////////////////////////////////////////////////////////////
85/// Create empty region.
86
88{
89 fData = new TGRegionData;
90 fData->fRgn = gVirtualX->CreateRegion();
91 fData->fIsNull = is_null;
92}
93
94////////////////////////////////////////////////////////////////////////////////
95/// Create and initialize a region with a rectangle.
96
98{
99 fData = new TGRegionData;
100 fData->fRgn = gVirtualX->CreateRegion();
101 fData->fIsNull = kFALSE;
102
103 Rectangle_t xr;
104 xr.fX = (Short_t) x;
105 xr.fY = (Short_t) y;
106 xr.fWidth = (UShort_t) w;
107 xr.fHeight = (UShort_t) h;
108 gVirtualX->UnionRectWithRegion(&xr, fData->fRgn, fData->fRgn);
109}
110
111////////////////////////////////////////////////////////////////////////////////
112/// Create and intialize a region with a polygon.
113
115{
116 fData = new TGRegionData;
117 fData->fIsNull = kFALSE;
118 Point_t *gpoints = new Point_t[n];
119
120 for (int i = 0; i < n; i++) {
121 gpoints[i].fX = (Short_t) points[i].GetX();
122 gpoints[i].fY = (Short_t) points[i].GetY();
123 }
124
125 fData->fRgn = gVirtualX->PolygonRegion(gpoints, n, winding);
126}
127
128////////////////////////////////////////////////////////////////////////////////
129/// Create and initialize a region with an X and a Y array of points.
130
131TGRegion::TGRegion(const TArrayS &x, const TArrayS &y, Bool_t winding)
132{
133 fData = new TGRegionData;
134 fData->fIsNull = kFALSE;
135
136 Int_t n = x.GetSize();
137 if (n != y.GetSize()) {
138 Error("TGRegion", "x and y arrays must have same length");
139 return;
140 }
141 Point_t *gpoints = new Point_t[n];
142
143 for (int i = 0; i < n; i++) {
144 gpoints[i].fX = x.GetArray()[i];
145 gpoints[i].fY = y.GetArray()[i];
146 }
147
148 fData->fRgn = gVirtualX->PolygonRegion(gpoints, n, winding);
149}
150
151////////////////////////////////////////////////////////////////////////////////
152/// Create and initialize a region with an X and Y array of points.
153
155{
156 fData = new TGRegionData;
157 fData->fIsNull = kFALSE;
158 Point_t *gpoints = new Point_t[n];
159
160 for (int i = 0; i < n; i++) {
161 gpoints[i].fX = x[i];
162 gpoints[i].fY = y[i];
163 }
164
165 fData->fRgn = gVirtualX->PolygonRegion(gpoints, n, winding);
166}
167
168////////////////////////////////////////////////////////////////////////////////
169/// Region copy constructor.
170
172{
173 fData = r.fData;
174 fData->AddReference();
175}
176
177////////////////////////////////////////////////////////////////////////////////
178/// Delete a region.
179
181{
182 if (fData->RemoveReference() <= 0) {
183 gVirtualX->DestroyRegion(fData->fRgn);
184 delete fData;
185 }
186}
187
188////////////////////////////////////////////////////////////////////////////////
189/// Region assignment operator.
190
192{
193 if (this != &r) {
195 r.fData->AddReference();
196
197 if (fData->RemoveReference() <= 0) {
198 gVirtualX->DestroyRegion(fData->fRgn);
199 delete fData;
200 }
201 fData = r.fData;
202 }
203 return *this;
204}
205
206////////////////////////////////////////////////////////////////////////////////
207/// Copy a region.
208
210{
211 TGRegion r(fData->fIsNull);
212 gVirtualX->UnionRegion(fData->fRgn, r.fData->fRgn, r.fData->fRgn);
213 return r;
214}
215
216////////////////////////////////////////////////////////////////////////////////
217/// Return true if region is not set.
218
220{
221 return fData->fIsNull;
222}
223
224////////////////////////////////////////////////////////////////////////////////
225/// Return true if region is empty.
226
228{
229 return fData->fIsNull || gVirtualX->EmptyRegion(fData->fRgn);
230}
231
232////////////////////////////////////////////////////////////////////////////////
233/// Return true if point p is contained in the region.
234
236{
237 return gVirtualX->PointInRegion((Int_t)p.GetX(), (Int_t)p.GetY(), fData->fRgn);
238}
239
240////////////////////////////////////////////////////////////////////////////////
241/// Return true if point (x,y) is contained in the region.
242
244{
245 return gVirtualX->PointInRegion(x, y, fData->fRgn);
246}
247
248////////////////////////////////////////////////////////////////////////////////
249/// Return the union of this region with r.
250
252{
253 TGRegion result(kFALSE);
254 gVirtualX->UnionRegion(fData->fRgn, r.fData->fRgn, result.fData->fRgn);
255 return result;
256}
257
258////////////////////////////////////////////////////////////////////////////////
259/// Returns a region which is the intersection of this region and r.
260
262{
263 TGRegion result(kFALSE);
264 gVirtualX->IntersectRegion(fData->fRgn, r.fData->fRgn, result.fData->fRgn);
265 return result;
266}
267
268////////////////////////////////////////////////////////////////////////////////
269/// Returns a region which is r subtracted from this region.
270
272{
273 TGRegion result(kFALSE);
274 gVirtualX->SubtractRegion(fData->fRgn, r.fData->fRgn, result.fData->fRgn);
275 return result;
276}
277
278////////////////////////////////////////////////////////////////////////////////
279/// Returns a region which is the difference between the union and
280/// intersection this region and r.
281
283{
284 TGRegion result(kFALSE);
285 gVirtualX->XorRegion(fData->fRgn, r.fData->fRgn, result.fData->fRgn);
286 return result;
287}
288
289////////////////////////////////////////////////////////////////////////////////
290/// Return dimension of region (widht, height).
291
293{
294 Rectangle_t r = { 0, 0, 0, 0 };
295 gVirtualX->GetRegionBox(fData->fRgn, &r);
296 return TGDimension(r.fWidth, r.fHeight);
297}
298
299////////////////////////////////////////////////////////////////////////////////
300/// Return position of region (x, y).
301
303{
304 Rectangle_t r = { 0, 0, 0, 0 };
305 gVirtualX->GetRegionBox(fData->fRgn, &r);
306 return TGPosition(r.fX, r.fY);
307}
308
309////////////////////////////////////////////////////////////////////////////////
310/// Region == operator.
311
313{
314 return fData == r.fData ?
315 kTRUE : gVirtualX->EqualRegion(fData->fRgn, r.fData->fRgn);
316}
317
318
319////////////////////////////////////////////////////////////////////////////////
320////////////////////////////////////////////////////////////////////////////////
321/// Create GUI region (with id and possible tooltip).
322
324{
325 fId = 0;
326 fTip = 0;
327 fPopup = 0;
328}
329
330////////////////////////////////////////////////////////////////////////////////
331/// Create GUI region (with id and possible tooltip).
332
335 TGRegion(x, y, w, h, type)
336{
337 fId = id;
338 fTip = 0;
339 fPopup = 0;
340}
341
342////////////////////////////////////////////////////////////////////////////////
343/// Create GUI region (with id and possible tooltip).
344
346 Bool_t winding) :
347 TGRegion(n, points, winding)
348{
349 fId = id;
350 fTip = 0;
351 fPopup = 0;
352}
353
354////////////////////////////////////////////////////////////////////////////////
355/// Copy constructor.
356
358{
359 fId = reg.GetId();
360 fTip = 0;
361 fPopup = 0;
362}
363
364////////////////////////////////////////////////////////////////////////////////
365/// Copy ctor which allows setting of new id.
366
368 TGRegion(reg)
369{
370 fId = id;
371 fTip = 0;
372 fPopup = 0;
373}
374
375////////////////////////////////////////////////////////////////////////////////
376/// Cleanup.
377
379{
380 delete fTip;
381}
382
383////////////////////////////////////////////////////////////////////////////////
384/// Display popup menu associated with this region.
385
387{
389}
390
391////////////////////////////////////////////////////////////////////////////////
392/// Set tool tip text associated with this region. The delay is in
393/// milliseconds (minimum 250). To remove tool tip call method with
394/// text = 0.
395
397 const TGFrame *frame)
398{
399 if (fTip) {
400 delete fTip;
401 fTip = 0;
402 }
403
404 if (text && strlen(text))
405 fTip = new TGToolTip(gClient->GetDefaultRoot(), frame, text, delayms);
406}
407
408////////////////////////////////////////////////////////////////////////////////
409////////////////////////////////////////////////////////////////////////////////
410/// Create an image map widget.
411
413 TGPictureButton(p, pic)
414{
417 fListOfRegions = new TList;
418 fTrash = new TList;
419 fMainTip = 0;
420 fLastVisited = 0;
422
425
426 gVirtualX->GrabButton(fId, kAnyButton, kAnyModifier,
429
433}
434
435////////////////////////////////////////////////////////////////////////////////
436/// Create an image map widget.
437
439 TGPictureButton(p, pic.Data())
440{
443 fListOfRegions = new TList;
444 fTrash = new TList;
445 fMainTip = 0;
446 fLastVisited = 0;
448
451
452 gVirtualX->GrabButton(fId, kAnyButton, kAnyModifier,
455
459}
460
461////////////////////////////////////////////////////////////////////////////////
462/// Cleanup image map widget.
463
465{
466 delete fMainTip;
467 fTrash->Delete();
468 delete fTrash;
470 delete fListOfRegions;
471}
472
473////////////////////////////////////////////////////////////////////////////////
474/// Add a region to the image map.
475
476void TGImageMap::AddRegion(const TGRegion &region, Int_t id)
477{
478 fListOfRegions->Add(new TGRegionWithId(region, id));
479}
480
481////////////////////////////////////////////////////////////////////////////////
482/// Create popoup menu or returns existing for regions with specified id.
483
485{
486 TIter next(fListOfRegions);
487 TGRegionWithId *region;
488 TGPopupMenu *popup = 0;
489 TGPopupMenu *newpopup = 0;
490
491 while ((region = (TGRegionWithId*)next())) {
492 if (id == region->GetId()) {
493 popup = region->GetPopup();
494 if (!popup && !newpopup) {
495 newpopup = new TGPopupMenu(this);
496 fTrash->Add(newpopup);
497 }
498 if (newpopup) region->SetPopup(newpopup);
499 }
500 }
501 return newpopup ? newpopup : popup;
502}
503
504////////////////////////////////////////////////////////////////////////////////
505/// Return popup for regions with specified id.
506
508{
509 TIter next(fListOfRegions);
510 TGRegionWithId *region;
511
512 while ((region = (TGRegionWithId*)next())) {
513 if (id == region->GetId()) return region->GetPopup();
514 }
515 return 0;
516}
517
518////////////////////////////////////////////////////////////////////////////////
519/// Handle mouse motion events.
520
522{
523 TIter next(fListOfRegions);
524 TGRegionWithId *region;
525
526 if (fNavMode != kNavRegions) return kTRUE;
527 gPointerX = event->fX;
528 gPointerY = event->fY;
529
530 while ((region = (TGRegionWithId*)next())) {
531 if (region->Contains(gPointerX, gPointerY)) {
532 if (fLastVisited == region->GetId()) return kTRUE;
534 fLastVisited = region->GetId();
535 fTip = region->GetToolTipText();
536 gCurrentRegion = region;
538 return kTRUE;
539 }
540 }
541
542 if (fLastVisited) {
544 fTip = fMainTip;
545 }
546 fLastVisited = 0; // main
547 return kTRUE;
548}
549
550////////////////////////////////////////////////////////////////////////////////
551/// Handle double click events.
552
554{
555 TIter next(fListOfRegions);
556 TGRegionWithId *region;
557
558 if (fTip) fTip->Hide();
559 if (event->fCode != kButton1 ) return kTRUE;
560 if (fNavMode != kNavRegions) return kTRUE;
561
562 gPointerX = event->fX;
563 gPointerY = event->fY;
564
565 while ((region = (TGRegionWithId*)next())) {
566 if (region->Contains(gPointerX, gPointerY)) {
567 DoubleClicked(region->GetId());
568 gCurrentRegion = region;
569 return kTRUE;
570 }
571 }
573 return kTRUE;
574}
575
576////////////////////////////////////////////////////////////////////////////////
577/// Handle button events.
578
580{
581 TIter next(fListOfRegions);
582 TGRegionWithId *region;
583 TGPopupMenu *pop;
584
585 if (fTip) fTip->Hide();
586 if (fNavMode != kNavRegions) return kTRUE;
587
588 gPointerX = event->fX;
589 gPointerY = event->fY;
590
591 while ((region = (TGRegionWithId*)next())) {
592 if (region->Contains(gPointerX, gPointerY)) {
593 gCurrentRegion = region;
594 if (event->fType == kButtonPress) {
595 if (event->fCode == kButton1 )
596 RegionClicked(region->GetId());
597 else if (event->fCode == kButton3 ) {
598 pop = region->GetPopup();
599 if (pop) pop->PlaceMenu(gPointerX, gPointerY, kTRUE, kTRUE);
600 }
601 }
602 return kTRUE;
603 }
604 }
605 if (event->fType == kButtonPress)
606 Clicked();
607 return kTRUE;
608}
609
610////////////////////////////////////////////////////////////////////////////////
611/// Set tooltip text for main region.
612
613void TGImageMap::SetToolTipText(const char *text, Long_t delayms)
614{
615 if (fMainTip) delete fMainTip;
616 fMainTip = 0;
617
618 if (text && strlen(text))
619 fMainTip = new TGToolTip(fClient->GetDefaultRoot(), this, text, delayms);
620}
621
622////////////////////////////////////////////////////////////////////////////////
623/// Set tooltip text for regions with specified id.
624
625void TGImageMap::SetToolTipText(Int_t id, const char *text, Long_t delayms)
626{
627 TIter next(fListOfRegions);
628 TGRegionWithId *region;
629
630 while ((region = (TGRegionWithId*)next())) {
631 if (id == region->GetId())
632 region->SetToolTipText(text, delayms, this);
633 }
634}
635
636////////////////////////////////////////////////////////////////////////////////
637/// Handle when mouse moves over region id. Emits signal
638/// OnMouseOver(Int_t).
639
641{
642 if (fTip) fTip->Reset();
643 if (fMainTip) fMainTip->Hide();
644 gVirtualX->SetCursor(fId, gVirtualX->CreateCursor(fCursorMouseOver));
645 Emit("OnMouseOver(Int_t)", id);
646}
647
648////////////////////////////////////////////////////////////////////////////////
649/// Handle when mouse moves from region id. Emits signal
650/// OnMouseOut(Int_t).
651
653{
654 if(fTip) fTip->Hide();
655 if(fMainTip) fMainTip->Reset();
656 gVirtualX->SetCursor(fId,gVirtualX->CreateCursor(fCursorMouseOut));
657 Emit("OnMouseOut(Int_t)",id);
658}
659
660////////////////////////////////////////////////////////////////////////////////
661/// Handle when mouse was clicked on region id. Emits signal
662/// RegionClicked(Int_t).
663
665{
666 Emit("RegionClicked(Int_t)",id);
667}
668
669////////////////////////////////////////////////////////////////////////////////
670/// Handle when mouse is double clicked on main map. Emits signal
671/// DoubleClicked().
672
674{
675 Emit("DoubleClicked()");
676}
677
678////////////////////////////////////////////////////////////////////////////////
679/// Handle when mouse is double clicked on region id. Emits signal
680/// DoubleClicked(Int_t).
681
683{
684 Emit("DoubleClicked(Int_t)",id);
685}
@ kButtonPress
Definition: GuiTypes.h:59
const Mask_t kButtonPressMask
Definition: GuiTypes.h:160
const Mask_t kKeyReleaseMask
Definition: GuiTypes.h:159
const Mask_t kAnyModifier
Definition: GuiTypes.h:209
const Mask_t kKeyPressMask
Definition: GuiTypes.h:158
const Mask_t kPointerMotionMask
Definition: GuiTypes.h:162
const Handle_t kNone
Definition: GuiTypes.h:87
const Mask_t kLeaveWindowMask
Definition: GuiTypes.h:167
const Mask_t kStructureNotifyMask
Definition: GuiTypes.h:165
const Mask_t kButtonReleaseMask
Definition: GuiTypes.h:161
@ kHand
Definition: GuiTypes.h:373
@ kPointer
Definition: GuiTypes.h:374
Handle_t Region_t
Definition: GuiTypes.h:31
@ kButton3
Definition: GuiTypes.h:213
@ kButton1
Definition: GuiTypes.h:213
@ kAnyButton
Definition: GuiTypes.h:213
ROOT::R::TRInterface & r
Definition: Object.C:4
#define h(i)
Definition: RSha256.hxx:106
unsigned short UShort_t
Definition: RtypesCore.h:38
int Int_t
Definition: RtypesCore.h:43
const Bool_t kFALSE
Definition: RtypesCore.h:90
long Long_t
Definition: RtypesCore.h:52
bool Bool_t
Definition: RtypesCore.h:61
short Short_t
Definition: RtypesCore.h:37
const Bool_t kTRUE
Definition: RtypesCore.h:89
#define ClassImp(name)
Definition: Rtypes.h:361
@ kButtonDisabled
Definition: TGButton.h:56
#define gClient
Definition: TGClient.h:166
static TGRegion * gEmptyRegion
Definition: TGImageMap.cxx:37
static Int_t gPointerY
Definition: TGImageMap.cxx:39
TGRegionWithId * gCurrentRegion
Definition: TGImageMap.cxx:35
static Int_t gPointerX
Definition: TGImageMap.cxx:38
XFontStruct * id
Definition: TGX11.cxx:108
int type
Definition: TGX11.cxx:120
#define ClassImpQ(name)
Definition: TQObject.h:282
Binding & operator=(OUT(*fun)(void))
#define gVirtualX
Definition: TVirtualX.h:338
point * points
Definition: X3DBuffer.c:22
Array of shorts (16 bits per element).
Definition: TArrayS.h:27
virtual void Clicked()
Definition: TGButton.h:135
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set button state.
Definition: TGButton.cxx:187
TGToolTip * fTip
Definition: TGButton.h:79
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Definition: TGClient.cxx:234
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:323
void SetToolTipText(const char *text, Long_t delayms=300)
Set tooltip text for main region.
Definition: TGImageMap.cxx:613
virtual ~TGImageMap()
Cleanup image map widget.
Definition: TGImageMap.cxx:464
ENavMode fNavMode
Definition: TGImageMap.h:127
TGPopupMenu * GetPopup(Int_t id)
Return popup for regions with specified id.
Definition: TGImageMap.cxx:507
Int_t fLastVisited
Definition: TGImageMap.h:130
virtual void OnMouseOut(Int_t id)
Handle when mouse moves from region id.
Definition: TGImageMap.cxx:652
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events.
Definition: TGImageMap.cxx:521
virtual void OnMouseOver(Int_t id)
Handle when mouse moves over region id.
Definition: TGImageMap.cxx:640
TGToolTip * fMainTip
Definition: TGImageMap.h:131
TList * fTrash
Definition: TGImageMap.h:132
virtual void DoubleClicked()
Handle when mouse is double clicked on main map.
Definition: TGImageMap.cxx:673
virtual Bool_t HandleButton(Event_t *event)
Handle button events.
Definition: TGImageMap.cxx:579
void AddRegion(const TGRegion &region, Int_t id)
Add a region to the image map.
Definition: TGImageMap.cxx:476
TGImageMap(const TGImageMap &)
TGPopupMenu * CreatePopup(Int_t id)
Create popoup menu or returns existing for regions with specified id.
Definition: TGImageMap.cxx:484
TList * fListOfRegions
Definition: TGImageMap.h:126
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click events.
Definition: TGImageMap.cxx:553
ECursor fCursorMouseOver
Definition: TGImageMap.h:128
virtual void RegionClicked(Int_t id)
Handle when mouse was clicked on region id.
Definition: TGImageMap.cxx:664
ECursor fCursorMouseOut
Definition: TGImageMap.h:129
TGClient * fClient
Definition: TGObject.h:37
Handle_t fId
Definition: TGObject.h:36
virtual void SetDisabledPicture(const TGPicture *pic)
Changes disabled picture.
Definition: TGButton.cxx:1087
const TGPicture * fPic
Definition: TGButton.h:231
virtual void PlaceMenu(Int_t x, Int_t y, Bool_t stick_mode, Bool_t grab_pointer)
Popup a popup menu.
Definition: TGMenu.cxx:1239
void SetPopup(TGPopupMenu *popup)
Definition: TGImageMap.h:108
TGPopupMenu * fPopup
Definition: TGImageMap.h:92
void SetToolTipText(const char *text, Long_t delayms, const TGFrame *frame)
Set tool tip text associated with this region.
Definition: TGImageMap.cxx:396
Int_t GetId() const
Definition: TGImageMap.h:103
TGToolTip * fTip
Definition: TGImageMap.h:91
void DisplayPopup()
Display popup menu associated with this region.
Definition: TGImageMap.cxx:386
TGPopupMenu * GetPopup() const
Definition: TGImageMap.h:107
virtual ~TGRegionWithId()
Cleanup.
Definition: TGImageMap.cxx:378
TGRegionWithId()
Create GUI region (with id and possible tooltip).
Definition: TGImageMap.cxx:323
TGToolTip * GetToolTipText() const
Definition: TGImageMap.h:104
TGRegion CopyRegion() const
Copy a region.
Definition: TGImageMap.cxx:209
Bool_t IsEmpty() const
Return true if region is empty.
Definition: TGImageMap.cxx:227
virtual ~TGRegion()
Delete a region.
Definition: TGImageMap.cxx:180
TGDimension GetDimension() const
Return dimension of region (widht, height).
Definition: TGImageMap.cxx:292
TGRegion Unite(const TGRegion &r) const
Return the union of this region with r.
Definition: TGImageMap.cxx:251
Bool_t Contains(const TPoint &p) const
Return true if point p is contained in the region.
Definition: TGImageMap.cxx:235
Bool_t IsNull() const
Return true if region is not set.
Definition: TGImageMap.cxx:219
TGPosition GetPosition() const
Return position of region (x, y).
Definition: TGImageMap.cxx:302
TGRegion Eor(const TGRegion &r) const
Returns a region which is the difference between the union and intersection this region and r.
Definition: TGImageMap.cxx:282
TGRegionData * fData
Definition: TGImageMap.h:38
Bool_t operator==(const TGRegion &r) const
Region == operator.
Definition: TGImageMap.cxx:312
TGRegion Subtract(const TGRegion &r) const
Returns a region which is r subtracted from this region.
Definition: TGImageMap.cxx:271
TGRegion Intersect(const TGRegion &r) const
Returns a region which is the intersection of this region and r.
Definition: TGImageMap.cxx:261
TGRegion()
Create a region object.
Definition: TGImageMap.cxx:75
TGRegion & operator=(const TGRegion &r)
Region assignment operator.
Definition: TGImageMap.cxx:191
void Hide()
Hide tool tip window.
Definition: TGToolTip.cxx:247
void Reset()
Reset tool tip popup delay timer.
Definition: TGToolTip.cxx:260
virtual void SetWindowName(const char *name=0)
Set window name.
Definition: TGWindow.cxx:119
A doubly linked list.
Definition: TList.h:44
virtual void Add(TObject *obj)
Definition: TList.h:87
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Definition: TList.cxx:469
Mother of all ROOT objects.
Definition: TObject.h:37
TObject & operator=(const TObject &rhs)
TObject assignment operator.
Definition: TObject.h:283
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:891
Definition: TPoint.h:31
SCoord_t GetY() const
Definition: TPoint.h:47
SCoord_t GetX() const
Definition: TPoint.h:46
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition: TQObject.h:164
Definitions for TRefCnt, base class for reference counted objects.
Definition: TRefCnt.h:27
Basic string class.
Definition: TString.h:131
TText * text
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
const Int_t n
Definition: legend1.C:16
EGEventType fType
Definition: GuiTypes.h:174
UInt_t fCode
Definition: GuiTypes.h:179
Short_t fY
Definition: GuiTypes.h:356
Short_t fX
Definition: GuiTypes.h:356
Short_t fX
Definition: GuiTypes.h:361
UShort_t fHeight
Definition: GuiTypes.h:362
Short_t fY
Definition: GuiTypes.h:361
UShort_t fWidth
Definition: GuiTypes.h:362