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