Logo ROOT  
Reference Guide
TGMdiDecorFrame.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Bertrand Bellenot 20/08/2004
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 #ifndef ROOT_TGMdiDecorFrame
13 #define ROOT_TGMdiDecorFrame
14 
15 
16 #include "TGFrame.h"
17 #include "TGMenu.h"
18 #include "TGButton.h"
19 #include "TGIcon.h"
20 #include "TGLabel.h"
21 #include "TGFont.h"
22 #include "TGMdiMainFrame.h"
23 #include "TGMdiFrame.h"
24 
25 
26 /// placement of window resizers
32 };
33 
34 
35 class TGMdiMainFrame;
36 class TGMdiDecorFrame;
37 class TGMdiFrame;
38 class TGMdiTitleBar;
39 class TGMdiTitleIcon;
40 class TGMdiButtons;
41 
42 
43 //----------------------------------------------------------------------
44 
45 class TGMdiWinResizer : public TGFrame, public TGWidget {
46 
47 friend class TGMdiMainFrame;
48 
49 protected:
50  const TGWindow *fMdiWin; ///< owner MDI Window
51  Int_t fWinX, fWinY, fWinW, fWinH; ///< MDI win position and dimension
52  Int_t fOldX, fOldY, fOldW, fOldH; ///< old MDI win position and dimension
53  Int_t fNewX, fNewY, fNewW, fNewH; ///< new MDI win position and dimension
54  Int_t fMinW, fMinH; ///< Min width and height of the MDI Win
55  Int_t fMdiOptions; ///< MDI options
56  Int_t fPos; ///< position of the resizer
57  Int_t fX0, fY0; ///< initial position of the mouse click
59 
60  const TGGC *fBoxGC; ///< GC used for resizing rectangle
61  Int_t fLineW; ///< line width of resizing rectangle
62 
63  void MoveResizeIt();
64  void DrawBox(Int_t x, Int_t y, UInt_t width, UInt_t height);
65 
66 public:
67  TGMdiWinResizer(const TGWindow *p, const TGWindow *mdiwin, Int_t pos,
68  const TGGC *boxGC, Int_t linew,
69  Int_t mdioptions = kMdiDefaultResizeMode,
70  Int_t w = 1, Int_t h = 1, UInt_t options = kOwnBackground);
71 
72  virtual Bool_t HandleButton(Event_t *event);
73  virtual void DrawBorder() {};
74 
75  void SetResizeMode(Int_t mode) { fMdiOptions = mode; }
76  void SetMinSize(Int_t w = 50, Int_t h = 20) { fMinW = w; fMinH = h; }
77 
78  ClassDef(TGMdiWinResizer, 0) // Window Resizer
79 };
80 
81 
83 
84 public:
85  TGMdiVerticalWinResizer(const TGWindow *p, const TGWindow *mdiwin,
86  Int_t pos, const TGGC *boxGC, Int_t linew,
87  Int_t mdioptions = kMdiDefaultResizeMode,
88  Int_t w = 4, Int_t h = 5);
89 
90  virtual Bool_t HandleMotion(Event_t *event);
91  virtual void DrawBorder();
92 
93  ClassDef(TGMdiVerticalWinResizer, 0) // Vertical Window Resizer
94 };
95 
96 
98 
99 public:
100  TGMdiHorizontalWinResizer(const TGWindow *p, const TGWindow *mdiwin,
101  Int_t pos, const TGGC *boxGC, Int_t linew,
102  Int_t mdioptions = kMdiDefaultResizeMode,
103  Int_t w = 5, Int_t h = 4);
104 
105  virtual Bool_t HandleMotion(Event_t *event);
106  virtual void DrawBorder();
107 
108  ClassDef(TGMdiHorizontalWinResizer, 0) // Horizontal Window Resizer
109 };
110 
111 
113 
114 public:
115  TGMdiCornerWinResizer(const TGWindow *p, const TGWindow *mdiwin,
116  Int_t pos, const TGGC *boxGC, Int_t linew,
117  Int_t mdioptions = kMdiDefaultResizeMode,
118  Int_t w = 20, Int_t h = 20);
119 
120  virtual Bool_t HandleMotion(Event_t *event);
121  virtual void DrawBorder();
122 
123  ClassDef(TGMdiCornerWinResizer, 0) // Corner Window Resizer
124 };
125 
126 
127 //----------------------------------------------------------------------
128 
130 
131 friend class TGMdiTitleBar;
132 
133 protected:
134  TGPictureButton *fButton[5]; ///< MDI picture buttons
135  TGLayoutHints *fDefaultHint, *fCloseHint; ///< Layout hints
136  const TGWindow *fMsgWindow; ///< window handling container messages
137 
138 public:
139  TGMdiButtons(const TGWindow *p, const TGWindow *titlebar);
140  virtual ~TGMdiButtons();
141 
142  TGPictureButton *GetButton(Int_t no) const { return fButton[no]; }
143 
144  ClassDef(TGMdiButtons, 0) // MDI Buttons Frame
145 };
146 
147 
148 //----------------------------------------------------------------------
149 
150 class TGMdiTitleIcon : public TGIcon {
151 
152 friend class TGMdiFrame;
153 friend class TGMdiTitleBar;
154 
155 protected:
156  const TGWindow *fMsgWindow; ///< window handling container messages
157  TGPopupMenu *fPopup; ///< Popup menu associated to the title icon
158 
159  virtual void DoRedraw();
160 
161 public:
162  TGMdiTitleIcon(const TGWindow *p, const TGWindow *titlebar,
163  const TGPicture *pic, Int_t w, Int_t h);
164  virtual ~TGMdiTitleIcon();
165 
166  virtual Bool_t HandleDoubleClick(Event_t *event);
167  virtual Bool_t HandleButton(Event_t *event);
168  TGPopupMenu *GetPopup() const { return fPopup; }
169 
170  ClassDef(TGMdiTitleIcon, 0) // MDI Title Icon
171 };
172 
173 
174 //----------------------------------------------------------------------
175 
177 
178 friend class TGMdiDecorFrame;
179 friend class TGMdiMainFrame;
180 
181 protected:
182  const TGWindow *fMdiWin; ///< owner MDI window
183  TGMdiButtons *fButtons; ///< MDI buttons
184  TGMdiTitleIcon *fWinIcon; ///< title icon
185  TGLabel *fWinName; ///< window name label
186  TGCompositeFrame *fLFrame, *fMFrame,*fRFrame; ///< the three parts of the title bar
188  Int_t fX0, fY0; ///< initial position of the mouse click
190 
191  TGMdiTitleBar(const TGWindow *p, const TGWindow *mdiwin,
192  const char *name = "Untitled");
193  void LayoutButtons(UInt_t buttonmask, Bool_t isMinimized,
194  Bool_t isMaximized);
195 
196  void AddFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons);
197  void RemoveFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons);
198 
199 public:
200  virtual ~TGMdiTitleBar();
201 
202  virtual Bool_t HandleButton(Event_t *event);
203  virtual Bool_t HandleDoubleClick(Event_t *event);
204  virtual Bool_t HandleMotion(Event_t *event);
205  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
206 
207  void SetTitleBarColors(UInt_t fore, UInt_t back, TGFont *f);
208  TGMdiButtons *GetButtons() const { return fButtons; }
209  TGMdiTitleIcon *GetWinIcon() const { return fWinIcon; }
210  TGLabel *GetWinName() const { return fWinName; }
211  Int_t GetX0() { return fX0; }
212  Int_t GetY0() { return fY0; }
216 
217  void SetX0(Int_t x0) { fX0 = x0; }
218  void SetY0(Int_t y0) { fY0 = y0; }
219  void SetLeftButPressed(Bool_t press = kTRUE) { fLeftButPressed = press; }
221  void SetMidButPressed(Bool_t press = kTRUE) { fMidButPressed = press; }
222 
223  ClassDef(TGMdiTitleBar, 0) // MDI Title Bar
224 };
225 
226 
227 //----------------------------------------------------------------------
228 
230 
231 friend class TGMdiMainFrame;
232 
233 protected:
234  Int_t fPreResizeX, fPreResizeY; ///< position before resizing
235  Int_t fPreResizeWidth, fPreResizeHeight; ///< dimension before resizing
236  Int_t fMinimizedX, fMinimizedY; ///< minimized position
237  Bool_t fIsMinimized, fIsMaximized; ///< minimized and maximized flags
238  Bool_t fMinimizedUserPlacement; ///< user placement flag
239  Bool_t fIsCurrent; ///< current mdi window flag
240 
241  TGMdiFrame *fFrame; ///< parent (owner) MDI frame
242  TGMdiMainFrame *fMdiMainFrame; ///< MDI main frame
243 
244  TGMdiVerticalWinResizer *fUpperHR, *fLowerHR; ///< upper and lower vertical resizers
245  TGMdiCornerWinResizer *fUpperLeftCR, *fLowerLeftCR; ///< upper left and lower left resizers
246  TGMdiCornerWinResizer *fUpperRightCR, *fLowerRightCR; ///< upper right and lower right resizers
247  TGMdiHorizontalWinResizer *fLeftVR, *fRightVR; ///< left and right horizontal resizers
248  TGLayoutHints *fLHint, *fExpandHint; ///< layout hints
249 
250  ULong_t fButtonMask; ///< mask used to display/hide buttons
251  TGMdiTitleBar *fTitlebar; ///< MDI window title bar
252 
253 public:
254  enum {
255  // border width of decorated windows
256  kMdiBorderWidth = 5
257  };
258 
260  const TGGC *boxGC, UInt_t options = 0,
262  virtual ~TGMdiDecorFrame();
263 
264  virtual Bool_t HandleButton(Event_t *event);
265  virtual Bool_t HandleConfigureNotify(Event_t *event);
266 
267  virtual Int_t CloseWindow() { return fFrame->CloseWindow(); }
268  virtual void Layout();
269 
270  virtual void Move(Int_t x, Int_t y);
271  virtual void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h);
272 
273  void SetMdiButtons(ULong_t buttons);
274  ULong_t GetMdiButtons() const { return fButtonMask; }
275 
277 
278  void SetWindowName(const char *name);
279  void SetWindowIcon(const TGPicture *pic);
280  const char *GetWindowName() {
281  return (const char *)fTitlebar->GetWinName()->GetText()->GetString();
282  }
284  Bool_t IsCurrent() const { return fIsCurrent; }
285  Bool_t IsMinimized() const { return fIsMinimized; }
286  Bool_t IsMaximized() const { return fIsMaximized; }
287  Int_t GetPreResizeX() const { return fPreResizeX; }
288  Int_t GetPreResizeY() const { return fPreResizeY; }
291  Int_t GetMinimizedX() const { return fMinimizedX; }
292  Int_t GetMinimizedY() const { return fMinimizedY; }
294 
295  void SetCurrent(Bool_t cur = kTRUE) {fIsCurrent = cur; }
296  void SetDecorBorderWidth(Int_t bw);
303  void Minimize(Bool_t min = kTRUE) { fIsMinimized = min; }
304  void Maximize(Bool_t max = kTRUE) { fIsMaximized = max; }
306 
307  TGMdiFrame *GetMdiFrame() const { return fFrame; }
308  TGMdiTitleBar *GetTitleBar() const { return fTitlebar; }
309 
318 
319  ClassDef(TGMdiDecorFrame, 0) // MDI Decor Frame
320 };
321 
322 #endif
TGMdiDecorFrame::GetLowerLeftCR
TGMdiCornerWinResizer * GetLowerLeftCR() const
Definition: TGMdiDecorFrame.h:313
TGMdiWinResizer::fWinX
Int_t fWinX
Definition: TGMdiDecorFrame.h:51
TGMdiWinResizer::TGMdiWinResizer
TGMdiWinResizer(const TGWindow *p, const TGWindow *mdiwin, Int_t pos, const TGGC *boxGC, Int_t linew, Int_t mdioptions=kMdiDefaultResizeMode, Int_t w=1, Int_t h=1, UInt_t options=kOwnBackground)
TGMdiWinResizer constructor.
Definition: TGMdiDecorFrame.cxx:766
TGMdiTitleBar::TGMdiTitleBar
TGMdiTitleBar(const TGWindow *p, const TGWindow *mdiwin, const char *name="Untitled")
TGMdiTitleBar constructor.
Definition: TGMdiDecorFrame.cxx:341
TGMdiWinResizer::SetMinSize
void SetMinSize(Int_t w=50, Int_t h=20)
Definition: TGMdiDecorFrame.h:76
TGMdiTitleBar::fMFrame
TGCompositeFrame * fMFrame
Definition: TGMdiDecorFrame.h:186
TGMdiDecorFrame::SetWindowIcon
void SetWindowIcon(const TGPicture *pic)
Set Window icon (appearing in the title bar)
Definition: TGMdiDecorFrame.cxx:257
kMdiResizerTop
@ kMdiResizerTop
Definition: TGMdiDecorFrame.h:28
TGMdiDecorFrame::SetMinUserPlacement
void SetMinUserPlacement(Bool_t place=kTRUE)
Definition: TGMdiDecorFrame.h:305
TGMdiWinResizer::MoveResizeIt
void MoveResizeIt()
Move (resize) parent MDI window.
Definition: TGMdiDecorFrame.cxx:869
TGMdiCornerWinResizer
Definition: TGMdiDecorFrame.h:112
TGMdiTitleBar::fRightButPressed
Bool_t fRightButPressed
Definition: TGMdiDecorFrame.h:189
TGMdiTitleBar::fX0
Int_t fX0
Definition: TGMdiDecorFrame.h:188
TGWindow
ROOT GUI Window base class.
Definition: TGWindow.h:23
TGMdiWinResizer::fMinW
Int_t fMinW
Definition: TGMdiDecorFrame.h:54
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TGMdiCornerWinResizer::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle motion events in resizer (resize associated MDI window).
Definition: TGMdiDecorFrame.cxx:979
TGMdiFrame::CloseWindow
virtual Bool_t CloseWindow()
Close MDI frame window.
Definition: TGMdiFrame.cxx:75
TGMdiDecorFrame::fIsMaximized
Bool_t fIsMaximized
minimized and maximized flags
Definition: TGMdiDecorFrame.h:237
TGMdiTitleBar::GetWinIcon
TGMdiTitleIcon * GetWinIcon() const
Definition: TGMdiDecorFrame.h:209
TGMdiTitleBar::SetLeftButPressed
void SetLeftButPressed(Bool_t press=kTRUE)
Definition: TGMdiDecorFrame.h:219
TGPicture
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition: TGPicture.h:25
f
#define f(i)
Definition: RSha256.hxx:104
TGMdiWinResizer::SetResizeMode
void SetResizeMode(Int_t mode)
Definition: TGMdiDecorFrame.h:75
TGMdiTitleBar::GetY0
Int_t GetY0()
Definition: TGMdiDecorFrame.h:212
TGMdiDecorFrame::GetPreResizeY
Int_t GetPreResizeY() const
Definition: TGMdiDecorFrame.h:288
TGMdiDecorFrame::fUpperRightCR
TGMdiCornerWinResizer * fUpperRightCR
Definition: TGMdiDecorFrame.h:246
TGMdiDecorFrame::fButtonMask
ULong_t fButtonMask
mask used to display/hide buttons
Definition: TGMdiDecorFrame.h:250
TGMdiWinResizer::fMdiOptions
Int_t fMdiOptions
MDI options.
Definition: TGMdiDecorFrame.h:55
TGMdiDecorFrame::fLeftVR
TGMdiHorizontalWinResizer * fLeftVR
Definition: TGMdiDecorFrame.h:247
TGMdiTitleBar::SetX0
void SetX0(Int_t x0)
Definition: TGMdiDecorFrame.h:217
TGMdiDecorFrame::IsCurrent
Bool_t IsCurrent() const
Definition: TGMdiDecorFrame.h:284
TGMdiTitleBar::fLeftHint
TGLayoutHints * fLeftHint
Definition: TGMdiDecorFrame.h:187
kMdiResizerLeft
@ kMdiResizerLeft
Definition: TGMdiDecorFrame.h:30
TGMdiFrame.h
TGMdiTitleIcon::HandleDoubleClick
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click event on MDI icon (close the window)
Definition: TGMdiDecorFrame.cxx:732
Pixel_t
ULong_t Pixel_t
Pixel value.
Definition: GuiTypes.h:40
TGMdiDecorFrame::GetLowerHR
TGMdiVerticalWinResizer * GetLowerHR() const
Definition: TGMdiDecorFrame.h:311
TGMdiHorizontalWinResizer::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle motion events in resizer (resize associated MDI window).
Definition: TGMdiDecorFrame.cxx:1096
TGMdiDecorFrame::GetMinUserPlacement
Bool_t GetMinUserPlacement() const
Definition: TGMdiDecorFrame.h:293
TGMdiDecorFrame::Move
virtual void Move(Int_t x, Int_t y)
Move the MDI window at position x, y.
Definition: TGMdiDecorFrame.cxx:266
TGMdiDecorFrame::CloseWindow
virtual Int_t CloseWindow()
Definition: TGMdiDecorFrame.h:267
TGMdiVerticalWinResizer::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle motion events in resizer (resize associated MDI window).
Definition: TGMdiDecorFrame.cxx:895
TGIcon.h
TGMdiTitleBar::fRFrame
TGCompositeFrame * fRFrame
the three parts of the title bar
Definition: TGMdiDecorFrame.h:186
TGMdiDecorFrame::GetLeftVR
TGMdiHorizontalWinResizer * GetLeftVR() const
Definition: TGMdiDecorFrame.h:316
TGLabel
This class handles GUI labels.
Definition: TGLabel.h:24
TGMdiTitleBar::IsMidButPressed
Bool_t IsMidButPressed()
Definition: TGMdiDecorFrame.h:215
kMdiResizerRight
@ kMdiResizerRight
Definition: TGMdiDecorFrame.h:31
TGMdiButtons::fButton
TGPictureButton * fButton[5]
MDI picture buttons.
Definition: TGMdiDecorFrame.h:134
TGMdiTitleBar::GetX0
Int_t GetX0()
Definition: TGMdiDecorFrame.h:211
TGMdiVerticalWinResizer::DrawBorder
virtual void DrawBorder()
Draw vertical resizer frame border.
Definition: TGMdiDecorFrame.cxx:930
TGMdiDecorFrame::fPreResizeX
Int_t fPreResizeX
Definition: TGMdiDecorFrame.h:234
TGMdiDecorFrame::fUpperLeftCR
TGMdiCornerWinResizer * fUpperLeftCR
Definition: TGMdiDecorFrame.h:245
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
TGMdiTitleBar::fMidButPressed
Bool_t fMidButPressed
mouse button pressed
Definition: TGMdiDecorFrame.h:189
TGMdiDecorFrame::fPreResizeY
Int_t fPreResizeY
position before resizing
Definition: TGMdiDecorFrame.h:234
TGMdiHorizontalWinResizer
Definition: TGMdiDecorFrame.h:97
TGMdiWinResizer::fMdiWin
const TGWindow * fMdiWin
owner MDI Window
Definition: TGMdiDecorFrame.h:50
Int_t
int Int_t
Definition: RtypesCore.h:45
TGWidget
The widget base class.
Definition: TGWidget.h:43
TGMdiTitleBar::RemoveFrames
void RemoveFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons)
This is called from TGMdiMainFrame on Maximize().
Definition: TGMdiDecorFrame.cxx:599
TGMdiDecorFrame::fMinimizedY
Int_t fMinimizedY
minimized position
Definition: TGMdiDecorFrame.h:236
TGMdiDecorFrame::Maximize
void Maximize(Bool_t max=kTRUE)
Definition: TGMdiDecorFrame.h:304
TGMdiDecorFrame::GetLowerRightCR
TGMdiCornerWinResizer * GetLowerRightCR() const
Definition: TGMdiDecorFrame.h:315
TGMdiDecorFrame::SetCurrent
void SetCurrent(Bool_t cur=kTRUE)
Definition: TGMdiDecorFrame.h:295
TGMdiWinResizer::DrawBox
void DrawBox(Int_t x, Int_t y, UInt_t width, UInt_t height)
Draw resize box (rectangle).
Definition: TGMdiDecorFrame.cxx:858
TGMdiDecorFrame::GetRightVR
TGMdiHorizontalWinResizer * GetRightVR() const
Definition: TGMdiDecorFrame.h:317
x
Double_t x[n]
Definition: legend1.C:17
TGMdiDecorFrame::SetPreResizeWidth
void SetPreResizeWidth(Int_t w)
Definition: TGMdiDecorFrame.h:299
TGMdiTitleBar::GetButtons
TGMdiButtons * GetButtons() const
Definition: TGMdiDecorFrame.h:208
TGMdiVerticalWinResizer
Definition: TGMdiDecorFrame.h:82
TGMdiTitleBar::fMdiWin
const TGWindow * fMdiWin
owner MDI window
Definition: TGMdiDecorFrame.h:182
TGFrame::GetDefaultFrameBackground
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:683
TGMdiDecorFrame::MoveResize
virtual void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h)
Move the MDI window at position x, y and set size to w, h.
Definition: TGMdiDecorFrame.cxx:282
TGMdiDecorFrame::fPreResizeWidth
Int_t fPreResizeWidth
Definition: TGMdiDecorFrame.h:235
TGMdiDecorFrame::fLowerHR
TGMdiVerticalWinResizer * fLowerHR
upper and lower vertical resizers
Definition: TGMdiDecorFrame.h:244
TGMdiTitleBar::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events in title bar (used to move MDI window).
Definition: TGMdiDecorFrame.cxx:569
TGMdiTitleBar::GetWinName
TGLabel * GetWinName() const
Definition: TGMdiDecorFrame.h:210
TGMdiDecorFrame::fMinimizedX
Int_t fMinimizedX
Definition: TGMdiDecorFrame.h:236
TGMdiTitleBar::fLHint
TGLayoutHints * fLHint
Definition: TGMdiDecorFrame.h:187
TGMdiTitleBar::fMiddleHint
TGLayoutHints * fMiddleHint
Definition: TGMdiDecorFrame.h:187
TGFrame
Definition: TGFrame.h:80
TGMdiDecorFrame::GetMinimizedY
Int_t GetMinimizedY() const
Definition: TGMdiDecorFrame.h:292
TGMdiDecorFrame::GetUpperLeftCR
TGMdiCornerWinResizer * GetUpperLeftCR() const
Definition: TGMdiDecorFrame.h:312
TGMdiTitleIcon::TGMdiTitleIcon
TGMdiTitleIcon(const TGWindow *p, const TGWindow *titlebar, const TGPicture *pic, Int_t w, Int_t h)
TGMdiTitleIcon constructor.
Definition: TGMdiDecorFrame.cxx:688
TGMdiDecorFrame::SetMdiButtons
void SetMdiButtons(ULong_t buttons)
Set-up MDI buttons.
Definition: TGMdiDecorFrame.cxx:172
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TGMdiButtons::GetButton
TGPictureButton * GetButton(Int_t no) const
Definition: TGMdiDecorFrame.h:142
TGMdiWinResizer::fMinH
Int_t fMinH
Min width and height of the MDI Win.
Definition: TGMdiDecorFrame.h:54
TGMdiTitleBar::SetTitleBarColors
void SetTitleBarColors(UInt_t fore, UInt_t back, TGFont *f)
Set title bar color (blue or grey, depends on active state).
Definition: TGMdiDecorFrame.cxx:462
kOwnBackground
@ kOwnBackground
Definition: GuiTypes.h:391
TGMdiTitleBar::SetMidButPressed
void SetMidButPressed(Bool_t press=kTRUE)
Definition: TGMdiDecorFrame.h:221
bool
TGMdiDecorFrame::SetMinimizedY
void SetMinimizedY(Int_t y)
Definition: TGMdiDecorFrame.h:302
TGMdiDecorFrame::GetMdiFrame
TGMdiFrame * GetMdiFrame() const
Definition: TGMdiDecorFrame.h:307
EMdiResizerPlacement
EMdiResizerPlacement
placement of window resizers
Definition: TGMdiDecorFrame.h:27
TGMdiTitleBar::IsLeftButPressed
Bool_t IsLeftButPressed()
Definition: TGMdiDecorFrame.h:213
TGMdiTitleIcon::fMsgWindow
const TGWindow * fMsgWindow
window handling container messages
Definition: TGMdiDecorFrame.h:156
TGMdiDecorFrame::GetUpperHR
TGMdiVerticalWinResizer * GetUpperHR() const
Definition: TGMdiDecorFrame.h:310
TGIcon
This class handles GUI icons.
Definition: TGIcon.h:22
TGMdiDecorFrame::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events.
Definition: TGMdiDecorFrame.cxx:324
TGMdiDecorFrame::fLowerRightCR
TGMdiCornerWinResizer * fLowerRightCR
upper right and lower right resizers
Definition: TGMdiDecorFrame.h:246
TGMdiDecorFrame::fMinimizedUserPlacement
Bool_t fMinimizedUserPlacement
user placement flag
Definition: TGMdiDecorFrame.h:238
TGMdiDecorFrame::GetMinimizedX
Int_t GetMinimizedX() const
Definition: TGMdiDecorFrame.h:291
TGMdiTitleBar::fWinIcon
TGMdiTitleIcon * fWinIcon
title icon
Definition: TGMdiDecorFrame.h:184
TGMdiButtons::fMsgWindow
const TGWindow * fMsgWindow
window handling container messages
Definition: TGMdiDecorFrame.h:136
TGMdiWinResizer::fPos
Int_t fPos
position of the resizer
Definition: TGMdiDecorFrame.h:56
TGMdiMainFrame.h
TGMdiWinResizer::fLineW
Int_t fLineW
line width of resizing rectangle
Definition: TGMdiDecorFrame.h:61
kMdiResizerBottom
@ kMdiResizerBottom
Definition: TGMdiDecorFrame.h:29
TGMdiTitleIcon::GetPopup
TGPopupMenu * GetPopup() const
Definition: TGMdiDecorFrame.h:168
TGMdiWinResizer::DrawBorder
virtual void DrawBorder()
Draw frame border.
Definition: TGMdiDecorFrame.h:73
TGMdiCornerWinResizer::DrawBorder
virtual void DrawBorder()
Draw corner resizer frame border.
Definition: TGMdiDecorFrame.cxx:1039
TGMdiDecorFrame::fLHint
TGLayoutHints * fLHint
Definition: TGMdiDecorFrame.h:248
TGMdiDecorFrame::TGMdiDecorFrame
TGMdiDecorFrame(TGMdiMainFrame *main, TGMdiFrame *frame, Int_t w, Int_t h, const TGGC *boxGC, UInt_t options=0, Pixel_t back=GetDefaultFrameBackground())
TGMdiDecorFrame constructor.
Definition: TGMdiDecorFrame.cxx:69
TGMdiButtons::~TGMdiButtons
virtual ~TGMdiButtons()
TGMdiButtons destructor.
Definition: TGMdiDecorFrame.cxx:674
TGMdiTitleBar::SetY0
void SetY0(Int_t y0)
Definition: TGMdiDecorFrame.h:218
TGMdiTitleBar::IsRightButPressed
Bool_t IsRightButPressed()
Definition: TGMdiDecorFrame.h:214
TGMdiHorizontalWinResizer::TGMdiHorizontalWinResizer
TGMdiHorizontalWinResizer(const TGWindow *p, const TGWindow *mdiwin, Int_t pos, const TGGC *boxGC, Int_t linew, Int_t mdioptions=kMdiDefaultResizeMode, Int_t w=5, Int_t h=4)
TGMdiHorizontalWinResizer constructor.
Definition: TGMdiDecorFrame.cxx:1082
TGMdiWinResizer::fOldY
Int_t fOldY
Definition: TGMdiDecorFrame.h:52
TGMdiTitleBar::fLFrame
TGCompositeFrame * fLFrame
Definition: TGMdiDecorFrame.h:186
TGMdiTitleBar::SetRightButPressed
void SetRightButPressed(Bool_t press=kTRUE)
Definition: TGMdiDecorFrame.h:220
h
#define h(i)
Definition: RSha256.hxx:106
TGMdiWinResizer::fWinY
Int_t fWinY
Definition: TGMdiDecorFrame.h:51
TGMdiDecorFrame::SetDecorBorderWidth
void SetDecorBorderWidth(Int_t bw)
Set border width of the decor.
Definition: TGMdiDecorFrame.cxx:164
TGGC
Encapsulate a graphics context used in the low level graphics.
Definition: TGGC.h:22
TGMdiWinResizer::fOldW
Int_t fOldW
Definition: TGMdiDecorFrame.h:52
TGMdiDecorFrame::GetPreResizeHeight
Int_t GetPreResizeHeight() const
Definition: TGMdiDecorFrame.h:290
TGMdiWinResizer::fMidButPressed
Bool_t fMidButPressed
mouse buttons flags
Definition: TGMdiDecorFrame.h:58
TGMdiFrame
This file contains the TGMdiFrame class.
Definition: TGMdiFrame.h:44
TGMdiDecorFrame::fMdiMainFrame
TGMdiMainFrame * fMdiMainFrame
MDI main frame.
Definition: TGMdiDecorFrame.h:242
TGMdiDecorFrame::fExpandHint
TGLayoutHints * fExpandHint
layout hints
Definition: TGMdiDecorFrame.h:248
TGMdiWinResizer::fWinH
Int_t fWinH
MDI win position and dimension.
Definition: TGMdiDecorFrame.h:51
TGMdiMainFrame
This file contains the TGMdiMainFrame class.
Definition: TGMdiMainFrame.h:131
TGMdiWinResizer::fOldX
Int_t fOldX
Definition: TGMdiDecorFrame.h:52
TGMdiDecorFrame::SetPreResizeX
void SetPreResizeX(Int_t x)
Definition: TGMdiDecorFrame.h:297
TGMdiWinResizer::fX0
Int_t fX0
Definition: TGMdiDecorFrame.h:57
TGMdiWinResizer::fNewW
Int_t fNewW
Definition: TGMdiDecorFrame.h:53
TGMdiDecorFrame::SetResizeMode
void SetResizeMode(Int_t mode=kMdiDefaultResizeMode)
Set resize mode (opaque or transparent)
Definition: TGMdiDecorFrame.cxx:200
TGFrame.h
Long_t
long Long_t
Definition: RtypesCore.h:54
TGLayoutHints
This class describes layout hints used by the layout classes.
Definition: TGLayout.h:50
TGMdiDecorFrame::GetTitleBar
TGMdiTitleBar * GetTitleBar() const
Definition: TGMdiDecorFrame.h:308
TGMdiWinResizer::fOldH
Int_t fOldH
old MDI win position and dimension
Definition: TGMdiDecorFrame.h:52
TGMdiButtons
Definition: TGMdiDecorFrame.h:129
TGMdiDecorFrame::IsMinimized
Bool_t IsMinimized() const
Definition: TGMdiDecorFrame.h:285
TGMdiDecorFrame::GetWindowIcon
const TGPicture * GetWindowIcon()
Definition: TGMdiDecorFrame.h:283
TGMdiDecorFrame::fPreResizeHeight
Int_t fPreResizeHeight
dimension before resizing
Definition: TGMdiDecorFrame.h:235
TGMdiTitleBar::ProcessMessage
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for title bar.
Definition: TGMdiDecorFrame.cxx:550
TGMdiDecorFrame::SetMinimizedX
void SetMinimizedX(Int_t x)
Definition: TGMdiDecorFrame.h:301
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
TGMdiTitleBar::fY0
Int_t fY0
initial position of the mouse click
Definition: TGMdiDecorFrame.h:188
TGMdiDecorFrame::kMdiBorderWidth
@ kMdiBorderWidth
Definition: TGMdiDecorFrame.h:256
y
Double_t y[n]
Definition: legend1.C:17
TGMdiWinResizer::fWinW
Int_t fWinW
Definition: TGMdiDecorFrame.h:51
TGMdiTitleIcon::fPopup
TGPopupMenu * fPopup
Popup menu associated to the title icon.
Definition: TGMdiDecorFrame.h:157
TGMdiButtons::fDefaultHint
TGLayoutHints * fDefaultHint
Definition: TGMdiDecorFrame.h:135
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
TGIcon::GetPicture
const TGPicture * GetPicture() const
Definition: TGIcon.h:45
TGMdiDecorFrame::~TGMdiDecorFrame
virtual ~TGMdiDecorFrame()
TGMdiDecorFrame destructor.
Definition: TGMdiDecorFrame.cxx:146
TGMdiWinResizer::fNewH
Int_t fNewH
new MDI win position and dimension
Definition: TGMdiDecorFrame.h:53
TGMdiDecorFrame::SetPreResizeY
void SetPreResizeY(Int_t y)
Definition: TGMdiDecorFrame.h:298
TGMdiTitleIcon
Definition: TGMdiDecorFrame.h:150
unsigned int
TGMdiDecorFrame::GetUpperRightCR
TGMdiCornerWinResizer * GetUpperRightCR() const
Definition: TGMdiDecorFrame.h:314
TGMdiDecorFrame::GetMdiButtons
ULong_t GetMdiButtons() const
Definition: TGMdiDecorFrame.h:274
TGLabel.h
TGMdiDecorFrame::fFrame
TGMdiFrame * fFrame
parent (owner) MDI frame
Definition: TGMdiDecorFrame.h:241
TGMdiDecorFrame::GetPreResizeX
Int_t GetPreResizeX() const
Definition: TGMdiDecorFrame.h:287
TGMdiWinResizer::fNewY
Int_t fNewY
Definition: TGMdiDecorFrame.h:53
TGMdiWinResizer::fRightButPressed
Bool_t fRightButPressed
Definition: TGMdiDecorFrame.h:58
TGMdiWinResizer
Definition: TGMdiDecorFrame.h:45
TGMdiDecorFrame::Layout
virtual void Layout()
Recalculates the postion and the size of all decor frame components.
Definition: TGMdiDecorFrame.cxx:215
TGMdiDecorFrame::fTitlebar
TGMdiTitleBar * fTitlebar
MDI window title bar.
Definition: TGMdiDecorFrame.h:251
TGMdiTitleBar::fLeftButPressed
Bool_t fLeftButPressed
Definition: TGMdiDecorFrame.h:189
TGMdiDecorFrame::fIsMinimized
Bool_t fIsMinimized
Definition: TGMdiDecorFrame.h:237
TGPictureButton
Yield an action as soon as it is clicked.
Definition: TGButton.h:228
TGMdiTitleBar::HandleDoubleClick
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click in title bar (maximize window)
Definition: TGMdiDecorFrame.cxx:485
TGMdiTitleBar
Definition: TGMdiDecorFrame.h:176
TGLabel::GetText
const TGString * GetText() const
Definition: TGLabel.h:74
TGMdiTitleIcon::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle button event on MDI icon (popup menu)
Definition: TGMdiDecorFrame.cxx:746
TGMdiTitleBar::AddFrames
void AddFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons)
This is called from TGMdiMainFrame on Restore().
Definition: TGMdiDecorFrame.cxx:585
TGMdiTitleBar::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle mouse click on title bar.
Definition: TGMdiDecorFrame.cxx:496
TGMdiDecorFrame::SetWindowName
void SetWindowName(const char *name)
Set MDI Window name (appearing in the title bar)
Definition: TGMdiDecorFrame.cxx:248
TGMdiButtons::TGMdiButtons
TGMdiButtons(const TGWindow *p, const TGWindow *titlebar)
TGMdiButtons constructor.
Definition: TGMdiDecorFrame.cxx:611
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TGMdiDecorFrame::fLowerLeftCR
TGMdiCornerWinResizer * fLowerLeftCR
upper left and lower left resizers
Definition: TGMdiDecorFrame.h:245
TGButton.h
TGPopupMenu
This class creates a popup menu object.
Definition: TGMenu.h:110
TGMdiDecorFrame::SetPreResizeHeight
void SetPreResizeHeight(Int_t h)
Definition: TGMdiDecorFrame.h:300
TGMdiWinResizer::fBoxGC
const TGGC * fBoxGC
GC used for resizing rectangle.
Definition: TGMdiDecorFrame.h:60
TGMdiHorizontalWinResizer::DrawBorder
virtual void DrawBorder()
Draw horizontal resizer frame border.
Definition: TGMdiDecorFrame.cxx:1131
Event_t
Event structure.
Definition: GuiTypes.h:174
name
char name[80]
Definition: TGX11.cxx:110
TGMdiDecorFrame::HandleConfigureNotify
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handle configure notify event.
Definition: TGMdiDecorFrame.cxx:298
TGString::GetString
const char * GetString() const
Definition: TGString.h:30
TGMdiDecorFrame::fRightVR
TGMdiHorizontalWinResizer * fRightVR
left and right horizontal resizers
Definition: TGMdiDecorFrame.h:247
TGMdiDecorFrame::fUpperHR
TGMdiVerticalWinResizer * fUpperHR
Definition: TGMdiDecorFrame.h:244
TGMdiTitleIcon::DoRedraw
virtual void DoRedraw()
Redraw icon.
Definition: TGMdiDecorFrame.cxx:723
TGMdiTitleIcon::~TGMdiTitleIcon
virtual ~TGMdiTitleIcon()
TGMdiTitleIcon destructor.
Definition: TGMdiDecorFrame.cxx:715
TGMdiDecorFrame::IsMaximized
Bool_t IsMaximized() const
Definition: TGMdiDecorFrame.h:286
TGMdiTitleBar::LayoutButtons
void LayoutButtons(UInt_t buttonmask, Bool_t isMinimized, Bool_t isMaximized)
Recalculates the position of every enabled (displayed) buttons.
Definition: TGMdiDecorFrame.cxx:399
TGMdiCornerWinResizer::TGMdiCornerWinResizer
TGMdiCornerWinResizer(const TGWindow *p, const TGWindow *mdiwin, Int_t pos, const TGGC *boxGC, Int_t linew, Int_t mdioptions=kMdiDefaultResizeMode, Int_t w=20, Int_t h=20)
TGMdiCornerWinResizer constructor.
Definition: TGMdiDecorFrame.cxx:947
TGMdiWinResizer::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle button events in resizer (grab button and resize).
Definition: TGMdiDecorFrame.cxx:797
TGFont
Encapsulate fonts used in the GUI system.
Definition: TGFont.h:140
TGMdiTitleBar::fRightHint
TGLayoutHints * fRightHint
layout hints
Definition: TGMdiDecorFrame.h:187
TGMdiVerticalWinResizer::TGMdiVerticalWinResizer
TGMdiVerticalWinResizer(const TGWindow *p, const TGWindow *mdiwin, Int_t pos, const TGGC *boxGC, Int_t linew, Int_t mdioptions=kMdiDefaultResizeMode, Int_t w=4, Int_t h=5)
TGMdiVerticalWinResizer constructor.
Definition: TGMdiDecorFrame.cxx:883
TGMdiWinResizer::fNewX
Int_t fNewX
Definition: TGMdiDecorFrame.h:53
TGMdiDecorFrame::Minimize
void Minimize(Bool_t min=kTRUE)
Definition: TGMdiDecorFrame.h:303
TGCompositeFrame
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
TGMdiTitleBar::fButtons
TGMdiButtons * fButtons
MDI buttons.
Definition: TGMdiDecorFrame.h:183
TGMenu.h
TGMdiWinResizer::fY0
Int_t fY0
initial position of the mouse click
Definition: TGMdiDecorFrame.h:57
TGMdiDecorFrame::GetPreResizeWidth
Int_t GetPreResizeWidth() const
Definition: TGMdiDecorFrame.h:289
TGMdiWinResizer::fLeftButPressed
Bool_t fLeftButPressed
Definition: TGMdiDecorFrame.h:58
TGMdiButtons::fCloseHint
TGLayoutHints * fCloseHint
Layout hints.
Definition: TGMdiDecorFrame.h:135
TGMdiDecorFrame::GetWindowName
const char * GetWindowName()
Definition: TGMdiDecorFrame.h:280
kMdiDefaultResizeMode
@ kMdiDefaultResizeMode
Definition: TGMdiMainFrame.h:46
TGFont.h
main
int main(int argc, char *argv[])
Definition: cef_main.cxx:54
int
TGMdiDecorFrame
This file contains all different MDI frame decoration classes.
Definition: TGMdiDecorFrame.h:229
TGMdiTitleBar::~TGMdiTitleBar
virtual ~TGMdiTitleBar()
TGMdiTitleBar destructor.
Definition: TGMdiDecorFrame.cxx:386
TGMdiDecorFrame::fIsCurrent
Bool_t fIsCurrent
current mdi window flag
Definition: TGMdiDecorFrame.h:239
TGMdiTitleBar::fWinName
TGLabel * fWinName
window name label
Definition: TGMdiDecorFrame.h:185