Logo ROOT   6.08/07
Reference Guide
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 #ifndef ROOT_TGFrame
26 #include "TGFrame.h"
27 #endif
28 
29 class TCanvas;
30 class TList;
32 class TStyle;
33 class TVirtualPad;
34 
36 
37 private:
38  TRootEmbeddedCanvas *fEcan; // canvas for preview
39  TVirtualPad *fPad; // original pad previewed
40  TList *fTrashListLayout; // to avoid memory leak
41 
42 public:
43  TStylePreview(const TGWindow *p, TStyle *style, TVirtualPad *currentPad);
44  virtual ~TStylePreview();
45  void Update(TStyle *style, TVirtualPad *pad);
46  void MapTheWindow();
48 
49  ClassDef(TStylePreview, 0) // Preview window used by the TStyleManager class
50 };
51 
52 #endif
TStylePreview(const TGWindow *p, TStyle *style, TVirtualPad *currentPad)
Constructor.
void MapTheWindow()
Initialize the layout algorithm.
void Update(TStyle *style, TVirtualPad *pad)
Update the preview with possibly another style and another object than previously.
#define ClassDef(name, id)
Definition: Rtypes.h:254
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:59
A doubly linked list.
Definition: TList.h:47
TRootEmbeddedCanvas * fEcan
Definition: TStylePreview.h:38
TCanvas * GetMainCanvas()
Return pointer to the selected canvas.
TStyle objects may be created to define special styles.
Definition: TStyle.h:43
virtual ~TStylePreview()
Destructor.
The Canvas class.
Definition: TCanvas.h:41
TCanvas * style()
Definition: style.C:1
TList * fTrashListLayout
Definition: TStylePreview.h:40
TVirtualPad * fPad
Definition: TStylePreview.h:39