ROOT  6.06/09
Reference Guide
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 #ifndef ROOT_TGFrame
26 #include "TGFrame.h"
27 #endif
28 
29 class TGLabel;
30 class TGTextButton;
31 class TGTextEntry;
32 class TGTransientFrame;
33 class TList;
34 class TStyle;
35 class TStyleManager;
36 class TVirtualPad;
37 
39 
40 private:
41  TStyleManager *fStyleManager; // parent style manager
42  TGTextEntry *fName; // TStyle name text entry
43  TGLabel *fNameLabel; // name label
44  TGTextEntry *fTitle; // TStyle title text entry
45  TGLabel *fTitleLabel; // title label
46  TGLabel *fWarnLabel; // label for warnings
47  TGTextButton *fOK; // save button
48  TGTextButton *fCancel; // cancel button
49  TStyle *fCurStyle; // style to copy or to rename
50  Int_t fMode; // 1=new, 2=rename, 3=import
51  TVirtualPad *fCurPad; // current pad from which to import
52  TList *fTrashListFrame; // to avoid memory leak
53  TList *fTrashListLayout; // to avoid memory leak
54 
55 public:
56  TStyleDialog(TStyleManager *sm, TStyle *cur, Int_t mode,
57  TVirtualPad *currentPad = 0);
58  virtual ~TStyleDialog();
59 
60  void DoCloseWindow(); // SLOT
61  void DoCancel(); // SLOT
62  void DoOK(); // SLOT
63  void DoUpdate(); // SLOT
64 
65  ClassDef(TStyleDialog, 0) // Dialog box used by the TStyleManager class
66 };
67 
68 #endif
void DoOK()
Slot called when the OK button is clicked.
TGLabel * fTitleLabel
Definition: TStyleDialog.h:45
TGLabel * fWarnLabel
Definition: TStyleDialog.h:46
TGTextEntry * fName
Definition: TStyleDialog.h:42
TStyleDialog(TStyleManager *sm, TStyle *cur, Int_t mode, TVirtualPad *currentPad=0)
Constructor.
int Int_t
Definition: RtypesCore.h:41
TVirtualPad * fCurPad
Definition: TStyleDialog.h:51
TList * fTrashListFrame
Definition: TStyleDialog.h:52
TGLabel * fNameLabel
Definition: TStyleDialog.h:43
void DoCancel()
Slot called when the Cancel button is clicked.
#define ClassDef(name, id)
Definition: Rtypes.h:254
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:59
A doubly linked list.
Definition: TList.h:47
TStyle objects may be created to define special styles.
Definition: TStyle.h:52
TStyleManager * fStyleManager
Definition: TStyleDialog.h:41
TStyle * fCurStyle
Definition: TStyleDialog.h:49
virtual ~TStyleDialog()
Destructor.
void DoUpdate()
Slot called every time the name is changed.
TGTextButton * fCancel
Definition: TStyleDialog.h:48
void DoCloseWindow()
Slot called when the window is closed via the window manager.
TList * fTrashListLayout
Definition: TStyleDialog.h:53
TGTextButton * fOK
Definition: TStyleDialog.h:47
TGTextEntry * fTitle
Definition: TStyleDialog.h:44