Logo ROOT  
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
27class TCanvas;
28class TList;
30class TStyle;
31class TVirtualPad;
32
34
35private:
36 TRootEmbeddedCanvas *fEcan; // canvas for preview
37 TVirtualPad *fPad; // original pad previewed
38 TList *fTrashListLayout; // to avoid memory leak
39
40public:
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
#define ClassDef(name, id)
Definition: Rtypes.h:326
The Canvas class.
Definition: TCanvas.h:31
A doubly linked list.
Definition: TList.h:44
TStylePreview(const TGWindow *p, TStyle *style, TVirtualPad *currentPad)
Constructor.
TCanvas * GetMainCanvas()
Return pointer to the selected canvas.
void MapTheWindow()
Initialize the layout algorithm.
TVirtualPad * fPad
Definition: TStylePreview.h:37
void Update(TStyle *style, TVirtualPad *pad)
Update the preview with possibly another style and another object than previously.
TList * fTrashListLayout
Definition: TStylePreview.h:38
virtual ~TStylePreview()
Destructor.
TRootEmbeddedCanvas * fEcan
Definition: TStylePreview.h:36
TStyle objects may be created to define special styles.
Definition: TStyle.h:27
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:50
TCanvas * style()
Definition: style.C:1