TStylePreview.h

Go to the documentation of this file.
00001 // @(#)root/ged:$Id: TStylePreview.h,v 1.0 2005/09/08
00002 // Author: Denis Favre-Miville   08/09/05
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2004, 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 #ifndef ROOT_TStylePreview
00013 #define ROOT_TStylePreview
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 //  TStylePreview                                                       //
00018 //                                                                      //
00019 //  This class may be used to preview the result of applying a style    //
00020 //       to a canvas. The result is shown on a clone of the object,     //
00021 //       in a different shown over the initial canvas.                  //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_TGFrame
00026 #include "TGFrame.h"
00027 #endif
00028 
00029 class TCanvas;
00030 class TList;
00031 class TRootEmbeddedCanvas;
00032 class TStyle;
00033 class TVirtualPad;
00034 
00035 class TStylePreview : public TGTransientFrame {
00036 
00037 private:
00038    TRootEmbeddedCanvas  *fEcan;                    // canvas for preview
00039    TVirtualPad          *fPad;                     // original pad previewed
00040    TList                *fTrashListLayout;         // to avoid memory leak
00041 
00042 public:
00043    TStylePreview(const TGWindow *p, TStyle *style, TVirtualPad *currentPad);
00044    virtual ~TStylePreview();
00045    void Update(TStyle *style, TVirtualPad *pad);
00046    void MapTheWindow();
00047    TCanvas *GetMainCanvas();
00048 
00049    ClassDef(TStylePreview, 0) // Preview window used by the TStyleManager class
00050 };
00051 
00052 #endif

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