Logo ROOT  
Reference Guide
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
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;
79 snprintf(fTipText, sizeof(fTipText), "%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;
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) {
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;
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 (gVirtualX->InheritsFrom("TGWin32")) {
304 if ((x > 0) && ((x + abs(rx) + (Int_t)fWidth) > (Int_t)rw))
305 x = rw - abs(rx) - fWidth;
306 if ((y > 0) && (y + abs(ry) + (Int_t)fHeight > (Int_t)rh))
307 y = rh - fHeight;
308 } else {
309 if (x < 0) x = 0;
310 if (x + fWidth > rw) x = rw - fWidth;
311 if (y < 0) y = 0;
312 if (y + fHeight > rh) y = rh - fHeight;
313 }
314
315 MoveResize(x, y, w, h);
317 Layout();
318 MapRaised();
319
323 gClient->WaitForUnmap(this);
324 EndPopup();
325}
326
327////////////////////////////////////////////////////////////////////////////////
328/// Handle mouse button event in popup window.
329
331{
332 if ((event->fX < 0) || (event->fX >= (Int_t) fWidth) ||
333 (event->fY < 0) || (event->fY >= (Int_t) fHeight)) {
334
335 if (event->fType == kButtonRelease) EndPopup();
336
337 } else {
338 TGFrame *f = GetFrameFromPoint(event->fX, event->fY);
339 if (f && f != this) {
340 TranslateCoordinates(f, event->fX, event->fY, event->fX, event->fY);
341 f->HandleButton(event);
342 }
343 }
344 return kTRUE;
345}
346
347////////////////////////////////////////////////////////////////////////////////
348/// Process messages generated by popup window.
349
351{
352 switch (GET_MSG(msg)) {
353 case kC_POPUP:
354 switch (GET_SUBMSG(msg)) {
355 case kPOP_HIDE:
356 EndPopup();
358 parm1, parm2);
359 break;
360 default:
361 break;
362 }
363 break;
364 }
365 return kTRUE;
366}
367
368////////////////////////////////////////////////////////////////////////////////
369/// Pattern popup constructor.
370
373 GetDefaultFrameBackground())
374{
375 fCurrentPattern = pattern;
376
378 AddFrame(ps, new TGLayoutHints(kLHintsCenterX, 1, 1, 1, 1));
379
381 Resize(ps->GetDefaultWidth() + 6, ps->GetDefaultHeight());
382}
383
384////////////////////////////////////////////////////////////////////////////////
385/// Destructor of pattern popup window.
386
388{
389 Cleanup();
390}
391
392////////////////////////////////////////////////////////////////////////////////
393/// Process messages generated by pattern popup window.
394
396{
397 switch (GET_MSG(msg)) {
398 case kC_PATTERNSEL:
399 switch (GET_SUBMSG(msg)) {
400 case kPAT_SELCHANGED:
402 parm1, parm2);
403 UnmapWindow();
404 break;
405
406 default:
407 break;
408 }
409 break;
410 }
411 return kTRUE;
412}
413
414////////////////////////////////////////////////////////////////////////////////
415/// Create pattern select button.
416
418 : TGCheckButton(p, "", id)
419{
420 fPopup = 0;
421
422 GCValues_t gcv;
426 gcv.fLineWidth = 0;
427 gcv.fFillStyle = 0;
428 Pixel_t white;
429 gClient->GetColorByName("white", white); // white background
430 gcv.fBackground = white;
431 gcv.fForeground = 0; // black foreground
432 fDrawGC = gClient->GetGC(&gcv, kTRUE);
433
434 Enable();
437}
438
439////////////////////////////////////////////////////////////////////////////////
440/// Destructor of pattern select button.
441
443{
444 if (fPopup)
445 delete fPopup;
447}
448
449////////////////////////////////////////////////////////////////////////////////
450/// Handle mouse button events in pattern select button.
451
453{
455
456 if (!IsEnabled()) return kTRUE;
457
458 if (event->fCode != kButton1) return kFALSE;
459
460 if ((event->fType == kButtonPress) && HasFocus()) WantFocus();
461
462 if (event->fType == kButtonPress) {
463 if (fState != kButtonDown) {
466 }
467 } else {
468 if (fState != kButtonUp) {
470 Window_t wdummy;
471 Int_t ax, ay;
472 if (fPopup) {
473 gVirtualX->TranslateCoordinates(fId, gClient->GetDefaultRoot()->GetId(),
474 0, fHeight, ax, ay, wdummy);
475#ifdef R__HAS_COCOA
476 gVirtualX->SetWMTransientHint(fPopup->GetId(), GetId());
477#endif
480 }
481 }
482 }
483 return kTRUE;
484}
485
486////////////////////////////////////////////////////////////////////////////////
487/// Set widget state flag (kTRUE=enabled, kFALSE=disabled).
488
490{
492 fClient->NeedRedraw(this);
493}
494
495////////////////////////////////////////////////////////////////////////////////
496/// Clear widget state flag.
497
499{
501 fClient->NeedRedraw(this);
502}
503
504////////////////////////////////////////////////////////////////////////////////
505/// Draw separator and arrow.
506
508{
509 Int_t x, y;
510 UInt_t h;
511
513
514 if (IsEnabled()) {
515
516 // separator
517 x = fWidth - 6 - fBorderWidth - 6;
518 y = fBorderWidth + 1;
519 h = fHeight - fBorderWidth - 1; // actually y1
520
521 if (fState == kButtonDown) { ++x; ++y; }
522
523 gVirtualX->DrawLine(fId, GetShadowGC()(), x, y, x, h - 2);
524 gVirtualX->DrawLine(fId, GetHilightGC()(), x + 1, y, x + 1, h - 1);
525 gVirtualX->DrawLine(fId, GetHilightGC()(), x, h - 1, x + 1, h - 1);
526
527 // arrow
528
529 x = fWidth - 6 - fBorderWidth - 2;
530 y = (fHeight - 4) / 2 + 1;
531
532 if (fState == kButtonDown) { ++x; ++y; }
533
534 DrawTriangle(GetBlackGC()(), x, y);
535
536 } else {
537
538 // separator
539 x = fWidth - 6 - fBorderWidth - 6;
540 y = fBorderWidth + 1;
541 h = fHeight - fBorderWidth - 1; // actually y1
542
543 gVirtualX->DrawLine(fId, GetShadowGC()(), x, y, x, h - 2);
544 gVirtualX->DrawLine(fId, GetHilightGC()(), x + 1, y, x + 1, h - 1);
545 gVirtualX->DrawLine(fId, GetHilightGC()(), x, h - 1, x + 1, h - 1);
546
547 // sunken arrow
548
549 x = fWidth - 6 - fBorderWidth - 2;
550 y = (fHeight - 4) / 2 + 1;
551
552 DrawTriangle(GetHilightGC()(), x + 1, y + 1);
554 }
555}
556
557////////////////////////////////////////////////////////////////////////////////
558/// Draw small triangle.
559
561{
562 Point_t points[3];
563
564#ifdef R__HAS_COCOA
565 points[0].fX = x;
566 points[0].fY = y;
567 points[1].fX = x + 6;
568 points[1].fY = y;
569 points[2].fX = x + 3;
570 points[2].fY = y + 3;
571#else
572 points[0].fX = x;
573 points[0].fY = y;
574 points[1].fX = x + 5;
575 points[1].fY = y;
576 points[2].fX = x + 2;
577 points[2].fY = y + 3;
578#endif
579
580 gVirtualX->FillPolygon(fId, gc, points, 3);
581}
582
583
584////////////////////////////////////////////////////////////////////////////////
585/// Create and pop up pattern select window.
586
588 : TGedSelect(p, id)
589{
590 fPattern = pattern;
591 SetPopup(new TGedPatternPopup(gClient->GetDefaultRoot(), this, fPattern));
593}
594
595////////////////////////////////////////////////////////////////////////////////
596/// Process message according to the user input.
597
599{
600 if (GET_MSG(msg) == kC_PATTERNSEL && GET_SUBMSG(msg) == kPAT_SELCHANGED)
601 {
602 SetPattern(parm2);
603 parm1 = (Long_t)fWidgetId;
605 parm1, parm2);
606 }
607 return kTRUE;
608}
609
610////////////////////////////////////////////////////////////////////////////////
611/// Draw selected pattern as current one.
612
614{
616
617 Int_t x, y;
618 UInt_t w, h;
619
620 if (IsEnabled()) { // pattern rectangle
621
622 x = fBorderWidth + 2;
623 y = fBorderWidth + 2; // 1;
624 h = fHeight - (fBorderWidth * 2) - 4; // -3; // 14
625 w = h * 2;
626 if (fState == kButtonDown) { ++x; ++y; }
627
628#ifdef R__HAS_COCOA
630
631 Pixel_t white;
632 gClient->GetColorByName("white", white); // white background
633 fDrawGC->SetForeground(white);
634 gVirtualX->FillRectangle(fId, fDrawGC->GetGC(), x + 1, y + 1, w - 1, h - 1);
635
636 if (fPattern != 0) {
639 gVirtualX->FillRectangle(fId, fDrawGC->GetGC(), x + 1, y + 1, w - 1, h - 1);
640 }
641
642 gVirtualX->DrawRectangle(fId, GetShadowGC()(), x + 1, y + 1, w - 1, h - 1);
643#else
644 gVirtualX->DrawRectangle(fId, GetShadowGC()(), x, y, w - 1, h - 1);
645
647
648 Pixel_t white;
649 gClient->GetColorByName("white", white); // white background
650 fDrawGC->SetForeground(white);
651 gVirtualX->FillRectangle(fId, fDrawGC->GetGC(), x + 1, y + 1, w - 2, h - 2);
652
653 if (fPattern != 0) {
656 gVirtualX->FillRectangle(fId, fDrawGC->GetGC(), x + 1, y + 1, w - 2, h - 2);
657 }
658#endif
659 } else { // sunken rectangle
660
661 x = fBorderWidth + 2;
662 y = fBorderWidth + 2; // 1;
663 w = 42;
664 h = fHeight - (fBorderWidth * 2) - 4; // 3;
666 }
667}
668
669////////////////////////////////////////////////////////////////////////////////
670/// Set pattern.
671
673{
674 fPattern = pattern;
675 gClient->NeedRedraw(this);
676 if (emit)
678}
679
680////////////////////////////////////////////////////////////////////////////////
681/// Save the pattern select widget as a C++ statement(s) on output stream out
682
683void TGedPatternSelect::SavePrimitive(std::ostream &out, Option_t * /*= ""*/)
684{
685 out <<" TGedPatternSelect *";
686 out << GetName() << " = new TGedPatternSelect(" << fParent->GetName()
687 << "," << fPattern << "," << WidgetId() << ");" << std::endl;
688}
@ kButtonRelease
Definition: GuiTypes.h:59
@ kButtonPress
Definition: GuiTypes.h:59
@ kEnterNotify
Definition: GuiTypes.h:60
const Mask_t kWAOverrideRedirect
Definition: GuiTypes.h:148
const Mask_t kGCBackground
Definition: GuiTypes.h:288
const Mask_t kGCForeground
Definition: GuiTypes.h:287
const Mask_t kGCLineStyle
Definition: GuiTypes.h:290
const Mask_t kGCLineWidth
Definition: GuiTypes.h:289
const Mask_t kButtonPressMask
Definition: GuiTypes.h:160
const Mask_t kGCFillStyle
Definition: GuiTypes.h:293
const Mask_t kWASaveUnder
Definition: GuiTypes.h:149
Handle_t Pixmap_t
Definition: GuiTypes.h:29
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
@ kFillStippled
Definition: GuiTypes.h:50
@ kFillSolid
Definition: GuiTypes.h:50
@ kLineSolid
Definition: GuiTypes.h:47
Handle_t GContext_t
Definition: GuiTypes.h:37
const Mask_t kButtonReleaseMask
Definition: GuiTypes.h:161
const Mask_t kEnterWindowMask
Definition: GuiTypes.h:166
ULong_t Pixel_t
Definition: GuiTypes.h:39
@ kButton1
Definition: GuiTypes.h:213
Handle_t Window_t
Definition: GuiTypes.h:28
#define f(i)
Definition: RSha256.hxx:104
#define h(i)
Definition: RSha256.hxx:106
const unsigned char gStipples[26][32]
Definition: RStipples.h:26
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
long Long_t
Definition: RtypesCore.h:50
bool Bool_t
Definition: RtypesCore.h:59
short Style_t
Definition: RtypesCore.h:76
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassImp(name)
Definition: Rtypes.h:365
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
@ kButtonDown
Definition: TGButton.h:54
@ kButtonUp
Definition: TGButton.h:53
#define gClient
Definition: TGClient.h:166
@ kRaisedFrame
Definition: TGFrame.h:62
@ kSunkenFrame
Definition: TGFrame.h:61
@ kDoubleBorder
Definition: TGFrame.h:63
@ kOwnBackground
Definition: TGFrame.h:69
@ kLHintsNoHints
Definition: TGLayout.h:30
@ kLHintsCenterX
Definition: TGLayout.h:32
@ kWidgetIsEnabled
Definition: TGWidget.h:48
XFontStruct * id
Definition: TGX11.cxx:108
#define gVirtualX
Definition: TVirtualX.h:345
Int_t MK_MSG(EWidgetMessageTypes msg, EWidgetMessageTypes submsg)
Int_t GET_MSG(Long_t val)
@ kPAT_SELCHANGED
@ kC_PATTERNSEL
@ kPAT_CLICK
@ kPOP_HIDE
@ kC_POPUP
Int_t GET_SUBMSG(Long_t val)
point * points
Definition: X3DBuffer.c:22
#define snprintf
Definition: civetweb.c:1540
EButtonState fState
Definition: TGButton.h:75
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1200
EButtonState fPrevState
Definition: TGButton.h:272
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Definition: TGClient.cxx:234
void FreeGC(const TGGC *gc)
Free a graphics context.
Definition: TGClient.cxx:328
const TGResourcePool * GetResourcePool() const
Definition: TGClient.h:133
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Definition: TGClient.cxx:372
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
Definition: TGFrame.cxx:982
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Get frame located at specified point.
Definition: TGFrame.cxx:1290
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:371
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition: TGFrame.cxx:949
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1239
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
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1146
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:373
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:321
virtual void DoRedraw()
Redraw the frame.
Definition: TGFrame.cxx:412
static const TGGC & GetBlackGC()
Get black graphics context.
Definition: TGFrame.cxx:717
virtual void MapRaised()
Definition: TGFrame.h:252
UInt_t fHeight
Definition: TGFrame.h:135
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
Int_t fBorderWidth
Definition: TGFrame.h:140
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition: TGFrame.cxx:737
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
Definition: TGFrame.cxx:294
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
Definition: TGFrame.cxx:627
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition: TGFrame.cxx:747
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
UInt_t fWidth
Definition: TGFrame.h:134
virtual Bool_t HandleButton(Event_t *)
Definition: TGFrame.h:208
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
static const TGGC & GetBckgndGC()
Get background color graphics context.
Definition: TGFrame.cxx:757
virtual void UnmapWindow()
Definition: TGFrame.h:253
Definition: TGGC.h:31
GContext_t GetGC() const
Definition: TGGC.h:50
void SetFillStyle(Int_t v)
Set fill style (kFillSolid, kFillTiled, kFillStippled, kFillOpaeueStippled).
Definition: TGGC.cxx:343
void SetForeground(Pixel_t v)
Set foreground color.
Definition: TGGC.cxx:276
void SetStipple(Pixmap_t v)
Set 1 plane pixmap for stippling.
Definition: TGGC.cxx:376
TGClient * fClient
Definition: TGObject.h:37
Handle_t GetId() const
Definition: TGObject.h:47
Handle_t fId
Definition: TGObject.h:36
Cursor_t GetGrabCursor() const
void Hide()
Hide tool tip window.
Definition: TGToolTip.cxx:246
void Reset()
Reset tool tip popup delay timer.
Definition: TGToolTip.cxx:259
Int_t fWidgetId
Definition: TGWidget.h:58
Bool_t HasFocus() const
Definition: TGWidget.h:82
Int_t ClearFlags(Int_t flags)
Definition: TGWidget.h:71
Int_t SetFlags(Int_t flags)
Definition: TGWidget.h:70
const TGWindow * fMsgWindow
Definition: TGWidget.h:60
Bool_t IsEnabled() const
Definition: TGWidget.h:81
Int_t WidgetId() const
Definition: TGWidget.h:80
Bool_t WantFocus() const
Definition: TGWidget.h:83
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition: TGWindow.cxx:221
const TGWindow * fParent
Definition: TGWindow.h:37
void SetActive(Bool_t in)
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event.
const TGWindow * fMsgWindow
static void SetFillStyle(TGGC *gc, Style_t fstyle)
Set fill area style.
TGedPatternFrame(const TGWindow *p, Style_t pattern, Int_t width=40, Int_t height=20)
Pattern select ctor.
virtual void DrawBorder()
Draw border.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event.
static TGGC * fgGC
virtual void DoRedraw()
Redraw selected pattern.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages generated by pattern popup window.
TGedPatternPopup(const TGWindow *p, const TGWindow *m, Style_t pattern)
Pattern popup constructor.
virtual ~TGedPatternPopup()
Destructor of pattern popup window.
virtual void DoRedraw()
Draw selected pattern as current one.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the pattern select widget as a C++ statement(s) on output stream out.
TGedPatternSelect(const TGWindow *p, Style_t pattern, Int_t id)
Create and pop up pattern select window.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process message according to the user input.
virtual void PatternSelected(Style_t pattern=0)
void SetPattern(Style_t pattern, Bool_t emit=kTRUE)
Set pattern.
void SetActive(Int_t newat)
Set selected the current style.
TGedPatternSelector(const TGWindow *p)
Create pattern popup window.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process message generated by pattern popup window.
const TGWindow * fMsgWindow
virtual ~TGedPatternSelector()
Delete pattern popup window.
TGedPatternFrame * fCe[27]
void EndPopup()
Ungrab pointer and unmap popup window.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in popup window.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages generated by popup window.
const TGWindow * fMsgWindow
void PlacePopup(Int_t x, Int_t y, UInt_t w, UInt_t h)
Place popup window at the specified place.
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.
virtual ~TGedSelect()
Destructor of pattern select button.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events in pattern select button.
void DrawTriangle(GContext_t gc, Int_t x, Int_t y)
Draw small triangle.
TGedSelect(const TGWindow *p, Int_t id)
Create pattern select button.
TGedPopup * fPopup
virtual void Enable()
Set widget state flag (kTRUE=enabled, kFALSE=disabled).
virtual void Disable()
Clear widget state flag.
virtual void DoRedraw()
Draw separator and arrow.
virtual void SetPopup(TGedPopup *p)
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
static constexpr double ps
EGEventType fType
Definition: GuiTypes.h:174
Int_t fY
Definition: GuiTypes.h:177
Int_t fX
Definition: GuiTypes.h:177
UInt_t fCode
Definition: GuiTypes.h:179
ULong_t fBackground
Definition: GuiTypes.h:227
Int_t fLineWidth
Definition: GuiTypes.h:228
Mask_t fMask
Definition: GuiTypes.h:250
Int_t fLineStyle
Definition: GuiTypes.h:229
ULong_t fForeground
Definition: GuiTypes.h:226
Int_t fFillStyle
Definition: GuiTypes.h:233
Bool_t fOverrideRedirect
Definition: GuiTypes.h:106
TCanvas * style()
Definition: style.C:1
auto * m
Definition: textangle.C:8