Logo ROOT  
Reference Guide
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 #include "TGFrame.h"
38 
39 class TGPicture;
40 class TGMdiMainFrame;
41 class TGMdiDecorFrame;
42 
43 
44 class TGMdiFrame : public TGCompositeFrame {
45 
46 friend class TGMdiMainFrame;
47 friend class TGMdiDecorFrame;
48 
49 protected:
50  enum { kDontCallClose = BIT(14) };
51 
52  TGMdiMainFrame *fMain; // pointer to the MDI main frame
53  ULong_t fMdiHints; // MDI hints, also used to identify titlebar buttons
54 
55  TString GetMdiHintsString() const;
56 
57 public:
59  UInt_t options = 0,
61  virtual ~TGMdiFrame();
62 
63  virtual void Move(Int_t x, Int_t y);
64  virtual Bool_t CloseWindow(); //*SIGNAL*
65  virtual Bool_t Help() { return kFALSE; }
66 
67  virtual void SetMdiHints(ULong_t mdihints);
68  ULong_t GetMdiHints() const { return fMdiHints; }
69 
70  void DontCallClose();
71  void SetWindowName(const char *name);
72  void SetWindowIcon(const TGPicture *pic);
73  const char *GetWindowName();
74  const TGPicture *GetWindowIcon();
75 
76  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
77 
78  ClassDef(TGMdiFrame, 0) // MDI Frame
79 };
80 
81 #endif
TGMdiFrame::SetMdiHints
virtual void SetMdiHints(ULong_t mdihints)
Set MDI hints, also used to identify titlebar buttons.
Definition: TGMdiFrame.cxx:94
TGMdiFrame::Help
virtual Bool_t Help()
Definition: TGMdiFrame.h:65
TGMdiFrame::CloseWindow
virtual Bool_t CloseWindow()
Close MDI frame window.
Definition: TGMdiFrame.cxx:75
TGPicture
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition: TGPicture.h:25
Option_t
const char Option_t
Definition: RtypesCore.h:66
Pixel_t
ULong_t Pixel_t
Pixel value.
Definition: GuiTypes.h:40
TGMdiFrame::fMdiHints
ULong_t fMdiHints
Definition: TGMdiFrame.h:53
TGMdiFrame::kDontCallClose
@ kDontCallClose
Definition: TGMdiFrame.h:50
TGMdiFrame::SetWindowName
void SetWindowName(const char *name)
Set MDI window name (set titlebar title).
Definition: TGMdiFrame.cxx:103
TGMdiFrame::TGMdiFrame
TGMdiFrame(TGMdiMainFrame *main, Int_t w, Int_t h, UInt_t options=0, Pixel_t back=GetDefaultFrameBackground())
TGMdiFrame constructor.
Definition: TGMdiFrame.cxx:53
TGMdiFrame::DontCallClose
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
Definition: TGMdiFrame.cxx:86
TGMdiFrame::GetMdiHintsString
TString GetMdiHintsString() const
Returns a MDI option string - used in SavePrimitive().
Definition: TGMdiFrame.cxx:146
x
Double_t x[n]
Definition: legend1.C:17
TGFrame::GetDefaultFrameBackground
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:683
TString
Basic string class.
Definition: TString.h:136
TGMdiFrame::GetWindowIcon
const TGPicture * GetWindowIcon()
Return pointer to picture used as MDI window icon (on titlebar).
Definition: TGMdiFrame.cxx:129
TGMdiFrame::fMain
TGMdiMainFrame * fMain
Definition: TGMdiFrame.h:52
bool
TGMdiFrame::GetWindowName
const char * GetWindowName()
Return MDI window name.
Definition: TGMdiFrame.cxx:121
h
#define h(i)
Definition: RSha256.hxx:106
TGMdiFrame::GetMdiHints
ULong_t GetMdiHints() const
Definition: TGMdiFrame.h:68
TGMdiFrame
This file contains the TGMdiFrame class.
Definition: TGMdiFrame.h:44
TGMdiMainFrame
This file contains the TGMdiMainFrame class.
Definition: TGMdiMainFrame.h:131
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:96
TGFrame.h
BIT
#define BIT(n)
Definition: Rtypes.h:85
y
Double_t y[n]
Definition: legend1.C:17
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
TGMdiFrame::~TGMdiFrame
virtual ~TGMdiFrame()
TGMdiFrame destructor.
Definition: TGMdiFrame.cxx:66
unsigned int
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
TGMdiFrame::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a MDIframe as a C++ statement(s) on output stream out.
Definition: TGMdiFrame.cxx:191
TGMdiFrame::Move
virtual void Move(Int_t x, Int_t y)
Move MDI window at position x, y.
Definition: TGMdiFrame.cxx:137
TGCompositeFrame
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
TGMdiFrame::SetWindowIcon
void SetWindowIcon(const TGPicture *pic)
Set MDI window icon (titlebar icon).
Definition: TGMdiFrame.cxx:112
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