ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TGedPatternSelect.cxx
Go to the documentation of this file.
1 // @(#)root/ged:$Id$
2 // Author: Marek Biskup, Ilka Antcheva 22/07/03
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2002, 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 // //
15 // TGedPatternFrame, TGedPatternSelector, TGedPatternPopup //
16 // and TGedPatternColor //
17 // //
18 // The TGedPatternFrame is a small frame with border showing //
19 // a specific pattern (fill style. //
20 // //
21 // The TGedPatternSelector is a composite frame with TGedPatternFrames //
22 // of all diferent styles //
23 // //
24 // The TGedPatternPopup is a popup containing a TGedPatternSelector. //
25 // //
26 // The TGedPatternSelect widget is a button with pattern area with //
27 // a little down arrow. When clicked on the arrow the //
28 // TGedPatternPopup pops up. //
29 // //
30 // Selecting a pattern in this widget will generate the event: //
31 // kC_PATTERNSEL, kPAT_SELCHANGED, widget id, style. //
32 // //
33 // and the signal: //
34 // PatternSelected(Style_t pattern) //
35 // //
36 // TGedSelect is button that shows popup window when clicked. //
37 // TGedPopup is a popup window. //
38 // //
39 //////////////////////////////////////////////////////////////////////////
40 
41 #include "TGResourcePool.h"
42 #include "TGedPatternSelect.h"
43 #include "RConfigure.h"
44 #include "TGToolTip.h"
45 #include "TGButton.h"
46 #include "Riostream.h"
47 #include "RStipples.h"
48 
55 
56 TGGC* TGedPatternFrame::fgGC = 0;
57 
58 
59 ////////////////////////////////////////////////////////////////////////////////
60 /// Pattern select ctor.
61 
63  int width, int height)
64  : TGFrame(p, width, height, kOwnBackground)
65 {
66  Pixel_t white;
67  gClient->GetColorByName("white", white); // white background
68  SetBackgroundColor(white);
69 
70  // special case: solid
71  if (pattern == 1001)
72  SetBackgroundColor(0); // if solid then black
73 
74  fPattern = pattern;
75 
77  fMsgWindow = p;
78  fActive = kFALSE;
79  snprintf(fTipText, 5, "%d", pattern);
80 
81  // solid and hollow must be treated separately
82  if (pattern != 0 && pattern != 1001)
83  fTip = new TGToolTip(fClient->GetDefaultRoot(), this, fTipText, 1000);
84  else if (pattern == 0)
85  fTip = new TGToolTip(fClient->GetDefaultRoot(), this, "0 - hollow", 1000);
86  else // pattern == 1001
87  fTip = new TGToolTip(fClient->GetDefaultRoot(), this, "1001 - solid", 1000);
88 
90 
91  if (!fgGC) {
92  GCValues_t gcv;
95  gcv.fLineStyle = kLineSolid;
96  gcv.fLineWidth = 0;
97  gcv.fFillStyle = 0;
98  gcv.fBackground = white;
99  gcv.fForeground = 0; // black foreground
100  fgGC = gClient->GetGC(&gcv, kTRUE);
101  }
102 }
103 
104 ////////////////////////////////////////////////////////////////////////////////
105 /// Handle mouse crossing event.
106 
108 {
109  if (fTip) {
110  if (event->fType == kEnterNotify)
111  fTip->Reset();
112  else
113  fTip->Hide();
114  }
115  return kTRUE;
116 }
117 
118 ////////////////////////////////////////////////////////////////////////////////
119 /// Handle mouse button event.
120 
122 {
123  if (event->fType == kButtonPress) {
125  } else { // kButtonRelease
127  }
128 
129  return kTRUE;
130 }
131 
132 ////////////////////////////////////////////////////////////////////////////////
133 /// Draw border.
134 
136 {
137  gVirtualX->DrawRectangle(fId, GetBckgndGC()(), 0, 0, fWidth, fHeight);
139 }
140 
141 ////////////////////////////////////////////////////////////////////////////////
142 /// Redraw selected pattern.
143 
145 {
147 
148  if (fPattern > 3000 && fPattern < 3026) {
149  SetFillStyle(fgGC, fPattern);
150  gVirtualX->FillRectangle(fId, fgGC->GetGC(), 0, 0, fWidth, fHeight);
151  }
152  DrawBorder();
153 }
154 
155 ////////////////////////////////////////////////////////////////////////////////
156 /// Set fill area style.
157 /// fstyle : compound fill area interior style
158 /// fstyle = 1000*interiorstyle + styleindex
159 /// this function should be in TGGC !!!
160 
162 {
163  Int_t style = fstyle/1000;
164  Int_t fasi = fstyle%1000;
165  Int_t stn = (fasi >= 1 && fasi <=25) ? fasi : 2;
166 
167  static Pixmap_t fillPattern = 0;
168 
169  switch (style) {
170  case 1: // solid
172  break;
173  case 2: // pattern
174  break;
175  case 3: // hatch
177  if (fillPattern != 0) {
178  gVirtualX->DeletePixmap(fillPattern);
179  fillPattern = 0;
180  }
181  fillPattern = gVirtualX->CreateBitmap(gClient->GetDefaultRoot()->GetId(),
182  (const char*)gStipples[stn], 16, 16);
183  gc->SetStipple(fillPattern);
184  break;
185  default:
186  break;
187  }
188 }
189 
190 ////////////////////////////////////////////////////////////////////////////////
191 /// Create pattern popup window.
192 
194  TGCompositeFrame(p, 124, 190)
195 {
196  SetLayoutManager(new TGTileLayout(this, 1));
197 
198  Int_t i;
199  for (i = 1; i <= 25; i++)
200  fCe[i-1] = new TGedPatternFrame(this, 3000 + i);
201 
202  fCe[25] = new TGedPatternFrame(this, 0);
203  fCe[26] = new TGedPatternFrame(this, 1001);
204 
205  for (i = 0; i < 27; i++)
207 
208  fMsgWindow = p;
209  fActive = -1;
210 }
211 
212 ////////////////////////////////////////////////////////////////////////////////
213 /// Delete pattern popup window.
214 
216 {
217  Cleanup();
218 }
219 
220 ////////////////////////////////////////////////////////////////////////////////
221 /// Set selected the current style.
222 
224 {
225  if (fActive != newat) {
226  if ((fActive >= 0) && (fActive < 27)) {
228  }
229  fActive = newat;
230  if ((fActive >= 0) && (fActive < 27)) {
232  }
233  }
234 }
235 
236 ////////////////////////////////////////////////////////////////////////////////
237 /// Process message generated by pattern popup window.
238 
240 {
241  switch (GET_MSG(msg)) {
242  case kC_PATTERNSEL:
243  switch (GET_SUBMSG(msg)) {
244  case kPAT_SELCHANGED:
245  switch (parm1) {
246  case kButton1:
248  kPAT_SELCHANGED), parm1, parm2);
249  break;
250  }
251  break;
252  case kPAT_CLICK:
253  switch (parm1) {
254  case kButton1:
255  SetActive(parm2);
256  break;
257  }
258  break;
259  }
260  }
261 
262  return kTRUE;
263 }
264 
265 ////////////////////////////////////////////////////////////////////////////////
266 /// Create a popup frame.
267 
269  UInt_t options, Pixel_t back)
270  : TGCompositeFrame(p, w, h, options, back)
271 {
272  fMsgWindow = m;
273  SetWindowAttributes_t wattr;
274 
276  wattr.fOverrideRedirect = kTRUE;
277  wattr.fSaveUnder = kTRUE;
278  gVirtualX->ChangeWindowAttributes(fId, &wattr);
279 
281 }
282 
283 ////////////////////////////////////////////////////////////////////////////////
284 /// Ungrab pointer and unmap popup window.
285 
287 {
288  gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE);
289  UnmapWindow();
290 }
291 
292 ////////////////////////////////////////////////////////////////////////////////
293 /// Place popup window at the specified place.
294 
296 {
297  Int_t rx, ry;
298  UInt_t rw, rh;
299 
300  // Parent is root window for the popup:
301  gVirtualX->GetWindowSize(fParent->GetId(), rx, ry, rw, rh);
302 
303  if (x < 0) x = 0;
304  if (x + fWidth > rw) x = rw - fWidth;
305  if (y < 0) y = 0;
306  if (y + fHeight > rh) y = rh - fHeight;
307 
308  MoveResize(x, y, w, h);
309  MapSubwindows();
310  Layout();
311  MapRaised();
312 
316  gClient->WaitForUnmap(this);
317  EndPopup();
318 }
319 
320 ////////////////////////////////////////////////////////////////////////////////
321 /// Handle mouse button event in popup window.
322 
324 {
325  if ((event->fX < 0) || (event->fX >= (Int_t) fWidth) ||
326  (event->fY < 0) || (event->fY >= (Int_t) fHeight)) {
327 
328  if (event->fType == kButtonRelease) EndPopup();
329 
330  } else {
331  TGFrame *f = GetFrameFromPoint(event->fX, event->fY);
332  if (f && f != this) {
333  TranslateCoordinates(f, event->fX, event->fY, event->fX, event->fY);
334  f->HandleButton(event);
335  }
336  }
337  return kTRUE;
338 }
339 
340 ////////////////////////////////////////////////////////////////////////////////
341 /// Process messages generated by popup window.
342 
344 {
345  switch (GET_MSG(msg)) {
346  case kC_POPUP:
347  switch (GET_SUBMSG(msg)) {
348  case kPOP_HIDE:
349  EndPopup();
351  parm1, parm2);
352  break;
353  default:
354  break;
355  }
356  break;
357  }
358  return kTRUE;
359 }
360 
361 ////////////////////////////////////////////////////////////////////////////////
362 /// Pattern popup constructor.
363 
365  : TGedPopup(p, m, 10, 10, kDoubleBorder | kRaisedFrame | kOwnBackground,
366  GetDefaultFrameBackground())
367 {
369 
371  AddFrame(ps, new TGLayoutHints(kLHintsCenterX, 1, 1, 1, 1));
372 
373  MapSubwindows();
374  Resize(ps->GetDefaultWidth() + 6, ps->GetDefaultHeight());
375 }
376 
377 ////////////////////////////////////////////////////////////////////////////////
378 /// Destructor of pattern popup window.
379 
381 {
382  Cleanup();
383 }
384 
385 ////////////////////////////////////////////////////////////////////////////////
386 /// Process messages generated by pattern popup window.
387 
389 {
390  switch (GET_MSG(msg)) {
391  case kC_PATTERNSEL:
392  switch (GET_SUBMSG(msg)) {
393  case kPAT_SELCHANGED:
395  parm1, parm2);
396  UnmapWindow();
397  break;
398 
399  default:
400  break;
401  }
402  break;
403  }
404  return kTRUE;
405 }
406 
407 ////////////////////////////////////////////////////////////////////////////////
408 /// Create pattern select button.
409 
411  : TGCheckButton(p, "", id)
412 {
413  fPopup = 0;
414 
415  GCValues_t gcv;
418  gcv.fLineStyle = kLineSolid;
419  gcv.fLineWidth = 0;
420  gcv.fFillStyle = 0;
421  Pixel_t white;
422  gClient->GetColorByName("white", white); // white background
423  gcv.fBackground = white;
424  gcv.fForeground = 0; // black foreground
425  fDrawGC = gClient->GetGC(&gcv, kTRUE);
426 
427  Enable();
430 }
431 
432 ////////////////////////////////////////////////////////////////////////////////
433 /// Destructor of pattern select button.
434 
436 {
437  if (fPopup)
438  delete fPopup;
440 }
441 
442 ////////////////////////////////////////////////////////////////////////////////
443 /// Handle mouse button events in pattern select button.
444 
446 {
447  TGFrame::HandleButton(event);
448 
449  if (!IsEnabled()) return kTRUE;
450 
451  if (event->fCode != kButton1) return kFALSE;
452 
453  if ((event->fType == kButtonPress) && HasFocus()) WantFocus();
454 
455  if (event->fType == kButtonPress) {
456  if (fState != kButtonDown) {
457  fPrevState = fState;
459  }
460  } else {
461  if (fState != kButtonUp) {
463  Window_t wdummy;
464  Int_t ax, ay;
465  if (fPopup) {
466  gVirtualX->TranslateCoordinates(fId, gClient->GetDefaultRoot()->GetId(),
467  0, fHeight, ax, ay, wdummy);
468 #ifdef R__HAS_COCOA
469  gVirtualX->SetWMTransientHint(fPopup->GetId(), GetId());
470 #endif
473  }
474  }
475  }
476  return kTRUE;
477 }
478 
479 ////////////////////////////////////////////////////////////////////////////////
480 /// Set widget state flag (kTRUE=enabled, kFALSE=disabled).
481 
483 {
485  fClient->NeedRedraw(this);
486 }
487 
488 ////////////////////////////////////////////////////////////////////////////////
489 /// Clear widget state flag.
490 
492 {
494  fClient->NeedRedraw(this);
495 }
496 
497 ////////////////////////////////////////////////////////////////////////////////
498 /// Draw separator and arrow.
499 
501 {
502  Int_t x, y;
503  UInt_t h;
504 
506 
507  if (IsEnabled()) {
508 
509  // separator
510  x = fWidth - 6 - fBorderWidth - 6;
511  y = fBorderWidth + 1;
512  h = fHeight - fBorderWidth - 1; // actually y1
513 
514  if (fState == kButtonDown) { ++x; ++y; }
515 
516  gVirtualX->DrawLine(fId, GetShadowGC()(), x, y, x, h - 2);
517  gVirtualX->DrawLine(fId, GetHilightGC()(), x + 1, y, x + 1, h - 1);
518  gVirtualX->DrawLine(fId, GetHilightGC()(), x, h - 1, x + 1, h - 1);
519 
520  // arrow
521 
522  x = fWidth - 6 - fBorderWidth - 2;
523  y = (fHeight - 4) / 2 + 1;
524 
525  if (fState == kButtonDown) { ++x; ++y; }
526 
527  DrawTriangle(GetBlackGC()(), x, y);
528 
529  } else {
530 
531  // separator
532  x = fWidth - 6 - fBorderWidth - 6;
533  y = fBorderWidth + 1;
534  h = fHeight - fBorderWidth - 1; // actually y1
535 
536  gVirtualX->DrawLine(fId, GetShadowGC()(), x, y, x, h - 2);
537  gVirtualX->DrawLine(fId, GetHilightGC()(), x + 1, y, x + 1, h - 1);
538  gVirtualX->DrawLine(fId, GetHilightGC()(), x, h - 1, x + 1, h - 1);
539 
540  // sunken arrow
541 
542  x = fWidth - 6 - fBorderWidth - 2;
543  y = (fHeight - 4) / 2 + 1;
544 
545  DrawTriangle(GetHilightGC()(), x + 1, y + 1);
546  DrawTriangle(GetShadowGC()(), x, y);
547  }
548 }
549 
550 ////////////////////////////////////////////////////////////////////////////////
551 /// Draw small triangle.
552 
554 {
555  Point_t points[3];
556 
557 #ifdef R__HAS_COCOA
558  points[0].fX = x;
559  points[0].fY = y;
560  points[1].fX = x + 6;
561  points[1].fY = y;
562  points[2].fX = x + 3;
563  points[2].fY = y + 3;
564 #else
565  points[0].fX = x;
566  points[0].fY = y;
567  points[1].fX = x + 5;
568  points[1].fY = y;
569  points[2].fX = x + 2;
570  points[2].fY = y + 3;
571 #endif
572 
573  gVirtualX->FillPolygon(fId, gc, points, 3);
574 }
575 
576 
577 ////////////////////////////////////////////////////////////////////////////////
578 /// Create and pop up pattern select window.
579 
581  : TGedSelect(p, id)
582 {
583  fPattern = pattern;
584  SetPopup(new TGedPatternPopup(gClient->GetDefaultRoot(), this, fPattern));
586 }
587 
588 ////////////////////////////////////////////////////////////////////////////////
589 /// Process message according to the user input.
590 
592 {
593  if (GET_MSG(msg) == kC_PATTERNSEL && GET_SUBMSG(msg) == kPAT_SELCHANGED)
594  {
595  SetPattern(parm2);
596  parm1 = (Long_t)fWidgetId;
598  parm1, parm2);
599  }
600  return kTRUE;
601 }
602 
603 ////////////////////////////////////////////////////////////////////////////////
604 /// Draw selected pattern as current one.
605 
607 {
609 
610  Int_t x, y;
611  UInt_t w, h;
612 
613  if (IsEnabled()) { // pattern rectangle
614 
615  x = fBorderWidth + 2;
616  y = fBorderWidth + 2; // 1;
617  h = fHeight - (fBorderWidth * 2) - 4; // -3; // 14
618  w = h * 2;
619  if (fState == kButtonDown) { ++x; ++y; }
620 
621 #ifdef R__HAS_COCOA
623 
624  Pixel_t white;
625  gClient->GetColorByName("white", white); // white background
626  fDrawGC->SetForeground(white);
627  gVirtualX->FillRectangle(fId, fDrawGC->GetGC(), x + 1, y + 1, w - 1, h - 1);
628 
629  if (fPattern != 0) {
632  gVirtualX->FillRectangle(fId, fDrawGC->GetGC(), x + 1, y + 1, w - 1, h - 1);
633  }
634 
635  gVirtualX->DrawRectangle(fId, GetShadowGC()(), x + 1, y + 1, w - 1, h - 1);
636 #else
637  gVirtualX->DrawRectangle(fId, GetShadowGC()(), x, y, w - 1, h - 1);
638 
640 
641  Pixel_t white;
642  gClient->GetColorByName("white", white); // white background
643  fDrawGC->SetForeground(white);
644  gVirtualX->FillRectangle(fId, fDrawGC->GetGC(), x + 1, y + 1, w - 2, h - 2);
645 
646  if (fPattern != 0) {
649  gVirtualX->FillRectangle(fId, fDrawGC->GetGC(), x + 1, y + 1, w - 2, h - 2);
650  }
651 #endif
652  } else { // sunken rectangle
653 
654  x = fBorderWidth + 2;
655  y = fBorderWidth + 2; // 1;
656  w = 42;
657  h = fHeight - (fBorderWidth * 2) - 4; // 3;
658  Draw3dRectangle(kSunkenFrame, x, y, w, h);
659  }
660 }
661 
662 ////////////////////////////////////////////////////////////////////////////////
663 /// Set pattern.
664 
666 {
667  fPattern = pattern;
668  gClient->NeedRedraw(this);
669  if (emit)
671 }
672 
673 ////////////////////////////////////////////////////////////////////////////////
674 /// Save the pattern select widget as a C++ statement(s) on output stream out
675 
676 void TGedPatternSelect::SavePrimitive(std::ostream &out, Option_t * /*= ""*/)
677 {
678  out <<" TGedPatternSelect *";
679  out << GetName() << " = new TGedPatternSelect(" << fParent->GetName()
680  << "," << fPattern << "," << WidgetId() << ");" << std::endl;
681 }
Int_t fLineStyle
Definition: GuiTypes.h:231
const TGWindow * fParent
Definition: TGWindow.h:43
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition: TGWindow.cxx:221
Bool_t HasFocus() const
Definition: TGWidget.h:88
TGedPatternFrame * fCe[27]
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:611
Int_t fBorderWidth
Definition: TGFrame.h:156
short Style_t
Definition: RtypesCore.h:76
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:321
const char Option_t
Definition: RtypesCore.h:62
void Reset()
Reset tool tip popup delay timer.
Definition: TGToolTip.cxx:259
void SetForeground(Pixel_t v)
Set foreground color.
Definition: TGGC.cxx:276
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition: TGFrame.cxx:737
TH1 * h
Definition: legend2.C:5
const Mask_t kLeaveWindowMask
Definition: GuiTypes.h:169
Int_t SetFlags(Int_t flags)
Definition: TGWidget.h:76
Bool_t IsEnabled() const
Definition: TGWidget.h:87
virtual Bool_t TranslateCoordinates(TGFrame *child, Int_t x, Int_t y, Int_t &fx, Int_t &fy)
Translate coordinates to child frame.
Definition: TGFrame.cxx:1314
Int_t fY
Definition: GuiTypes.h:179
Handle_t GContext_t
Definition: GuiTypes.h:39
#define gClient
Definition: TGClient.h:174
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
Definition: TGFrame.cxx:982
const Mask_t kGCLineStyle
Definition: GuiTypes.h:292
virtual void PatternSelected(Style_t pattern=0)
Short_t fX
Definition: GuiTypes.h:358
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Int_t MK_MSG(EWidgetMessageTypes msg, EWidgetMessageTypes submsg)
const Bool_t kFALSE
Definition: Rtypes.h:92
void Hide()
Hide tool tip window.
Definition: TGToolTip.cxx:246
Int_t fFillStyle
Definition: GuiTypes.h:235
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event.
virtual void MapRaised()
Definition: TGFrame.h:268
Int_t fWidgetId
Definition: TGWidget.h:64
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1239
TFile * f
virtual void DoRedraw()
Redraw selected pattern.
const Mask_t kPointerMotionMask
Definition: GuiTypes.h:164
virtual void DoRedraw()
Redraw the frame.
Definition: TGFrame.cxx:412
Double_t x[n]
Definition: legend1.C:17
ULong_t Pixel_t
Definition: GuiTypes.h:41
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process message according to the user input.
ULong_t fForeground
Definition: GuiTypes.h:228
virtual ~TGedPatternSelector()
Delete pattern popup window.
TGedSelect(const TGWindow *p, Int_t id)
Create pattern select button.
const Mask_t kGCLineWidth
Definition: GuiTypes.h:291
virtual void SetPopup(TGedPopup *p)
virtual void DoRedraw()
Draw selected pattern as current one.
Bool_t WantFocus() const
Definition: TGWidget.h:89
static const std::string pattern("pattern")
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
Definition: TGFrame.cxx:627
virtual void DrawBorder()
Draw border.
virtual ~TGedPatternPopup()
Destructor of pattern popup window.
void FreeGC(const TGGC *gc)
Free a graphics context.
Definition: TGClient.cxx:326
const TGWindow * fMsgWindow
static void SetFillStyle(TGGC *gc, Style_t fstyle)
Set fill area style.
EButtonState fPrevState
Definition: TGButton.h:276
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages generated by popup window.
const TGWindow * fMsgWindow
Definition: TGWidget.h:66
void SetStipple(Pixmap_t v)
Set 1 plane pixmap for stippling.
Definition: TGGC.cxx:376
char * out
Definition: TBase64.cxx:29
void PlacePopup(Int_t x, Int_t y, UInt_t w, UInt_t h)
Place popup window at the specified place.
virtual void Disable()
Clear widget state flag.
point * points
Definition: X3DBuffer.c:20
const Mask_t kButtonPressMask
Definition: GuiTypes.h:162
Bool_t fOverrideRedirect
Definition: GuiTypes.h:108
TGedPopup * fPopup
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Get frame located at specified point.
Definition: TGFrame.cxx:1290
const Mask_t kWASaveUnder
Definition: GuiTypes.h:151
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:387
Int_t ClearFlags(Int_t flags)
Definition: TGWidget.h:77
EGEventType fType
Definition: GuiTypes.h:176
Int_t GET_SUBMSG(Long_t val)
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:389
const TGWindow * fMsgWindow
void SetFillStyle(Int_t v)
Set fill style (kFillSolid, kFillTiled, kFillStippled, kFillOpaeueStippled).
Definition: TGGC.cxx:343
unsigned int UInt_t
Definition: RtypesCore.h:42
TMarker * m
Definition: textangle.C:8
const Handle_t kNone
Definition: GuiTypes.h:89
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the pattern select widget as a C++ statement(s) on output stream out.
tuple w
Definition: qtexample.py:51
void SetPattern(Style_t pattern, Bool_t emit=kTRUE)
Set pattern.
static const TGGC & GetBlackGC()
Get black graphics context.
Definition: TGFrame.cxx:717
const unsigned char gStipples[26][32]
Definition: RStipples.h:28
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process message generated by pattern popup window.
#define gVirtualX
Definition: TVirtualX.h:362
UInt_t fWidth
Definition: TGFrame.h:150
virtual void DoRedraw()
Draw separator and arrow.
TGedPatternSelect(const TGWindow *p, Style_t pattern, Int_t id)
Create and pop up pattern select window.
Int_t GET_MSG(Long_t val)
virtual void Enable()
Set widget state flag (kTRUE=enabled, kFALSE=disabled).
void EndPopup()
Ungrab pointer and unmap popup window.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event.
Int_t WidgetId() const
Definition: TGWidget.h:86
long Long_t
Definition: RtypesCore.h:50
const Mask_t kEnterWindowMask
Definition: GuiTypes.h:168
ULong_t fBackground
Definition: GuiTypes.h:229
#define ClassImp(name)
Definition: Rtypes.h:279
void SetActive(Bool_t in)
const Mask_t kGCFillStyle
Definition: GuiTypes.h:295
const Mask_t kStructureNotifyMask
Definition: GuiTypes.h:167
const TGResourcePool * GetResourcePool() const
Definition: TGClient.h:141
const Mask_t kButtonReleaseMask
Definition: GuiTypes.h:163
UInt_t fCode
Definition: GuiTypes.h:181
const Mask_t kWAOverrideRedirect
Definition: GuiTypes.h:150
TCanvas * style()
Definition: style.C:1
Double_t y[n]
Definition: legend1.C:17
void DrawTriangle(GContext_t gc, Int_t x, Int_t y)
Draw small triangle.
virtual Bool_t HandleButton(Event_t *)
Definition: TGFrame.h:224
const Mask_t kGCForeground
Definition: GuiTypes.h:289
UInt_t fHeight
Definition: TGFrame.h:151
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1146
Cursor_t GetGrabCursor() const
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events in pattern select button.
Handle_t fId
Definition: TGObject.h:40
TGedPatternPopup(const TGWindow *p, const TGWindow *m, Style_t pattern)
Pattern popup constructor.
Handle_t Window_t
Definition: GuiTypes.h:30
virtual void UnmapWindow()
Definition: TGFrame.h:269
Mask_t fMask
Definition: GuiTypes.h:252
TGClient * fClient
Definition: TGObject.h:41
const Mask_t kGCBackground
Definition: GuiTypes.h:290
Handle_t Pixmap_t
Definition: GuiTypes.h:31
Int_t fLineWidth
Definition: GuiTypes.h:230
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in popup window.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Definition: TGClient.cxx:370
void SetActive(Int_t newat)
Set selected the current style.
EButtonState fState
Definition: TGButton.h:79
virtual ~TGedSelect()
Destructor of pattern select button.
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1200
virtual void Draw3dRectangle(UInt_t type, Int_t x, Int_t y, UInt_t w, UInt_t h)
Draw 3D rectangle on the frame border.
Definition: TGFrame.cxx:339
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition: TGFrame.cxx:949
const Bool_t kTRUE
Definition: Rtypes.h:91
TGedPopup(const TGWindow *p, const TGWindow *m, UInt_t w, UInt_t h, UInt_t options=0, Pixel_t back=GetDefaultFrameBackground())
Create a popup frame.
Handle_t GetId() const
Definition: TGObject.h:52
Definition: TGGC.h:35
GContext_t GetGC() const
Definition: TGGC.h:54
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition: TGFrame.cxx:747
Int_t fX
Definition: GuiTypes.h:179
static const TGGC & GetBckgndGC()
Get background color graphics context.
Definition: TGFrame.cxx:757
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages generated by pattern popup window.
const TGWindow * fMsgWindow
TGedPatternSelector(const TGWindow *p)
Create pattern popup window.
Short_t fY
Definition: GuiTypes.h:358