Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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_TGPasswdDialog
13#define ROOT_TGPasswdDialog
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 "Rtypes.h"
44
46class TGTextButton;
47class TGTextEntry;
48class TGTextBuffer;
49
50
52
53private:
54 char *fPwdBuf; // buffer where to store the passwd
55 Int_t fPwdLenMax; // passwd buffer length
56 TGTransientFrame *fDialog; // main frame of this widget
57 TGTextButton *fOk; // Ok button
58 TGTextEntry *fPasswd; // Password TextEntry
59 TGTextBuffer *fPasswdText; // Passwd Buffer
60
61public:
62 TGPasswdDialog(const char *prompt, char *pwdbuf, Int_t pwdlenmax,
63 UInt_t w = 400, UInt_t h = 400);
64 virtual ~TGPasswdDialog();
65
66 void ReturnPressed();
67
68 // slots
69 void CloseWindow();
70 void DoClose();
71
72 ClassDef(TGPasswdDialog,0) // Dialog for entering passwords
73};
74
75#endif
#define h(i)
Definition RSha256.hxx:106
#define ClassDef(name, id)
Definition Rtypes.h:325
TGTextButton * fOk
void ReturnPressed()
Handle return.
TGTransientFrame * fDialog
void DoClose()
Handle close button.
TGTextEntry * fPasswd
TGTextBuffer * fPasswdText
virtual ~TGPasswdDialog()
Delete log window.
void CloseWindow()
Called when closed via window manager action.