Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGDockableFrame.cxx
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Abdelhalim Ssadik 07/07/04
3
4/*************************************************************************
5 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11/**************************************************************************
12
13 This source is based on Xclass95, a Win95-looking GUI toolkit.
14 Copyright (C) 1996, 1997 David Barth, Ricky Ralston, Hector Peraza.
15
16 Xclass95 is free software; you can redistribute it and/or
17 modify it under the terms of the GNU Library General Public
18 License as published by the Free Software Foundation; either
19 version 2 of the License, or (at your option) any later version.
20
21**************************************************************************/
22
23
24/** \class TGDockableFrame
25 \ingroup guiwidgets
26
27A frame with handles that allow it to be
28undocked (i.e. put in a transient frame of its own) and to be docked
29again or hidden and shown again. It uses the TGDockButton, which is
30a button with two vertical bars (||) and TGDockHideButton, which is
31a button with a small triangle. The TGUndockedFrame is a transient
32frame that on closure will put the frame back in the dock.
33
34*/
35
36
37#include "TColor.h"
38#include "TGFrame.h"
39#include "TGWidget.h"
40#include "TGButton.h"
41#include "TGDockableFrame.h"
42#include "TGWindow.h"
43#include "TList.h"
44#include "TVirtualX.h"
45
46#include <iostream>
47
48
53
54////////////////////////////////////////////////////////////////////////////////
55/// Create a dock button (i.e. button with two vertical bars).
56
58 TGButton (p, id, GetDefaultGC()(), kChildFrame)
59{
63
65
66 Float_t r, g, b, h, l, s;
68 TColor::RGB2HLS(r, g, b, h, l, s);
69 l = l + (1. - l) * 45. / 100.;
70 TColor::HLS2RGB(h, l, s, r, g, b);
72
75}
76
77////////////////////////////////////////////////////////////////////////////////
78/// Delete dock button.
79
81{
82}
83
84////////////////////////////////////////////////////////////////////////////////
85/// Handle dock button crossing events.
86
88{
90 if (event->fType == kLeaveNotify) {
92 } else if (event->fType == kEnterNotify) {
94 }
95 if (IsEnabled())
96 fClient->NeedRedraw(this);
97
98 return kTRUE;
99}
100
101////////////////////////////////////////////////////////////////////////////////
102/// Draw borders of dock button.
103
105{
106 int options = GetOptions();
107
109 ;
110 else if (fMouseOn == kTRUE && IsEnabled()) {
113 } else {
116 }
117 gVirtualX->ClearWindow(fId);
119
120 ChangeOptions(options);
121}
122
123////////////////////////////////////////////////////////////////////////////////
124/// Draw the dock button, i.e. two vertical lines.
125
127{
128 int x = 1, y = 0;
129
130 DrawBorder();
131 if (fState == kButtonDown || fState == kButtonEngaged) { ++x; ++y; }
132
133 for (int i = 0; i < 5; i +=4) {
134 gVirtualX->DrawLine(fId, GetHilightGC()(), i+x, y+1, i+x, fHeight-y-3);
135 gVirtualX->DrawLine(fId, GetShadowGC()(), i+x+1, y+1, i+x+1, fHeight-y-3);
136 }
137}
138
139
140////////////////////////////////////////////////////////////////////////////////
141/// Create a dock hide button (i.e. button with small triangle).
142
144 TGDockButton (p, 2)
145{
146 Resize(10, 8);
147 fAspectRatio = 0;
149}
150
151////////////////////////////////////////////////////////////////////////////////
152/// Draw dock hide button.
153
155{
156 int x = 1, y = 0;
157
158 DrawBorder();
159 if (fState == kButtonDown || fState == kButtonEngaged) { ++x; ++y; }
160
161 if (fAspectRatio) {
162 gVirtualX->DrawLine(fId, GetBlackGC()(), x+1, y+1, x+5, y+3);
163 gVirtualX->DrawLine(fId, GetBlackGC()(), x+1, y+5, x+5, y+3);
164 gVirtualX->DrawLine(fId, GetHilightGC()(), x, y+1, x, y+5);
165 } else {
166 gVirtualX->DrawLine(fId, GetHilightGC()(), x+5, y+1, x+1, y+3);
167 gVirtualX->DrawLine(fId, GetHilightGC()(), x+5, y+5, x+1, y+3);
168 gVirtualX->DrawLine(fId, GetBlackGC()(), x+6, y+1, x+6, y+5);
169 }
170}
171
172
173////////////////////////////////////////////////////////////////////////////////
174/// Create the undocked (transient) frame.
175
177 TGTransientFrame(p, dockable ? dockable->GetMainFrame() : 0, 10, 10)
178{
179 SetWindowName("");
180 fDockable = dockable;
181
188}
189
190////////////////////////////////////////////////////////////////////////////////
191/// Delete undocked frame. Puts back dockable frame in its original container.
192
194{
195 if (fDockable && !fDockable->fDeleted) {
197 }
198}
199
200////////////////////////////////////////////////////////////////////////////////
201/// Fix the size of the undocked frame so it cannot be changed via the WM.
202
204{
208}
209
210////////////////////////////////////////////////////////////////////////////////
211/// Close undocked frame (called via WM close button).
212
214{
215 DeleteWindow();
216}
217
218
219////////////////////////////////////////////////////////////////////////////////
220/// Create a dockable frame widget.
221
224{
226
229 fLb = new TGLayoutHints(kLHintsExpandY | kLHintsLeft, 0, 2, 0, 0);
231
232 fButtons = new TGCompositeFrame(this, 10, 10, kVerticalFrame);
238
240
241 fContainer = new TGCompositeFrame(this, 10, 10);
242
244
247 fHidden = kFALSE;
248 fFrame = 0;
251
252 fDockButton->Associate(this);
253 fHideButton->Associate(this);
254
258}
259
260////////////////////////////////////////////////////////////////////////////////
261/// Cleanup dockable frame.
262
264{
265 // Just set the flag and delete fFrame. The other components
266 // are deleted in TGCompositeFrame destructor.
267 if (fFrame) {
268 fDeleted = kTRUE;
269 delete fFrame;
270 }
271}
272
273////////////////////////////////////////////////////////////////////////////////
274/// Add frame to dockable frame container. Frame and hints are NOT adopted.
275
277{
279 fContainer->AddFrame(f, fHints = hints);
281}
282
283////////////////////////////////////////////////////////////////////////////////
284/// Undock container.
285
287{
288 int ax, ay;
289 Window_t wdummy;
290
291 if (fFrame || !fEnableUndock) return;
292
295
300
301 gVirtualX->TranslateCoordinates(GetId(), fClient->GetDefaultRoot()->GetId(), fX,
302 fY + fFrame->GetHeight(), ax, ay, wdummy);
303
305
308 if (fFixedSize)
309 fFrame->FixSize();
310 fFrame->MapWindow();
311 fFrame->Move(ax, ay);
312
313 if (((TGFrame *)fParent)->IsComposite()) // paranoia check
314 ((TGCompositeFrame *)fParent)->HideFrame(this);
315
316 Layout();
317
319 Undocked();
320}
321
322////////////////////////////////////////////////////////////////////////////////
323/// Dock container back to TGDockableFrame.
324
326{
327 if (!fFrame) return;
328 if (del) {
329 delete fFrame; // this will call DockContainer again with del = kFALSE
330 return;
331 }
332
336
337 // kludge! (for special case)
339
340 Layout();
341 if (((TGFrame *)fParent)->IsComposite()) // paranoia check
342 ((TGCompositeFrame *)fParent)->ShowFrame(this);
343
344 // fFrame is just being deleted (we're here called by TGUndockedFrame's
345 // destructor) so just set it NULL below to avoid eventual problems in
346 // TGDockableFrame's destructor.
347
348 fFrame = 0;
349
351 Docked();
352}
353
354////////////////////////////////////////////////////////////////////////////////
355/// Show dock container.
356
358{
359 if (!fHidden) return;
360
364 if (((TGFrame *)fParent)->IsComposite()) // paranoia check
365 ((TGCompositeFrame *)fParent)->Layout();
366 fHidden = kFALSE;
367
369}
370
371////////////////////////////////////////////////////////////////////////////////
372/// Hide dock container.
373
375{
376 if (fHidden || !fEnableHide) return;
377
381 if (((TGFrame *)fParent)->IsComposite()) // paranoia check
382 ((TGCompositeFrame *)fParent)->Layout();
383 fHidden = kTRUE;
384
386}
387
388////////////////////////////////////////////////////////////////////////////////
389/// Process dockable frame messages.
390
392{
393 switch (GET_MSG(msg)) {
394 case kC_COMMAND:
395 switch (GET_SUBMSG(msg)) {
396 case kCM_BUTTON:
397 switch (parm1) {
398 case 1:
399 if (!fHidden) UndockContainer();
400 break;
401 case 2:
402 if (!fHidden)
404 else
406 break;
407 }
408 break;
409 }
410 break;
411 }
412
413 return kTRUE;
414}
415
416////////////////////////////////////////////////////////////////////////////////
417/// Enable undocking.
418
420{
421 fEnableUndock = onoff;
422 if (onoff)
424 else
426 Layout();
427}
428
429////////////////////////////////////////////////////////////////////////////////
430/// Enable hiding.
431
433{
434 fEnableHide = onoff;
435 if (onoff)
437 else
439 Layout();
440}
441
442////////////////////////////////////////////////////////////////////////////////
443/// Set window name so it appear as title of the undock window.
444
446{
447 fDockName = "";
448 if (name) {
449 fDockName = name;
451 }
452}
453
454////////////////////////////////////////////////////////////////////////////////
455/// Save a dockable frame widget as a C++ statement(s) on output stream out.
456
457void TGDockableFrame::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
458{
459 char quote = '"';
460
461 out << std::endl << " // dockable frame" << std::endl;
462 out << " TGDockableFrame *";
463 out << GetName()<<" = new TGDockableFrame(" << fParent->GetName();
464
465 if (GetOptions() == kHorizontalFrame) {
466 if (fWidgetId == -1) {
467 out << ");" << std::endl;
468 } else {
469 out << "," << fWidgetId << ");" << std::endl;
470 }
471 } else {
472 out << "," << fWidgetId << "," << GetOptionString() << ");" << std::endl;
473 }
474 if (option && strstr(option, "keep_names"))
475 out << " " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
476
477 if (GetContainer()->GetList()->First()) {
478 out << " TGCompositeFrame *" << GetContainer()->GetName() << " = "
479 << GetName() << "->GetContainer();" << std::endl;
480
481 TGFrameElement *el;
482 TIter next(GetContainer()->GetList());
483
484 while ((el = (TGFrameElement *) next())) {
485 el->fFrame->SavePrimitive(out, option);
486 out << " " << GetName() << "->AddFrame(" << el->fFrame->GetName();
487 el->fLayout->SavePrimitive(out, option);
488 out << ");"<< std::endl;
489 }
490 }
491 out << std::endl << " // next lines belong to the dockable frame widget" << std::endl;
492 if (EnableUndock())
493 out << " " << GetName() << "->EnableUndock(kTRUE);" << std::endl;
494 else
495 out << " " << GetName() << "->EnableUndock(kFALSE);" << std::endl;
496
497 if (EnableHide())
498 out << " " << GetName() << "->EnableHide(kTRUE);" << std::endl;
499 else
500 out << " " << GetName() << "->EnableHide(kFALSE);" << std::endl;
501
502 if (fDockName != "")
503 out << " " << GetName() << "->SetWindowName(" << quote << fDockName
504 << quote << ");" << std::endl;
505
506 if (IsUndocked())
507 out << " " << GetName() << "->UndockContainer();" << std::endl;
508 else
509 out << " " << GetName() << "->DockContainer();" << std::endl;
510
511 if (IsHidden())
512 out << " " << GetName() << "->HideContainer();" << std::endl;
513
514 out << std::endl;
515}
@ kEnterNotify
Definition GuiTypes.h:61
@ kLeaveNotify
Definition GuiTypes.h:61
Handle_t Window_t
Window handle.
Definition GuiTypes.h:29
@ kChildFrame
Definition GuiTypes.h:379
@ kVerticalFrame
Definition GuiTypes.h:381
@ kHorizontalFrame
Definition GuiTypes.h:382
@ kFixedSize
Definition GuiTypes.h:390
const Mask_t kLeaveWindowMask
Definition GuiTypes.h:168
const Mask_t kEnterWindowMask
Definition GuiTypes.h:167
#define b(i)
Definition RSha256.hxx:100
#define f(i)
Definition RSha256.hxx:104
#define g(i)
Definition RSha256.hxx:105
#define h(i)
Definition RSha256.hxx:106
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
long Longptr_t
Definition RtypesCore.h:75
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:382
@ kButtonDown
Definition TGButton.h:54
@ kButtonEngaged
Definition TGButton.h:55
@ kMWMDecorResizeH
Definition TGFrame.h:65
@ kMWMFuncAll
Definition TGFrame.h:49
@ kMWMFuncResize
Definition TGFrame.h:50
@ kMWMDecorMaximize
Definition TGFrame.h:69
@ kMWMDecorMinimize
Definition TGFrame.h:68
@ kMWMDecorMenu
Definition TGFrame.h:67
@ kMWMDecorAll
Definition TGFrame.h:63
@ kMWMFuncMaximize
Definition TGFrame.h:53
@ kMWMInputModeless
Definition TGFrame.h:57
@ kMWMFuncMinimize
Definition TGFrame.h:52
@ kLHintsExpandY
Definition TGLayout.h:31
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsTop
Definition TGLayout.h:27
@ kLHintsExpandX
Definition TGLayout.h:30
@ kWidgetIsEnabled
Definition TGWidget.h:37
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t del
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetMWMHints
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t SetWMSizeHints
char name[80]
Definition TGX11.cxx:110
#define gVirtualX
Definition TVirtualX.h:337
Int_t MK_MSG(EWidgetMessageTypes msg, EWidgetMessageTypes submsg)
Int_t GET_MSG(Long_t val)
@ kDOCK_UNDOCK
@ kDOCK_DOCK
@ kC_COMMAND
@ kDOCK_SHOW
@ kCM_BUTTON
@ kDOCK_HIDE
@ kC_DOCK
Int_t GET_SUBMSG(Long_t val)
static void HLS2RGB(Float_t h, Float_t l, Float_t s, Float_t &r, Float_t &g, Float_t &b)
Static method to compute RGB from HLS.
Definition TColor.cxx:1576
static ULong_t RGB2Pixel(Int_t r, Int_t g, Int_t b)
Convert r,g,b to graphics system dependent pixel value.
Definition TColor.cxx:2475
static void Pixel2RGB(ULong_t pixel, Int_t &r, Int_t &g, Int_t &b)
Convert machine dependent pixel value (obtained via RGB2Pixel or via Number2Pixel() or via TColor::Ge...
Definition TColor.cxx:2513
static void RGB2HLS(Float_t r, Float_t g, Float_t b, Float_t &h, Float_t &l, Float_t &s)
Static method to compute HLS from RGB.
Definition TColor.cxx:1716
A button abstract base class.
Definition TGButton.h:68
EButtonState fState
button state
Definition TGButton.h:75
Bool_t HandleCrossing(Event_t *event) override
Handle mouse crossing event.
Definition TGButton.cxx:404
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Definition TGClient.cxx:234
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Definition TGClient.cxx:381
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
TGDimension GetDefaultSize() const override
std::cout << fWidth << "x" << fHeight << std::endl;
Definition TGFrame.h:316
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1117
virtual TList * GetList() const
Definition TGFrame.h:310
Bool_t IsComposite() const override
Definition TGFrame.h:353
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
Definition TGFrame.cxx:1164
void Layout() override
Layout the elements of the composite frame.
Definition TGFrame.cxx:1257
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Definition TGFrame.cxx:1204
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
Definition TGFrame.cxx:1072
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition TGFrame.cxx:1149
void SetEditDisabled(UInt_t on=1) override
Set edit disable flag for this frame and subframes.
Definition TGFrame.cxx:1022
void ChangeOptions(UInt_t options) override
Change composite frame options. Options is an OR of the EFrameTypes.
Definition TGFrame.cxx:1043
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition TGFrame.cxx:1190
~TGDockButton() override
Delete dock button.
ULong_t fNormBg
normal background color
Bool_t HandleCrossing(Event_t *event) override
Handle dock button crossing events.
ULong_t fHiBg
highlighted background color
Bool_t fMouseOn
true when mouse on button
void DoRedraw() override
Draw the dock button, i.e. two vertical lines.
void DrawBorder() override
Draw borders of dock button.
TGDockButton(const TGCompositeFrame *p=nullptr, Int_t id=1)
Create a dock button (i.e. button with two vertical bars).
void DoRedraw() override
Draw dock hide button.
TGDockHideButton(const TGCompositeFrame *p=nullptr)
Create a dock hide button (i.e. button with small triangle).
void SetAspectRatio(Int_t a)
Int_t fAspectRatio
triangle orientation
A frame with handles that allow it to be undocked (i.e.
void DockContainer(Int_t del=kTRUE)
Dock container back to TGDockableFrame.
Bool_t fEnableUndock
if frame can be undocked
friend class TGUndockedFrame
TGCompositeFrame * fButtons
container containing dock and hide buttons
TGUndockedFrame * fFrame
undocked frame
Bool_t ProcessMessage(Longptr_t, Longptr_t, Longptr_t) override
Process dockable frame messages.
TGLayoutHints * fLb
Bool_t IsHidden() const
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a dockable frame widget as a C++ statement(s) on output stream out.
TGCompositeFrame * GetContainer() const
void AddFrame(TGFrame *f, TGLayoutHints *hints) override
Add frame to dockable frame container. Frame and hints are NOT adopted.
TGCompositeFrame * fContainer
container containing dockable frame
Bool_t fHidden
if frame is hidden
TGDockableFrame(const TGDockableFrame &)=delete
void UndockContainer()
Undock container.
Bool_t fDeleted
kTRUE if it is being deleted
virtual void Undocked()
void HideContainer()
Hide dock container.
void SetWindowName(const char *name) override
Set window name so it appear as title of the undock window.
Bool_t EnableUndock() const
Bool_t fFixedSize
kTRUE if fixed size when undocked
TGLayoutHints * fHints
layout hints
Bool_t fEnableHide
if frame can be hidden
Bool_t EnableHide() const
TGDockButton * fDockButton
dock button
void ShowContainer()
Show dock container.
TGDockHideButton * fHideButton
hide button
virtual void Docked()
TString fDockName
name of frame
~TGDockableFrame() override
Cleanup dockable frame.
TGLayoutHints * fLc
layout hints
Bool_t IsUndocked() const
TGLayoutHints * fLayout
Definition TGLayout.h:114
TGFrame * fFrame
Definition TGLayout.h:112
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition TGFrame.h:80
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
Definition TGFrame.cxx:321
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition TGFrame.cxx:339
static const TGGC & GetBlackGC()
Get black graphics context.
Definition TGFrame.cxx:735
Int_t fX
frame x position
Definition TGFrame.h:85
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:605
UInt_t fHeight
frame height
Definition TGFrame.h:88
virtual UInt_t GetDefaultWidth() const
Definition TGFrame.h:190
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:191
void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0) override
Reparent window, make p the new parent and position the window at position (x,y) in new parent.
Definition TGFrame.h:202
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3230
virtual void DrawBorder()
Draw frame border.
Definition TGFrame.cxx:421
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
Definition TGFrame.cxx:312
TGDimension GetSize() const
Definition TGFrame.h:230
void MapWindow() override
map window
Definition TGFrame.h:204
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition TGFrame.cxx:755
void Move(Int_t x, Int_t y) override
Move frame.
Definition TGFrame.cxx:593
virtual void DeleteWindow()
Delete window.
Definition TGFrame.cxx:276
virtual UInt_t GetOptions() const
Definition TGFrame.h:197
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
Definition TGFrame.cxx:2506
Int_t fY
frame y position
Definition TGFrame.h:86
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
Definition TGFrame.cxx:645
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition TGFrame.cxx:765
UInt_t fWidth
frame width
Definition TGFrame.h:87
UInt_t GetHeight() const
Definition TGFrame.h:225
Pixel_t fBackground
frame background color
Definition TGFrame.h:95
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save layout hints as a C++ statement(s) on output stream out.
Definition TGLayout.cxx:975
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
Definition TGFrame.cxx:1893
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
Definition TGFrame.cxx:1788
TGClient * fClient
Connection to display server.
Definition TGObject.h:25
Handle_t GetId() const
Definition TGObject.h:41
Handle_t fId
X11/Win32 Window identifier.
Definition TGObject.h:24
Defines transient windows that typically are used for dialogs windows.
Definition TGFrame.h:498
void FixSize()
Fix the size of the undocked frame so it cannot be changed via the WM.
~TGUndockedFrame() override
Delete undocked frame. Puts back dockable frame in its original container.
TGDockableFrame * fDockable
orignal dockable frame
TGUndockedFrame(const TGUndockedFrame &)=delete
void CloseWindow() override
Close undocked frame (called via WM close button).
The widget base class.
Definition TGWidget.h:43
Int_t fWidgetId
the widget id (used for event processing)
Definition TGWidget.h:46
virtual void Associate(const TGWindow *w)
Definition TGWidget.h:72
Int_t fWidgetFlags
widget status flags (OR of EWidgetStatus)
Definition TGWidget.h:47
const TGWindow * fMsgWindow
window which handles widget events
Definition TGWidget.h:48
Bool_t IsEnabled() const
Definition TGWidget.h:69
ROOT GUI Window base class.
Definition TGWindow.h:23
const TGWindow * fParent
Parent window.
Definition TGWindow.h:28
virtual void SetWindowName(const char *name=nullptr)
Set window name.
Definition TGWindow.cxx:129
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
Definition TGWindow.cxx:336
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
Event structure.
Definition GuiTypes.h:174
EGEventType fType
of event (see EGEventType)
Definition GuiTypes.h:175
TLine l
Definition textangle.C:4