ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 #ifndef ROOT_TGFrame
45 #include "TGFrame.h"
46 #endif
47 
48 class TGPicture;
49 class TGMdiMainFrame;
50 class TGMdiDecorFrame;
51 
52 
53 class TGMdiFrame : public TGCompositeFrame {
54 
55 friend class TGMdiMainFrame;
56 friend class TGMdiDecorFrame;
57 
58 protected:
59  enum { kDontCallClose = BIT(14) };
60 
61  TGMdiMainFrame *fMain; // pointer to the MDI main frame
62  ULong_t fMdiHints; // MDI hints, also used to identify titlebar buttons
63 
64  TString GetMdiHintsString() const;
65 
66 public:
68  UInt_t options = 0,
70  virtual ~TGMdiFrame();
71 
72  virtual void Move(Int_t x, Int_t y);
73  virtual Bool_t CloseWindow(); //*SIGNAL*
74  virtual Bool_t Help() { return kFALSE; }
75 
76  virtual void SetMdiHints(ULong_t mdihints);
77  ULong_t GetMdiHints() const { return fMdiHints; }
78 
79  void DontCallClose();
80  void SetWindowName(const char *name);
81  void SetWindowIcon(const TGPicture *pic);
82  const char *GetWindowName();
83  const TGPicture *GetWindowIcon();
84 
85  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
86 
87  ClassDef(TGMdiFrame, 0) // MDI Frame
88 };
89 
90 #endif
const char Option_t
Definition: RtypesCore.h:62
#define BIT(n)
Definition: Rtypes.h:120
TH1 * h
Definition: legend2.C:5
virtual ~TGMdiFrame()
TGMdiFrame destructor.
Definition: TGMdiFrame.cxx:65
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void Move(Int_t x, Int_t y)
Move MDI window at position x, y.
Definition: TGMdiFrame.cxx:136
const Bool_t kFALSE
Definition: Rtypes.h:92
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
ULong_t Pixel_t
Definition: GuiTypes.h:41
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
virtual Bool_t Help()
Definition: TGMdiFrame.h:74
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a MDIframe as a C++ statement(s) on output stream out.
Definition: TGMdiFrame.cxx:190
char * out
Definition: TBase64.cxx:29
tuple main
Definition: hsum.py:20
void SetWindowName(const char *name)
Set MDI window name (set titlebar title).
Definition: TGMdiFrame.cxx:102
unsigned int UInt_t
Definition: RtypesCore.h:42
tuple w
Definition: qtexample.py:51
ULong_t fMdiHints
Definition: TGMdiFrame.h:62
ULong_t GetMdiHints() const
Definition: TGMdiFrame.h:77
void SetWindowIcon(const TGPicture *pic)
Set MDI window icon (titlebar icon).
Definition: TGMdiFrame.cxx:111
virtual void SetMdiHints(ULong_t mdihints)
Set MDI hints, also used to identify titlebar buttons.
Definition: TGMdiFrame.cxx:93
virtual Bool_t CloseWindow()
Close MDI frame window.
Definition: TGMdiFrame.cxx:74
unsigned long ULong_t
Definition: RtypesCore.h:51
Double_t y[n]
Definition: legend1.C:17
#define name(a, b)
Definition: linkTestLib0.cpp:5
TGMdiFrame(TGMdiMainFrame *main, Int_t w, Int_t h, UInt_t options=0, Pixel_t back=GetDefaultFrameBackground())
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
Definition: TGMdiFrame.cxx:85
TGMdiMainFrame * fMain
Definition: TGMdiFrame.h:61
const char * GetWindowName()
Return MDI window name.
Definition: TGMdiFrame.cxx:120
TString GetMdiHintsString() const
Returns a MDI option string - used in SavePrimitive().
Definition: TGMdiFrame.cxx:145
const TGPicture * GetWindowIcon()
Return pointer to picture used as MDI window icon (on titlebar).
Definition: TGMdiFrame.cxx:128