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#include "TGFrame.h"
16
17class TCanvas;
18class TList;
20class TStyle;
21class TVirtualPad;
22
24
25private:
26 TRootEmbeddedCanvas *fEcan; ///< canvas for preview
27 TVirtualPad *fPad; ///< original pad previewed
28 TList *fTrashListLayout; ///< to avoid memory leak
29
30public:
31 TStylePreview(const TGWindow *p, TStyle *style, TVirtualPad *currentPad);
32 virtual ~TStylePreview();
33 void Update(TStyle *style, TVirtualPad *pad);
34 void MapTheWindow();
36
37 ClassDef(TStylePreview, 0) // Preview window used by the TStyleManager class
38};
39
40#endif
#define ClassDef(name, id)
Definition: Rtypes.h:325
The Canvas class.
Definition: TCanvas.h:23
Defines transient windows that typically are used for dialogs windows.
Definition: TGFrame.h:499
ROOT GUI Window base class.
Definition: TGWindow.h:23
A doubly linked list.
Definition: TList.h:44
This class creates a TGCanvas in which a TCanvas is created.
This class may be used to preview the result of applying a style to a canvas.
Definition: TStylePreview.h:23
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
original pad previewed
Definition: TStylePreview.h:27
void Update(TStyle *style, TVirtualPad *pad)
Update the preview with possibly another style and another object than previously.
TList * fTrashListLayout
to avoid memory leak
Definition: TStylePreview.h:28
virtual ~TStylePreview()
Destructor.
TRootEmbeddedCanvas * fEcan
canvas for preview
Definition: TStylePreview.h:26
TStyle objects may be created to define special styles.
Definition: TStyle.h:29
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:51
TCanvas * style()
Definition: style.C:1