forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TStylePreview.h
52 lines (42 loc) · 2 KB
/
TStylePreview.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// @(#)root/ged:$Id$
// Author: Denis Favre-Miville 08/09/05
/*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TStylePreview
#define ROOT_TStylePreview
//////////////////////////////////////////////////////////////////////////
// //
// TStylePreview //
// //
// This class may be used to preview the result of applying a style //
// to a canvas. The result is shown on a clone of the object, //
// in a different shown over the initial canvas. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
class TCanvas;
class TList;
class TRootEmbeddedCanvas;
class TStyle;
class TVirtualPad;
class TStylePreview : public TGTransientFrame {
private:
TRootEmbeddedCanvas *fEcan; // canvas for preview
TVirtualPad *fPad; // original pad previewed
TList *fTrashListLayout; // to avoid memory leak
public:
TStylePreview(const TGWindow *p, TStyle *style, TVirtualPad *currentPad);
virtual ~TStylePreview();
void Update(TStyle *style, TVirtualPad *pad);
void MapTheWindow();
TCanvas *GetMainCanvas();
ClassDef(TStylePreview, 0) // Preview window used by the TStyleManager class
};
#endif