Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TStylePreview.h
Go to the documentation of this file.
1 // @(#)root/ged:$Id$
2 // Author: Denis Favre-Miville 08/09/05
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 #ifndef ROOT_TStylePreview
13 #define ROOT_TStylePreview
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TStylePreview //
18 // //
19 // This class may be used to preview the result of applying a style //
20 // to a canvas. The result is shown on a clone of the object, //
21 // in a different shown over the initial canvas. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #include "TGFrame.h"
26 
27 class TCanvas;
28 class TList;
29 class TRootEmbeddedCanvas;
30 class TStyle;
31 class TVirtualPad;
32 
33 class TStylePreview : public TGTransientFrame {
34 
35 private:
36  TRootEmbeddedCanvas *fEcan; // canvas for preview
37  TVirtualPad *fPad; // original pad previewed
38  TList *fTrashListLayout; // to avoid memory leak
39 
40 public:
41  TStylePreview(const TGWindow *p, TStyle *style, TVirtualPad *currentPad);
42  virtual ~TStylePreview();
43  void Update(TStyle *style, TVirtualPad *pad);
44  void MapTheWindow();
45  TCanvas *GetMainCanvas();
46 
47  ClassDef(TStylePreview, 0) // Preview window used by the TStyleManager class
48 };
49 
50 #endif