ROOT
6.10/09
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
#include "
TTime.h
"
44
#include "
TString.h
"
45
46
class
TGTransientFrame
;
47
class
TGTextButton
;
48
class
TGTextEntry
;
49
class
TGTextBuffer
;
50
51
52
class
TGPasswdDialog
{
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
TGPasswdDialog::fOk
TGTextButton * fOk
Definition:
TGPasswdDialog.h:58
TTime.h
TGTextButton
Definition:
TGButton.h:142
h
TH1 * h
Definition:
legend2.C:5
TGPasswdDialog::fPasswdText
TGTextBuffer * fPasswdText
Definition:
TGPasswdDialog.h:60
Int_t
int Int_t
Definition:
RtypesCore.h:41
TGTextEntry
Definition:
TGTextEntry.h:39
TGPasswdDialog::fDialog
TGTransientFrame * fDialog
Definition:
TGPasswdDialog.h:57
TGPasswdDialog::DoClose
void DoClose()
Handle close button.
Definition:
TGPasswdDialog.cxx:130
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:297
TGPasswdDialog::CloseWindow
void CloseWindow()
Called when closed via window manager action.
Definition:
TGPasswdDialog.cxx:138
TGPasswdDialog::fPasswd
TGTextEntry * fPasswd
Definition:
TGPasswdDialog.h:59
TString.h
TGTransientFrame
Definition:
TGFrame.h:575
TGTextBuffer
Definition:
TGTextBuffer.h:30
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:52
TGPasswdDialog::ReturnPressed
void ReturnPressed()
Handle return.
Definition:
TGPasswdDialog.cxx:146
TGPasswdDialog::fPwdLenMax
Int_t fPwdLenMax
Definition:
TGPasswdDialog.h:56
TGPasswdDialog::fPwdBuf
char * fPwdBuf
Definition:
TGPasswdDialog.h:55