ROOT logo
// @(#)root/ged:$Id: TStyleDialog.h,v 1.0 2005/09/08
// 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_TStyleDialog
#define ROOT_TStyleDialog

//////////////////////////////////////////////////////////////////////////
//                                                                      //
//  TStyleDialog                                                        //
//                                                                      //
//  This small class is useful to ask the user for a name and a title,  //
//       in order to rename a style, create a new style or import a     //
//       style from a canvas.                                           //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif

class TGLabel;
class TGTextButton;
class TGTextEntry;
class TGTransientFrame;
class TList;
class TStyle;
class TStyleManager;
class TVirtualPad;

class TStyleDialog : public TGTransientFrame {

private:
   TStyleManager       *fStyleManager;    // parent style manager
   TGTextEntry         *fName;            // TStyle name text entry
   TGLabel             *fNameLabel;       // name label
   TGTextEntry         *fTitle;           // TStyle title text entry
   TGLabel             *fTitleLabel;      // title label
   TGLabel             *fWarnLabel;       // label for warnings
   TGTextButton        *fOK;              // save button
   TGTextButton        *fCancel;          // cancel button
   TStyle              *fCurStyle;        // style to copy or to rename
   Int_t                fMode;            // 1=new, 2=rename, 3=import
   TVirtualPad         *fCurPad;          // current pad from which to import
   TList               *fTrashListFrame;  // to avoid memory leak
   TList               *fTrashListLayout; // to avoid memory leak

public:
   TStyleDialog(TStyleManager *sm, TStyle *cur, Int_t mode,
                  TVirtualPad *currentPad = 0);
   virtual ~TStyleDialog();

   void DoCloseWindow();                  // SLOT
   void DoCancel();                       // SLOT
   void DoOK();                           // SLOT
   void DoUpdate();                       // SLOT

   ClassDef(TStyleDialog, 0) // Dialog box used by the TStyleManager class
};

#endif
 TStyleDialog.h:1
 TStyleDialog.h:2
 TStyleDialog.h:3
 TStyleDialog.h:4
 TStyleDialog.h:5
 TStyleDialog.h:6
 TStyleDialog.h:7
 TStyleDialog.h:8
 TStyleDialog.h:9
 TStyleDialog.h:10
 TStyleDialog.h:11
 TStyleDialog.h:12
 TStyleDialog.h:13
 TStyleDialog.h:14
 TStyleDialog.h:15
 TStyleDialog.h:16
 TStyleDialog.h:17
 TStyleDialog.h:18
 TStyleDialog.h:19
 TStyleDialog.h:20
 TStyleDialog.h:21
 TStyleDialog.h:22
 TStyleDialog.h:23
 TStyleDialog.h:24
 TStyleDialog.h:25
 TStyleDialog.h:26
 TStyleDialog.h:27
 TStyleDialog.h:28
 TStyleDialog.h:29
 TStyleDialog.h:30
 TStyleDialog.h:31
 TStyleDialog.h:32
 TStyleDialog.h:33
 TStyleDialog.h:34
 TStyleDialog.h:35
 TStyleDialog.h:36
 TStyleDialog.h:37
 TStyleDialog.h:38
 TStyleDialog.h:39
 TStyleDialog.h:40
 TStyleDialog.h:41
 TStyleDialog.h:42
 TStyleDialog.h:43
 TStyleDialog.h:44
 TStyleDialog.h:45
 TStyleDialog.h:46
 TStyleDialog.h:47
 TStyleDialog.h:48
 TStyleDialog.h:49
 TStyleDialog.h:50
 TStyleDialog.h:51
 TStyleDialog.h:52
 TStyleDialog.h:53
 TStyleDialog.h:54
 TStyleDialog.h:55
 TStyleDialog.h:56
 TStyleDialog.h:57
 TStyleDialog.h:58
 TStyleDialog.h:59
 TStyleDialog.h:60
 TStyleDialog.h:61
 TStyleDialog.h:62
 TStyleDialog.h:63
 TStyleDialog.h:64
 TStyleDialog.h:65
 TStyleDialog.h:66
 TStyleDialog.h:67
 TStyleDialog.h:68