TGPasswdDialog.h

Go to the documentation of this file.
00001 // @(#)root/gui:$Id: TGPasswdDialog.h 23115 2008-04-10 13:35:37Z rdm $
00002 // Author: G. Ganis  10/10/2005
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2005, 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_TPasswdDialog
00013 #define ROOT_TPasswdDialog
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TGPasswdDialog                                                       //
00019 //                                                                      //
00020 // Graphic dialog to enter passwords                                    //
00021 //                                                                      //
00022 // Usage:                                                               //
00023 //                                                                      //
00024 // {                                                                    //
00025 //   // Buffer for the passwd                                           //
00026 //   char pwdbuf[128]                                                   //
00027 //                                                                      //
00028 //   Open the dialog box                                                //
00029 //   TGPasswdDialog dialog("My prompt", pwdbuf, 128);                   //
00030 //                                                                      //
00031 //   // Wait until the user is done                                     //
00032 //   while (gROOT->IsInterrupted())                                     //
00033 //      gSystem->DispatchOneEvent(kFALSE);                              //
00034 //                                                                      //
00035 //   // Password is now in pwdbuf                                       //
00036 //   ...                                                                //
00037 //                                                                      //
00038 // }                                                                    //
00039 //                                                                      //
00040 //                                                                      //
00041 //////////////////////////////////////////////////////////////////////////
00042 
00043 #ifndef ROOT_TTime
00044 #include "TTime.h"
00045 #endif
00046 #ifndef ROOT_TString
00047 #include "TString.h"
00048 #endif
00049 
00050 class TGTransientFrame;
00051 class TGTextButton;
00052 class TGTextEntry;
00053 class TGTextBuffer;
00054 
00055 
00056 class TGPasswdDialog {
00057 
00058 private:
00059    char             *fPwdBuf;     // buffer where to store the passwd
00060    Int_t             fPwdLenMax;  // passwd buffer length
00061    TGTransientFrame *fDialog;     // main frame of this widget
00062    TGTextButton     *fOk;         // Ok button
00063    TGTextEntry      *fPasswd;     // Password TextEntry
00064    TGTextBuffer     *fPasswdText; // Passwd Buffer
00065 
00066 public:
00067    TGPasswdDialog(const char *prompt, char *pwdbuf, Int_t pwdlenmax,
00068                   UInt_t w = 400, UInt_t h = 400);
00069    virtual ~TGPasswdDialog();
00070 
00071    void   ReturnPressed();
00072 
00073    // slots
00074    void   CloseWindow();
00075    void   DoClose();
00076 
00077    ClassDef(TGPasswdDialog,0)  // Dialog for entering passwords
00078 };
00079 
00080 #endif

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