Logo ROOT  
Reference Guide
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 // //
25 // A TGDockableFrame is a frame with handles that allow it to be //
26 // undocked (i.e. put in a transient frame of its own) and to be docked //
27 // again or hidden and shown again. It uses the TGDockButton, which is //
28 // a button with two vertical bars (||) and TGDockHideButton, which is //
29 // a button with a small triangle. The TGUndockedFrame is a transient //
30 // frame that on closure will put the frame back in the dock. //
31 // //
32 //////////////////////////////////////////////////////////////////////////
33 
34 #include "TColor.h"
35 #include "TGFrame.h"
36 #include "TGWidget.h"
37 #include "TGButton.h"
38 #include "TGDockableFrame.h"
39 #include "TGWindow.h"
40 #include "TList.h"
41 #include "TVirtualX.h"
42 
43 #include <iostream>
44 
45 
50 
51 ////////////////////////////////////////////////////////////////////////////////
52 /// Create a dock button (i.e. button with two vertical bars).
53 
55  TGButton (p, id, GetDefaultGC()(), kChildFrame)
56 {
58  fMouseOn = kFALSE;
59  Resize(10, GetDefaultHeight());
60 
62 
63  Float_t r, g, b, h, l, s;
65  TColor::RGB2HLS(r, g, b, h, l, s);
66  l = l + (1. - l) * 45. / 100.;
67  TColor::HLS2RGB(h, l, s, r, g, b);
69 
71  SetWindowName();
72 }
73 
74 ////////////////////////////////////////////////////////////////////////////////
75 /// Delete dock button.
76 
78 {
79 }
80 
81 ////////////////////////////////////////////////////////////////////////////////
82 /// Handle dock button crossing events.
83 
85 {
87  if (event->fType == kLeaveNotify) {
88  fMouseOn = kFALSE;
89  } else if (event->fType == kEnterNotify) {
90  fMouseOn = kTRUE;
91  }
92  if (IsEnabled())
93  fClient->NeedRedraw(this);
94 
95  return kTRUE;
96 }
97 
98 ////////////////////////////////////////////////////////////////////////////////
99 /// Draw borders of dock button.
100 
102 {
103  int options = GetOptions();
104 
106  ;
107  else if (fMouseOn == kTRUE && IsEnabled()) {
110  } else {
113  }
114  gVirtualX->ClearWindow(fId);
116 
117  ChangeOptions(options);
118 }
119 
120 ////////////////////////////////////////////////////////////////////////////////
121 /// Draw the dock button, i.e. two vertical lines.
122 
124 {
125  int x = 1, y = 0;
126 
127  DrawBorder();
128  if (fState == kButtonDown || fState == kButtonEngaged) { ++x; ++y; }
129 
130  for (int i = 0; i < 5; i +=4) {
131  gVirtualX->DrawLine(fId, GetHilightGC()(), i+x, y+1, i+x, fHeight-y-3);
132  gVirtualX->DrawLine(fId, GetShadowGC()(), i+x+1, y+1, i+x+1, fHeight-y-3);
133  }
134 }
135 
136 
137 ////////////////////////////////////////////////////////////////////////////////
138 /// Create a dock hide button (i.e. button with small triangle).
139 
141  TGDockButton (p, 2)
142 {
143  Resize(10, 8);
144  fAspectRatio = 0;
145  SetWindowName();
146 }
147 
148 ////////////////////////////////////////////////////////////////////////////////
149 /// Draw dock hide button.
150 
152 {
153  int x = 1, y = 0;
154 
155  DrawBorder();
156  if (fState == kButtonDown || fState == kButtonEngaged) { ++x; ++y; }
157 
158  if (fAspectRatio) {
159  gVirtualX->DrawLine(fId, GetBlackGC()(), x+1, y+1, x+5, y+3);
160  gVirtualX->DrawLine(fId, GetBlackGC()(), x+1, y+5, x+5, y+3);
161  gVirtualX->DrawLine(fId, GetHilightGC()(), x, y+1, x, y+5);
162  } else {
163  gVirtualX->DrawLine(fId, GetHilightGC()(), x+5, y+1, x+1, y+3);
164  gVirtualX->DrawLine(fId, GetHilightGC()(), x+5, y+5, x+1, y+3);
165  gVirtualX->DrawLine(fId, GetBlackGC()(), x+6, y+1, x+6, y+5);
166  }
167 }
168 
169 
170 ////////////////////////////////////////////////////////////////////////////////
171 /// Create the undocked (transient) frame.
172 
174  TGTransientFrame(p, dockable ? dockable->GetMainFrame() : 0, 10, 10)
175 {
176  SetWindowName("");
177  fDockable = dockable;
178 
184  SetWindowName();
185 }
186 
187 ////////////////////////////////////////////////////////////////////////////////
188 /// Delete undocked frame. Puts back dockable frame in its original container.
189 
191 {
192  if (fDockable && !fDockable->fDeleted) {
194  }
195 }
196 
197 ////////////////////////////////////////////////////////////////////////////////
198 /// Fix the size of the undocked frame so it cannot be changed via the WM.
199 
201 {
205 }
206 
207 ////////////////////////////////////////////////////////////////////////////////
208 /// Close undocked frame (called via WM close button).
209 
211 {
212  DeleteWindow();
213 }
214 
215 
216 ////////////////////////////////////////////////////////////////////////////////
217 /// Create a dockable frame widget.
218 
219 TGDockableFrame::TGDockableFrame(const TGWindow *p, int id, UInt_t /*options*/)
221 {
223 
226  fLb = new TGLayoutHints(kLHintsExpandY | kLHintsLeft, 0, 2, 0, 0);
228 
229  fButtons = new TGCompositeFrame(this, 10, 10, kVerticalFrame);
230  fButtons->SetCleanup();
235 
237 
238  fContainer = new TGCompositeFrame(this, 10, 10);
239 
241 
242  fEnableHide = kTRUE;
244  fHidden = kFALSE;
245  fFrame = 0;
246  fDeleted = kFALSE;
247  fFixedSize = kTRUE;
248 
249  fDockButton->Associate(this);
250  fHideButton->Associate(this);
251 
252  MapSubwindows();
255 }
256 
257 ////////////////////////////////////////////////////////////////////////////////
258 /// Cleanup dockable frame.
259 
261 {
262  // Just set the flag and delete fFrame. The other components
263  // are deleted in TGCompositeFrame destructor.
264  if (fFrame) {
265  fDeleted = kTRUE;
266  delete fFrame;
267  }
268 }
269 
270 ////////////////////////////////////////////////////////////////////////////////
271 /// Add frame to dockable frame container. Frame and hints are NOT adopted.
272 
274 {
275  f->ReparentWindow(fContainer);
276  fContainer->AddFrame(f, fHints = hints);
277  fContainer->Layout();
278 }
279 
280 ////////////////////////////////////////////////////////////////////////////////
281 /// Undock container.
282 
284 {
285  int ax, ay;
286  Window_t wdummy;
287 
288  if (fFrame || !fEnableUndock) return;
289 
292 
293  TGDimension size = fContainer->GetSize();
297 
298  gVirtualX->TranslateCoordinates(GetId(), fClient->GetDefaultRoot()->GetId(), fX,
299  fY + fFrame->GetHeight(), ax, ay, wdummy);
300 
302 
304  fFrame->Resize(size);
305  if (fFixedSize)
306  fFrame->FixSize();
307  fFrame->MapWindow();
308  fFrame->Move(ax, ay);
309 
310  if (((TGFrame *)fParent)->IsComposite()) // paranoia check
311  ((TGCompositeFrame *)fParent)->HideFrame(this);
312 
313  Layout();
314 
316  Undocked();
317 }
318 
319 ////////////////////////////////////////////////////////////////////////////////
320 /// Dock container back to TGDockableFrame.
321 
323 {
324  if (!fFrame) return;
325  if (del) {
326  delete fFrame; // this will call DockContainer again with del = kFALSE
327  return;
328  }
329 
331  fContainer->ReparentWindow(this);
333 
334  // kludge! (for special case)
336 
337  Layout();
338  if (((TGFrame *)fParent)->IsComposite()) // paranoia check
339  ((TGCompositeFrame *)fParent)->ShowFrame(this);
340 
341  // fFrame is just being deleted (we're here called by TGUndockedFrame's
342  // destructor) so just set it NULL below to avoid eventual problems in
343  // TGDockableFrame's destructor.
344 
345  fFrame = 0;
346 
348  Docked();
349 }
350 
351 ////////////////////////////////////////////////////////////////////////////////
352 /// Show dock container.
353 
355 {
356  if (!fHidden) return;
357 
361  if (((TGFrame *)fParent)->IsComposite()) // paranoia check
362  ((TGCompositeFrame *)fParent)->Layout();
363  fHidden = kFALSE;
364 
366 }
367 
368 ////////////////////////////////////////////////////////////////////////////////
369 /// Hide dock container.
370 
372 {
373  if (fHidden || !fEnableHide) return;
374 
378  if (((TGFrame *)fParent)->IsComposite()) // paranoia check
379  ((TGCompositeFrame *)fParent)->Layout();
380  fHidden = kTRUE;
381 
383 }
384 
385 ////////////////////////////////////////////////////////////////////////////////
386 /// Process dockable frame messages.
387 
389 {
390  switch (GET_MSG(msg)) {
391  case kC_COMMAND:
392  switch (GET_SUBMSG(msg)) {
393  case kCM_BUTTON:
394  switch (parm1) {
395  case 1:
396  if (!fHidden) UndockContainer();
397  break;
398  case 2:
399  if (!fHidden)
400  HideContainer();
401  else
402  ShowContainer();
403  break;
404  }
405  break;
406  }
407  break;
408  }
409 
410  return kTRUE;
411 }
412 
413 ////////////////////////////////////////////////////////////////////////////////
414 /// Enable undocking.
415 
417 {
418  fEnableUndock = onoff;
419  if (onoff)
421  else
423  Layout();
424 }
425 
426 ////////////////////////////////////////////////////////////////////////////////
427 /// Enable hiding.
428 
430 {
431  fEnableHide = onoff;
432  if (onoff)
434  else
436  Layout();
437 }
438 
439 ////////////////////////////////////////////////////////////////////////////////
440 /// Set window name so it appear as title of the undock window.
441 
443 {
444  fDockName = "";
445  if (name) {
446  fDockName = name;
448  }
449 }
450 
451 ////////////////////////////////////////////////////////////////////////////////
452 /// Save a dockable frame widget as a C++ statement(s) on output stream out.
453 
454 void TGDockableFrame::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
455 {
456  char quote = '"';
457 
458  out << std::endl << " // dockable frame" << std::endl;
459  out << " TGDockableFrame *";
460  out << GetName()<<" = new TGDockableFrame(" << fParent->GetName();
461 
462  if (GetOptions() == kHorizontalFrame) {
463  if (fWidgetId == -1) {
464  out << ");" << std::endl;
465  } else {
466  out << "," << fWidgetId << ");" << std::endl;
467  }
468  } else {
469  out << "," << fWidgetId << "," << GetOptionString() << ");" << std::endl;
470  }
471  if (option && strstr(option, "keep_names"))
472  out << " " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
473 
474  if (GetContainer()->GetList()->First()) {
475  out << " TGCompositeFrame *" << GetContainer()->GetName() << " = "
476  << GetName() << "->GetContainer();" << std::endl;
477 
478  TGFrameElement *el;
479  TIter next(GetContainer()->GetList());
480 
481  while ((el = (TGFrameElement *) next())) {
482  el->fFrame->SavePrimitive(out, option);
483  out << " " << GetName() << "->AddFrame(" << el->fFrame->GetName();
484  el->fLayout->SavePrimitive(out, option);
485  out << ");"<< std::endl;
486  }
487  }
488  out << std::endl << " // next lines belong to the dockable frame widget" << std::endl;
489  if (EnableUndock())
490  out << " " << GetName() << "->EnableUndock(kTRUE);" << std::endl;
491  else
492  out << " " << GetName() << "->EnableUndock(kFALSE);" << std::endl;
493 
494  if (EnableHide())
495  out << " " << GetName() << "->EnableHide(kTRUE);" << std::endl;
496  else
497  out << " " << GetName() << "->EnableHide(kFALSE);" << std::endl;
498 
499  if (fDockName != "")
500  out << " " << GetName() << "->SetWindowName(" << quote << fDockName
501  << quote << ");" << std::endl;
502 
503  if (IsUndocked())
504  out << " " << GetName() << "->UndockContainer();" << std::endl;
505  else
506  out << " " << GetName() << "->DockContainer();" << std::endl;
507 
508  if (IsHidden())
509  out << " " << GetName() << "->HideContainer();" << std::endl;
510 
511  out << std::endl;
512 }
TGWindow::SetWindowName
virtual void SetWindowName(const char *name=0)
Set window name.
Definition: TGWindow.cxx:118
TGCompositeFrame::GetDefaultSize
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:353
l
auto * l
Definition: textangle.C:4
Event_t::fType
EGEventType fType
Definition: GuiTypes.h:174
TGClient::GetDefaultRoot
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Definition: TGClient.cxx:235
TGTransientFrame
Definition: TGFrame.h:553
GET_MSG
Int_t GET_MSG(Long_t val)
Definition: WidgetMessageTypes.h:112
TGFrame::fY
Int_t fY
Definition: TGFrame.h:111
TGFrame::GetHeight
UInt_t GetHeight() const
Definition: TGFrame.h:250
TGDockableFrame::~TGDockableFrame
virtual ~TGDockableFrame()
Cleanup dockable frame.
Definition: TGDockableFrame.cxx:260
TGFrameElement::fLayout
TGLayoutHints * fLayout
Definition: TGLayout.h:121
TGWindow
Definition: TGWindow.h:31
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TGCompositeFrame::GetList
virtual TList * GetList() const
Definition: TGFrame.h:347
TGDockButton::~TGDockButton
virtual ~TGDockButton()
Delete dock button.
Definition: TGDockableFrame.cxx:77
TGDockableFrame::UndockContainer
void UndockContainer()
Undock container.
Definition: TGDockableFrame.cxx:283
TGDockableFrame::fLb
TGLayoutHints * fLb
Definition: TGDockableFrame.h:113
TGFrame::ChangeOptions
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:306
f
#define f(i)
Definition: RSha256.hxx:122
TGDockableFrame::fDeleted
Bool_t fDeleted
Definition: TGDockableFrame.h:104
TGDimension
Definition: TGDimension.h:27
TGFrame::SetBackgroundColor
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
Definition: TGFrame.cxx:297
kLeaveNotify
@ kLeaveNotify
Definition: GuiTypes.h:60
gVirtualX
#define gVirtualX
Definition: TVirtualX.h:338
TGCompositeFrame::TGCompositeFrame
TGCompositeFrame(const TGCompositeFrame &)
kButtonDown
@ kButtonDown
Definition: TGButton.h:60
TGDockHideButton::SetAspectRatio
void SetAspectRatio(Int_t a)
Definition: TGDockableFrame.h:67
TGDockButton::DrawBorder
virtual void DrawBorder()
Draw borders of dock button.
Definition: TGDockableFrame.cxx:101
kLHintsTop
@ kLHintsTop
Definition: TGLayout.h:40
TGDockableFrame::SetWindowName
void SetWindowName(const char *name)
Set window name so it appear as title of the undock window.
Definition: TGDockableFrame.cxx:442
TGFrame::GetSize
TGDimension GetSize() const
Definition: TGFrame.h:255
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TGFrame::fWidth
UInt_t fWidth
Definition: TGFrame.h:112
TGUndockedFrame::~TGUndockedFrame
virtual ~TGUndockedFrame()
Delete undocked frame. Puts back dockable frame in its original container.
Definition: TGDockableFrame.cxx:190
kVerticalFrame
@ kVerticalFrame
Definition: GuiTypes.h:381
kDOCK_HIDE
@ kDOCK_HIDE
Definition: WidgetMessageTypes.h:98
kDOCK_DOCK
@ kDOCK_DOCK
Definition: WidgetMessageTypes.h:95
r
ROOT::R::TRInterface & r
Definition: Object.C:4
kLHintsLeft
@ kLHintsLeft
Definition: TGLayout.h:37
TGDockButton::fHiBg
ULong_t fHiBg
Definition: TGDockableFrame.h:43
TGDockableFrame::fFrame
TGUndockedFrame * fFrame
Definition: TGDockableFrame.h:111
TGDockHideButton
Definition: TGDockableFrame.h:58
TGFrame::GetDefaultHeight
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:216
TGDockableFrame::TGUndockedFrame
friend class TGUndockedFrame
Definition: TGDockableFrame.h:94
TGFrame::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
Definition: TGFrame.cxx:3192
TGMainFrame::SetWMSizeHints
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
Definition: TGFrame.cxx:1865
TGDockableFrame::fDockName
TString fDockName
Definition: TGDockableFrame.h:106
Float_t
float Float_t
Definition: RtypesCore.h:57
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:168
TGDockableFrame::Docked
virtual void Docked()
Definition: TGDockableFrame.h:123
TGWidget
Definition: TGWidget.h:55
TGDockableFrame::fButtons
TGCompositeFrame * fButtons
Definition: TGDockableFrame.h:108
TGDockableFrame::fHints
TGLayoutHints * fHints
Definition: TGDockableFrame.h:112
kDOCK_UNDOCK
@ kDOCK_UNDOCK
Definition: WidgetMessageTypes.h:96
TGCompositeFrame::SetEditDisabled
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
Definition: TGFrame.cxx:1007
kEnterNotify
@ kEnterNotify
Definition: GuiTypes.h:60
x
Double_t x[n]
Definition: legend1.C:17
TGCompositeFrame::IsComposite
Bool_t IsComposite() const
Definition: TGFrame.h:390
TGDockableFrame.h
TGDockableFrame::fEnableHide
Bool_t fEnableHide
Definition: TGDockableFrame.h:102
TList.h
TGMainFrame::SetWindowName
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1749
TColor.h
TVirtualX.h
TGDockButton::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle dock button crossing events.
Definition: TGDockableFrame.cxx:84
TGDockableFrame::IsHidden
Bool_t IsHidden() const
Definition: TGDockableFrame.h:140
TGDockHideButton::DoRedraw
virtual void DoRedraw()
Draw dock hide button.
Definition: TGDockableFrame.cxx:151
TGDockableFrame::fFixedSize
Bool_t fFixedSize
Definition: TGDockableFrame.h:105
TGFrame::GetBlackGC
static const TGGC & GetBlackGC()
Get black graphics context.
Definition: TGFrame.cxx:720
TGFrame::DrawBorder
virtual void DrawBorder()
Draw frame border.
Definition: TGFrame.cxx:406
TGFrame
Definition: TGFrame.h:105
TGObject::GetId
Handle_t GetId() const
Definition: TGObject.h:47
kMWMFuncMinimize
@ kMWMFuncMinimize
Definition: TGFrame.h:61
TGDockableFrame::Undocked
virtual void Undocked()
Definition: TGDockableFrame.h:124
b
#define b(i)
Definition: RSha256.hxx:118
TGWindow.h
TGFrame::MapWindow
virtual void MapWindow()
map window
Definition: TGFrame.h:229
bool
kLeaveWindowMask
const Mask_t kLeaveWindowMask
Definition: GuiTypes.h:167
id
XFontStruct * id
Definition: TGX11.cxx:109
TGFrameElement::fFrame
TGFrame * fFrame
Definition: TGLayout.h:119
kMWMDecorMenu
@ kMWMDecorMenu
Definition: TGFrame.h:76
TGFrame::GetOptionString
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
Definition: TGFrame.cxx:2465
TGFrame::GetOptions
virtual UInt_t GetOptions() const
Definition: TGFrame.h:222
kMWMInputModeless
@ kMWMInputModeless
Definition: TGFrame.h:66
kMWMDecorResizeH
@ kMWMDecorResizeH
Definition: TGFrame.h:74
TGDockableFrame::AddFrame
virtual void AddFrame(TGFrame *f, TGLayoutHints *hints)
Add frame to dockable frame container. Frame and hints are NOT adopted.
Definition: TGDockableFrame.cxx:273
TGDockableFrame::fLc
TGLayoutHints * fLc
Definition: TGDockableFrame.h:113
TGFrame::AddInput
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:324
TGFrame::GetHilightGC
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition: TGFrame.cxx:740
TGFrame::DeleteWindow
virtual void DeleteWindow()
Delete window.
Definition: TGFrame.cxx:261
TGCompositeFrame::ChangeOptions
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:1028
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TGUndockedFrame::TGUndockedFrame
TGUndockedFrame(const TGUndockedFrame &)
TGUndockedFrame::CloseWindow
void CloseWindow()
Close undocked frame (called via WM close button).
Definition: TGDockableFrame.cxx:210
TColor::Pixel2RGB
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:2089
TGDockableFrame::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a dockable frame widget as a C++ statement(s) on output stream out.
Definition: TGDockableFrame.cxx:454
TGDockableFrame::fEnableUndock
Bool_t fEnableUndock
Definition: TGDockableFrame.h:103
h
#define h(i)
Definition: RSha256.hxx:124
TGWidget::fMsgWindow
const TGWindow * fMsgWindow
Definition: TGWidget.h:60
TGWindow::GetName
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition: TGWindow.cxx:317
TGCompositeFrame::MapSubwindows
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1149
kButtonEngaged
@ kButtonEngaged
Definition: TGButton.h:61
TGFrame::ReparentWindow
virtual void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0)
Reparent window, make p the new parent and position the window at position (x,y) in new parent.
Definition: TGFrame.h:227
TGWidget::Associate
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:84
TGFrame::Resize
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:590
TGObject::fId
Handle_t fId
Definition: TGObject.h:36
TGFrame::SendMessage
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
Definition: TGFrame.cxx:630
TGDockableFrame::EnableHide
Bool_t EnableHide() const
Definition: TGDockableFrame.h:135
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TGWidget::fWidgetFlags
Int_t fWidgetFlags
Definition: TGWidget.h:59
TGCompositeFrame::HideFrame
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition: TGFrame.cxx:1175
TGFrame.h
kWidgetIsEnabled
@ kWidgetIsEnabled
Definition: TGWidget.h:48
kCM_BUTTON
@ kCM_BUTTON
Definition: WidgetMessageTypes.h:42
Long_t
long Long_t
Definition: RtypesCore.h:54
TGWidget::IsEnabled
Bool_t IsEnabled() const
Definition: TGWidget.h:81
TGLayoutHints
Definition: TGLayout.h:57
TGDockButton::fNormBg
ULong_t fNormBg
Definition: TGDockableFrame.h:42
TGDockableFrame
Definition: TGDockableFrame.h:93
Window_t
Handle_t Window_t
Definition: GuiTypes.h:28
kFixedSize
@ kFixedSize
Definition: GuiTypes.h:390
y
Double_t y[n]
Definition: legend1.C:17
kLHintsExpandY
@ kLHintsExpandY
Definition: TGLayout.h:44
TGDockableFrame::GetContainer
TGCompositeFrame * GetContainer() const
Definition: TGDockableFrame.h:145
TGLayoutHints::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition: TGLayout.cxx:1004
TGUndockedFrame
Definition: TGDockableFrame.h:73
TGCompositeFrame::RemoveFrame
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition: TGFrame.cxx:1134
TGWidget.h
unsigned int
TGFrame::fX
Int_t fX
Definition: TGFrame.h:110
kDOCK_SHOW
@ kDOCK_SHOW
Definition: WidgetMessageTypes.h:97
TGDockableFrame::EnableUndock
Bool_t EnableUndock() const
Definition: TGDockableFrame.h:133
kHorizontalFrame
@ kHorizontalFrame
Definition: GuiTypes.h:382
TGDockableFrame::ProcessMessage
virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t)
Process dockable frame messages.
Definition: TGDockableFrame.cxx:388
TGDockableFrame::TGDockableFrame
TGDockableFrame(const TGDockableFrame &)
TGDockableFrame::fDockButton
TGDockButton * fDockButton
Definition: TGDockableFrame.h:109
TGMainFrame::SetWMSize
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
Definition: TGFrame.cxx:1852
TGWidget::fWidgetId
Int_t fWidgetId
Definition: TGWidget.h:58
TGButton::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event.
Definition: TGButton.cxx:357
TGDockHideButton::fAspectRatio
Int_t fAspectRatio
Definition: TGDockableFrame.h:60
TGClient::NeedRedraw
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Definition: TGClient.cxx:373
TGDockableFrame::DockContainer
void DockContainer(Int_t del=kTRUE)
Dock container back to TGDockableFrame.
Definition: TGDockableFrame.cxx:322
TGObject::fClient
TGClient * fClient
Definition: TGObject.h:37
kC_COMMAND
@ kC_COMMAND
Definition: WidgetMessageTypes.h:39
TGFrame::Move
virtual void Move(Int_t x, Int_t y)
Move frame.
Definition: TGFrame.cxx:578
kC_DOCK
@ kC_DOCK
Definition: WidgetMessageTypes.h:94
TGMainFrame::SetMWMHints
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
Definition: TGFrame.cxx:1827
TGDockableFrame::ShowContainer
void ShowContainer()
Show dock container.
Definition: TGDockableFrame.cxx:354
kMWMFuncAll
@ kMWMFuncAll
Definition: TGFrame.h:58
TGButton.h
kMWMDecorAll
@ kMWMDecorAll
Definition: TGFrame.h:72
TGButton::fState
EButtonState fState
Definition: TGButton.h:75
Event_t
Definition: GuiTypes.h:173
GET_SUBMSG
Int_t GET_SUBMSG(Long_t val)
Definition: WidgetMessageTypes.h:113
TGDockableFrame::HideContainer
void HideContainer()
Hide dock container.
Definition: TGDockableFrame.cxx:371
name
char name[80]
Definition: TGX11.cxx:110
TGFrameElement
Definition: TGLayout.h:112
TGUndockedFrame::FixSize
void FixSize()
Fix the size of the undocked frame so it cannot be changed via the WM.
Definition: TGDockableFrame.cxx:200
TGFrame::GetShadowGC
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition: TGFrame.cxx:750
TGDockableFrame::fContainer
TGCompositeFrame * fContainer
Definition: TGDockableFrame.h:107
kMWMDecorMaximize
@ kMWMDecorMaximize
Definition: TGFrame.h:78
TIter
Definition: TCollection.h:233
TGDockHideButton::TGDockHideButton
TGDockHideButton(const TGCompositeFrame *p=0)
Create a dock hide button (i.e. button with small triangle).
Definition: TGDockableFrame.cxx:140
kLHintsExpandX
@ kLHintsExpandX
Definition: TGLayout.h:43
TColor::RGB2Pixel
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:2051
TGCompositeFrame::SetCleanup
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition: TGFrame.cxx:1057
TGFrame::fHeight
UInt_t fHeight
Definition: TGFrame.h:113
TGFrame::fBackground
Pixel_t fBackground
Definition: TGFrame.h:120
kMWMFuncResize
@ kMWMFuncResize
Definition: TGFrame.h:59
kEnterWindowMask
const Mask_t kEnterWindowMask
Definition: GuiTypes.h:166
TGButton
Definition: TGButton.h:68
TColor::RGB2HLS
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:1591
TGUndockedFrame::fDockable
TGDockableFrame * fDockable
Definition: TGDockableFrame.h:80
TGDockButton::DoRedraw
virtual void DoRedraw()
Draw the dock button, i.e. two vertical lines.
Definition: TGDockableFrame.cxx:123
TGDockButton::TGDockButton
TGDockButton(const TGCompositeFrame *p=0, Int_t id=1)
Create a dock button (i.e. button with two vertical bars).
Definition: TGDockableFrame.cxx:54
kMWMFuncMaximize
@ kMWMFuncMaximize
Definition: TGFrame.h:62
TGDockButton
Definition: TGDockableFrame.h:39
TGCompositeFrame
Definition: TGFrame.h:324
TGDockableFrame::fHidden
Bool_t fHidden
Definition: TGDockableFrame.h:101
kMWMDecorMinimize
@ kMWMDecorMinimize
Definition: TGFrame.h:77
TGDockableFrame::fHideButton
TGDockHideButton * fHideButton
Definition: TGDockableFrame.h:110
TGCompositeFrame::AddFrame
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1102
TGFrame::GetDefaultWidth
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:215
TColor::HLS2RGB
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:1451
TGCompositeFrame::Layout
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1242
TGDockButton::fMouseOn
Bool_t fMouseOn
Definition: TGDockableFrame.h:41
TGCompositeFrame::ShowFrame
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Definition: TGFrame.cxx:1189
MK_MSG
Int_t MK_MSG(EWidgetMessageTypes msg, EWidgetMessageTypes submsg)
Definition: WidgetMessageTypes.h:110
TGDockableFrame::IsUndocked
Bool_t IsUndocked() const
Definition: TGDockableFrame.h:139
TGWindow::fParent
const TGWindow * fParent
Definition: TGWindow.h:36
kChildFrame
@ kChildFrame
Definition: GuiTypes.h:379
int
g
#define g(i)
Definition: RSha256.hxx:123