Logo ROOT   6.10/09
Reference Guide
TGPasswdDialog.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: G. Ganis 10/10/2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, 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_TPasswdDialog
13 #define ROOT_TPasswdDialog
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGPasswdDialog //
19 // //
20 // Graphic dialog to enter passwords //
21 // //
22 // Usage: //
23 // //
24 // { //
25 // // Buffer for the passwd //
26 // char pwdbuf[128] //
27 // //
28 // Open the dialog box //
29 // TGPasswdDialog dialog("My prompt", pwdbuf, 128); //
30 // //
31 // // Wait until the user is done //
32 // while (gROOT->IsInterrupted()) //
33 // gSystem->DispatchOneEvent(kFALSE); //
34 // //
35 // // Password is now in pwdbuf //
36 // ... //
37 // //
38 // } //
39 // //
40 // //
41 //////////////////////////////////////////////////////////////////////////
42 
43 #include "TTime.h"
44 #include "TString.h"
45 
46 class TGTransientFrame;
47 class TGTextButton;
48 class TGTextEntry;
49 class TGTextBuffer;
50 
51 
53 
54 private:
55  char *fPwdBuf; // buffer where to store the passwd
56  Int_t fPwdLenMax; // passwd buffer length
57  TGTransientFrame *fDialog; // main frame of this widget
58  TGTextButton *fOk; // Ok button
59  TGTextEntry *fPasswd; // Password TextEntry
60  TGTextBuffer *fPasswdText; // Passwd Buffer
61 
62 public:
63  TGPasswdDialog(const char *prompt, char *pwdbuf, Int_t pwdlenmax,
64  UInt_t w = 400, UInt_t h = 400);
65  virtual ~TGPasswdDialog();
66 
67  void ReturnPressed();
68 
69  // slots
70  void CloseWindow();
71  void DoClose();
72 
73  ClassDef(TGPasswdDialog,0) // Dialog for entering passwords
74 };
75 
76 #endif
TGTextButton * fOk
TH1 * h
Definition: legend2.C:5
TGTextBuffer * fPasswdText
int Int_t
Definition: RtypesCore.h:41
TGTransientFrame * fDialog
void DoClose()
Handle close button.
#define ClassDef(name, id)
Definition: Rtypes.h:297
void CloseWindow()
Called when closed via window manager action.
TGTextEntry * fPasswd
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual ~TGPasswdDialog()
Delete log window.
TGPasswdDialog(const char *prompt, char *pwdbuf, Int_t pwdlenmax, UInt_t w=400, UInt_t h=400)
Create an editor in a dialog.
void ReturnPressed()
Handle return.