ROOT
6.08/07
Reference Guide
gui
gui
inc
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
#ifndef ROOT_TTime
44
#include "
TTime.h
"
45
#endif
46
#ifndef ROOT_TString
47
#include "
TString.h
"
48
#endif
49
50
class
TGTransientFrame
;
51
class
TGTextButton
;
52
class
TGTextEntry
;
53
class
TGTextBuffer
;
54
55
56
class
TGPasswdDialog
{
57
58
private
:
59
char
*
fPwdBuf
;
// buffer where to store the passwd
60
Int_t
fPwdLenMax
;
// passwd buffer length
61
TGTransientFrame
*
fDialog
;
// main frame of this widget
62
TGTextButton
*
fOk
;
// Ok button
63
TGTextEntry
*
fPasswd
;
// Password TextEntry
64
TGTextBuffer
*
fPasswdText
;
// Passwd Buffer
65
66
public
:
67
TGPasswdDialog
(
const
char
*prompt,
char
*pwdbuf,
Int_t
pwdlenmax,
68
UInt_t
w = 400,
UInt_t
h
= 400);
69
virtual
~TGPasswdDialog
();
70
71
void
ReturnPressed
();
72
73
// slots
74
void
CloseWindow
();
75
void
DoClose
();
76
77
ClassDef
(
TGPasswdDialog
,0)
// Dialog for entering passwords
78
};
79
80
#endif
TGPasswdDialog::fOk
TGTextButton * fOk
Definition:
TGPasswdDialog.h:62
TTime.h
TGTextButton
Definition:
TGButton.h:146
h
TH1 * h
Definition:
legend2.C:5
TGPasswdDialog::fPasswdText
TGTextBuffer * fPasswdText
Definition:
TGPasswdDialog.h:64
Int_t
int Int_t
Definition:
RtypesCore.h:41
TGTextEntry
Definition:
TGTextEntry.h:45
TGPasswdDialog::fDialog
TGTransientFrame * fDialog
Definition:
TGPasswdDialog.h:61
TGPasswdDialog::DoClose
void DoClose()
Handle close button.
Definition:
TGPasswdDialog.cxx:130
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TGPasswdDialog::CloseWindow
void CloseWindow()
Called when closed via window manager action.
Definition:
TGPasswdDialog.cxx:138
TGPasswdDialog::fPasswd
TGTextEntry * fPasswd
Definition:
TGPasswdDialog.h:63
TString.h
TGTransientFrame
Definition:
TGFrame.h:591
TGTextBuffer
Definition:
TGTextBuffer.h:32
UInt_t
unsigned int UInt_t
Definition:
RtypesCore.h:42
TGPasswdDialog::~TGPasswdDialog
virtual ~TGPasswdDialog()
Delete log window.
Definition:
TGPasswdDialog.cxx:121
TGPasswdDialog::TGPasswdDialog
TGPasswdDialog(const char *prompt, char *pwdbuf, Int_t pwdlenmax, UInt_t w=400, UInt_t h=400)
Create an editor in a dialog.
Definition:
TGPasswdDialog.cxx:56
TGPasswdDialog
Definition:
TGPasswdDialog.h:56
TGPasswdDialog::ReturnPressed
void ReturnPressed()
Handle return.
Definition:
TGPasswdDialog.cxx:146
TGPasswdDialog::fPwdLenMax
Int_t fPwdLenMax
Definition:
TGPasswdDialog.h:60
TGPasswdDialog::fPwdBuf
char * fPwdBuf
Definition:
TGPasswdDialog.h:59