TStyleDialog.h

Go to the documentation of this file.
00001 // @(#)root/ged:$Id: TStyleDialog.h,v 1.0 2005/09/08
00002 // Author: Denis Favre-Miville   08/09/05
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TStyleDialog
00013 #define ROOT_TStyleDialog
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 //  TStyleDialog                                                        //
00018 //                                                                      //
00019 //  This small class is useful to ask the user for a name and a title,  //
00020 //       in order to rename a style, create a new style or import a     //
00021 //       style from a canvas.                                           //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_TGFrame
00026 #include "TGFrame.h"
00027 #endif
00028 
00029 class TGLabel;
00030 class TGTextButton;
00031 class TGTextEntry;
00032 class TGTransientFrame;
00033 class TList;
00034 class TStyle;
00035 class TStyleManager;
00036 class TVirtualPad;
00037 
00038 class TStyleDialog : public TGTransientFrame {
00039 
00040 private:
00041    TStyleManager       *fStyleManager;    // parent style manager
00042    TGTextEntry         *fName;            // TStyle name text entry
00043    TGLabel             *fNameLabel;       // name label
00044    TGTextEntry         *fTitle;           // TStyle title text entry
00045    TGLabel             *fTitleLabel;      // title label
00046    TGLabel             *fWarnLabel;       // label for warnings
00047    TGTextButton        *fOK;              // save button
00048    TGTextButton        *fCancel;          // cancel button
00049    TStyle              *fCurStyle;        // style to copy or to rename
00050    Int_t                fMode;            // 1=new, 2=rename, 3=import
00051    TVirtualPad         *fCurPad;          // current pad from which to import
00052    TList               *fTrashListFrame;  // to avoid memory leak
00053    TList               *fTrashListLayout; // to avoid memory leak
00054 
00055 public:
00056    TStyleDialog(TStyleManager *sm, TStyle *cur, Int_t mode,
00057                   TVirtualPad *currentPad = 0);
00058    virtual ~TStyleDialog();
00059 
00060    void DoCloseWindow();                  // SLOT
00061    void DoCancel();                       // SLOT
00062    void DoOK();                           // SLOT
00063    void DoUpdate();                       // SLOT
00064 
00065    ClassDef(TStyleDialog, 0) // Dialog box used by the TStyleManager class
00066 };
00067 
00068 #endif

Generated on Tue Jul 5 14:19:27 2011 for ROOT_528-00b_version by  doxygen 1.5.1