Logo ROOT   6.12/07
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 #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 
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
void DoOK()
Slot called when the OK button is clicked.
TGLabel * fTitleLabel
Definition: TStyleDialog.h:43
TGLabel * fWarnLabel
Definition: TStyleDialog.h:44
TGTextEntry * fName
Definition: TStyleDialog.h:40
TStyleDialog(TStyleManager *sm, TStyle *cur, Int_t mode, TVirtualPad *currentPad=0)
Constructor.
int Int_t
Definition: RtypesCore.h:41
TVirtualPad * fCurPad
Definition: TStyleDialog.h:49
TList * fTrashListFrame
Definition: TStyleDialog.h:50
TGLabel * fNameLabel
Definition: TStyleDialog.h:41
void DoCancel()
Slot called when the Cancel button is clicked.
#define ClassDef(name, id)
Definition: Rtypes.h:320
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:49
A doubly linked list.
Definition: TList.h:44
TStyle objects may be created to define special styles.
Definition: TStyle.h:27
TStyleManager * fStyleManager
Definition: TStyleDialog.h:39
TStyle * fCurStyle
Definition: TStyleDialog.h:47
virtual ~TStyleDialog()
Destructor.
void DoUpdate()
Slot called every time the name is changed.
TGTextButton * fCancel
Definition: TStyleDialog.h:46
void DoCloseWindow()
Slot called when the window is closed via the window manager.
TList * fTrashListLayout
Definition: TStyleDialog.h:51
TGTextButton * fOK
Definition: TStyleDialog.h:45
TGTextEntry * fTitle
Definition: TStyleDialog.h:42