Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TGMdiFrame.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 /**************************************************************************
13 
14  This file is part of TGMdi, an extension to the xclass toolkit.
15  Copyright (C) 1998-2002 by Harald Radke, Hector Peraza.
16 
17  This application is free software; you can redistribute it and/or
18  modify it under the terms of the GNU Library General Public
19  License as published by the Free Software Foundation; either
20  version 2 of the License, or (at your option) any later version.
21 
22  This application is distributed in the hope that it will be useful,
23  but WITHOUT ANY WARRANTY; without even the implied warranty of
24  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25  Library General Public License for more details.
26 
27  You should have received a copy of the GNU Library General Public
28  License along with this library; if not, write to the Free
29  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 
31 **************************************************************************/
32 
33 #ifndef ROOT_TGMdiFrame
34 #define ROOT_TGMdiFrame
35 
36 //////////////////////////////////////////////////////////////////////////
37 // //
38 // TGMdiFrame. //
39 // //
40 // This file contains the TGMdiFrame class. //
41 // //
42 //////////////////////////////////////////////////////////////////////////
43 
44 #include "TGFrame.h"
45 
46 class TGPicture;
47 class TGMdiMainFrame;
48 class TGMdiDecorFrame;
49 
50 
51 class TGMdiFrame : public TGCompositeFrame {
52 
53 friend class TGMdiMainFrame;
54 friend class TGMdiDecorFrame;
55 
56 protected:
57  enum { kDontCallClose = BIT(14) };
58 
59  TGMdiMainFrame *fMain; // pointer to the MDI main frame
60  ULong_t fMdiHints; // MDI hints, also used to identify titlebar buttons
61 
62  TString GetMdiHintsString() const;
63 
64 public:
65  TGMdiFrame(TGMdiMainFrame *main, Int_t w, Int_t h,
66  UInt_t options = 0,
67  Pixel_t back = GetDefaultFrameBackground());
68  virtual ~TGMdiFrame();
69 
70  virtual void Move(Int_t x, Int_t y);
71  virtual Bool_t CloseWindow(); //*SIGNAL*
72  virtual Bool_t Help() { return kFALSE; }
73 
74  virtual void SetMdiHints(ULong_t mdihints);
75  ULong_t GetMdiHints() const { return fMdiHints; }
76 
77  void DontCallClose();
78  void SetWindowName(const char *name);
79  void SetWindowIcon(const TGPicture *pic);
80  const char *GetWindowName();
81  const TGPicture *GetWindowIcon();
82 
83  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
84 
85  ClassDef(TGMdiFrame, 0) // MDI Frame
86 };
87 
88 #endif