Logo ROOT  
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
47class TGTextButton;
48class TGTextEntry;
49class TGTextBuffer;
50
51
53
54private:
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
62public:
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
#define h(i)
Definition: RSha256.hxx:106
#define ClassDef(name, id)
Definition: Rtypes.h:322
TGTextButton * fOk
void ReturnPressed()
Handle return.
TGTransientFrame * fDialog
void DoClose()
Handle close button.
TGPasswdDialog(const char *prompt, char *pwdbuf, Int_t pwdlenmax, UInt_t w=400, UInt_t h=400)
Create an editor in a dialog.
TGTextEntry * fPasswd
TGTextBuffer * fPasswdText
virtual ~TGPasswdDialog()
Delete log window.
void CloseWindow()
Called when closed via window manager action.