Logo ROOT   6.10/09
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 #include "TGFrame.h"
26 
27 class TCanvas;
28 class TList;
30 class TStyle;
31 class TVirtualPad;
32 
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();
46 
47  ClassDef(TStylePreview, 0) // Preview window used by the TStyleManager class
48 };
49 
50 #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:297
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:49
A doubly linked list.
Definition: TList.h:43
TRootEmbeddedCanvas * fEcan
Definition: TStylePreview.h:36
TCanvas * GetMainCanvas()
Return pointer to the selected canvas.
TStyle objects may be created to define special styles.
Definition: TStyle.h:27
virtual ~TStylePreview()
Destructor.
The Canvas class.
Definition: TCanvas.h:31
TCanvas * style()
Definition: style.C:1
TList * fTrashListLayout
Definition: TStylePreview.h:38
TVirtualPad * fPad
Definition: TStylePreview.h:37