// @(#)root/gui:$Id: TGPasswdDialog.h 23115 2008-04-10 13:35:37Z rdm $
// Author: G. Ganis  10/10/2005

/*************************************************************************
 * Copyright (C) 1995-2005, 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_TPasswdDialog
#define ROOT_TPasswdDialog


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TGPasswdDialog                                                       //
//                                                                      //
// Graphic dialog to enter passwords                                    //
//                                                                      //
// Usage:                                                               //
//                                                                      //
// {                                                                    //
//   // Buffer for the passwd                                           //
//   char pwdbuf[128]                                                   //
//                                                                      //
//   Open the dialog box                                                //
//   TGPasswdDialog dialog("My prompt", pwdbuf, 128);                   //
//                                                                      //
//   // Wait until the user is done                                     //
//   while (gROOT->IsInterrupted())                                     //
//      gSystem->DispatchOneEvent(kFALSE);                              //
//                                                                      //
//   // Password is now in pwdbuf                                       //
//   ...                                                                //
//                                                                      //
// }                                                                    //
//                                                                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TTime
#include "TTime.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif

class TGTransientFrame;
class TGTextButton;
class TGTextEntry;
class TGTextBuffer;


class TGPasswdDialog {

private:
   char             *fPwdBuf;     // buffer where to store the passwd
   Int_t             fPwdLenMax;  // passwd buffer length
   TGTransientFrame *fDialog;     // main frame of this widget
   TGTextButton     *fOk;         // Ok button
   TGTextEntry      *fPasswd;     // Password TextEntry
   TGTextBuffer     *fPasswdText; // Passwd Buffer

public:
   TGPasswdDialog(const char *prompt, char *pwdbuf, Int_t pwdlenmax,
                  UInt_t w = 400, UInt_t h = 400);
   virtual ~TGPasswdDialog();

   void   ReturnPressed();

   // slots
   void   CloseWindow();
   void   DoClose();

   ClassDef(TGPasswdDialog,0)  // Dialog for entering passwords
};

#endif

Last change: Wed Jun 25 08:42:20 2008
Last generated: 2008-06-25 08:42

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.