Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TStyleDialog.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_TStyleDialog
13 #define ROOT_TStyleDialog
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TStyleDialog //
18 // //
19 // This small class is useful to ask the user for a name and a title, //
20 // in order to rename a style, create a new style or import a //
21 // style from a canvas. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #include "TGFrame.h"
26 
27 class TGLabel;
28 class TGTextButton;
29 class TGTextEntry;
30 class TGTransientFrame;
31 class TList;
32 class TStyle;
33 class TStyleManager;
34 class TVirtualPad;
35 
36 class TStyleDialog : public TGTransientFrame {
37 
38 private:
39  TStyleManager *fStyleManager; // parent style manager
40  TGTextEntry *fName; // TStyle name text entry
41  TGLabel *fNameLabel; // name label
42  TGTextEntry *fTitle; // TStyle title text entry
43  TGLabel *fTitleLabel; // title label
44  TGLabel *fWarnLabel; // label for warnings
45  TGTextButton *fOK; // save button
46  TGTextButton *fCancel; // cancel button
47  TStyle *fCurStyle; // style to copy or to rename
48  Int_t fMode; // 1=new, 2=rename, 3=import
49  TVirtualPad *fCurPad; // current pad from which to import
50  TList *fTrashListFrame; // to avoid memory leak
51  TList *fTrashListLayout; // to avoid memory leak
52 
53 public:
54  TStyleDialog(TStyleManager *sm, TStyle *cur, Int_t mode,
55  TVirtualPad *currentPad = 0);
56  virtual ~TStyleDialog();
57 
58  void DoCloseWindow(); // SLOT
59  void DoCancel(); // SLOT
60  void DoOK(); // SLOT
61  void DoUpdate(); // SLOT
62 
63  ClassDef(TStyleDialog, 0) // Dialog box used by the TStyleManager class
64 };
65 
66 #endif