TCanvasImp.h

Go to the documentation of this file.
00001 // @(#)root/base:$Id: TCanvasImp.h 29403 2009-07-09 07:17:16Z brun $
00002 // Author: Fons Rademakers   16/11/95
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 
00013 #ifndef ROOT_TCanvasImp
00014 #define ROOT_TCanvasImp
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TCanvasImp                                                           //
00019 //                                                                      //
00020 // ABC describing GUI independent main window (with menubar, scrollbars //
00021 // and a drawing area).                                                 //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_Rtypes
00026 #include "Rtypes.h"
00027 #endif
00028 
00029 class TCanvas;
00030 
00031 
00032 class TCanvasImp {
00033 friend class TCanvas;
00034 
00035 protected:
00036    TCanvas  *fCanvas;   //TCanvas associated with this implementation
00037 
00038    TCanvasImp(const TCanvasImp& ci) 
00039      : fCanvas(ci.fCanvas) { }
00040    TCanvasImp& operator=(const TCanvasImp& ci)
00041      {if(this!=&ci) fCanvas=ci.fCanvas; return *this;}
00042 
00043    virtual void   Lock() { }
00044    virtual void   Unlock() { }
00045    virtual Bool_t IsLocked() { return kFALSE; }
00046 
00047 public:
00048    TCanvasImp(TCanvas *c=0) : fCanvas(c) { }
00049    TCanvasImp(TCanvas *c, const char *name, UInt_t width, UInt_t height);
00050    TCanvasImp(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height);
00051    virtual ~TCanvasImp() { }
00052 
00053    TCanvas       *Canvas() const { return fCanvas; }
00054    virtual void   Close() { }
00055    virtual void   ForceUpdate() { }
00056    virtual UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
00057    virtual void   Iconify() { }
00058    virtual Int_t  InitWindow() { return 0; }
00059    virtual void   SetStatusText(const char *text = 0, Int_t partidx = 0);
00060    virtual void   SetWindowPosition(Int_t x, Int_t y);
00061    virtual void   SetWindowSize(UInt_t w, UInt_t h);
00062    virtual void   SetWindowTitle(const char *newTitle);
00063    virtual void   SetCanvasSize(UInt_t w, UInt_t h);
00064    virtual void   Show() { }
00065    virtual void   ShowMenuBar(Bool_t show = kTRUE);
00066    virtual void   ShowStatusBar(Bool_t show = kTRUE);
00067    virtual void   RaiseWindow();
00068    virtual void   ReallyDelete();
00069 
00070    virtual void   ShowEditor(Bool_t show = kTRUE);
00071    virtual void   ShowToolBar(Bool_t show = kTRUE);
00072    virtual void   ShowToolTips(Bool_t show = kTRUE);
00073 
00074    virtual Bool_t HasEditor() const { return kFALSE; }
00075    virtual Bool_t HasMenuBar() const { return kFALSE; }
00076    virtual Bool_t HasStatusBar() const { return kFALSE; }
00077    virtual Bool_t HasToolBar() const { return kFALSE; }
00078    virtual Bool_t HasToolTips() const { return kFALSE; }
00079 
00080    ClassDef(TCanvasImp,0)  //ABC describing main window protocol
00081 };
00082 
00083 inline TCanvasImp::TCanvasImp(TCanvas *c, const char *, UInt_t, UInt_t) : fCanvas(c) { }
00084 inline TCanvasImp::TCanvasImp(TCanvas *c, const char *, Int_t, Int_t, UInt_t, UInt_t) : fCanvas(c) { }
00085 inline UInt_t TCanvasImp::GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
00086                { x = y = 0; w = h = 0; return 0;}
00087 inline void TCanvasImp::SetStatusText(const char *, Int_t) { }
00088 inline void TCanvasImp::SetWindowPosition(Int_t, Int_t) { }
00089 inline void TCanvasImp::SetWindowSize(UInt_t, UInt_t) { }
00090 inline void TCanvasImp::SetWindowTitle(const char *) { }
00091 inline void TCanvasImp::SetCanvasSize(UInt_t, UInt_t) { }
00092 inline void TCanvasImp::ShowMenuBar(Bool_t) { }
00093 inline void TCanvasImp::ShowStatusBar(Bool_t) { }
00094 inline void TCanvasImp::RaiseWindow() { }
00095 inline void TCanvasImp::ReallyDelete() { }
00096 
00097 inline void TCanvasImp::ShowEditor(Bool_t) { }
00098 inline void TCanvasImp::ShowToolBar(Bool_t) { }
00099 inline void TCanvasImp::ShowToolTips(Bool_t) { }
00100 
00101 #endif

Generated on Tue Jul 5 14:10:24 2011 for ROOT_528-00b_version by  doxygen 1.5.1