MGUI::FORM_PASSWORD Class Reference

User Name and Password entry form with optional label description and validate password fields. More...

#include <mgui/formpassword.h>

Inheritance diagram for MGUI::FORM_PASSWORD:
Inheritance graph
[legend]

List of all members.

Public Types

enum  FLAGS { FLAG_Default = 0x0000, FLAG_ValidatePassword = 0x0001, FLAG_RememberPassword = 0x0002, FLAG_NoUserName = 0x0004 }

Public Member Functions

 FORM_PASSWORD ()
virtual ~FORM_PASSWORD ()
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const MISTRING &Description, FLAGS flags=FLAG_Default, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedHeight)
bool DoRememberPassword () const
void GetBasicAuthString (MISTRING &AuthString)
const MISTRINGGetPassword ()
const MISTRINGGetUserName ()
void SetDelegateOnComplete (FastDelegate< void(bool)> delegate)
void SetDelegateOnValidateUserName (FastDelegate< bool(const MISTRING &)> delegate)
void SetFocusToName ()
void SetUserName (const MISTRING &UserName)

Detailed Description

User Name and Password entry form with optional label description and validate password fields.


Member Enumeration Documentation

Enumerator:
FLAG_Default 
FLAG_ValidatePassword 

Adds extra field to re-enter password to validate against original password.

FLAG_RememberPassword 

Adds toggle button "Remember this password for future use". Cannot be used with FLAG_ValidatePassword.

FLAG_NoUserName 

No user name prompt, just a password.


Constructor & Destructor Documentation

MGUI::FORM_PASSWORD::FORM_PASSWORD (  ) 

Constructor.

virtual MGUI::FORM_PASSWORD::~FORM_PASSWORD (  )  [virtual]

Destructor.


Member Function Documentation

void MGUI::FORM_PASSWORD::Create ( MGUI::LAYOUT_PANE_BASE ParentPane,
const MISTRING Description,
FLAGS  flags = FLAG_Default,
MGUI::LAYOUT_SIZEALIGN  sizealign = MGUI::LAYOUT_SIZEALIGN_FixedHeight 
)

Create form with label from resource lookup.

Parameters:
ParentPane Parent pane
Description String to be placed above User Name and Password, empty if none wanted. Eg: HTTP Realm string
bool MGUI::FORM_PASSWORD::DoRememberPassword (  )  const

Determine if the user wants us to remember the password for future use.

It is up to the calling code to 'remember' the password. This method can only return true if the FLAG_RememberPassword is used.

Returns:
'True' to remember the password, 'false' if not.
void MGUI::FORM_PASSWORD::GetBasicAuthString ( MISTRING AuthString  ) 

Get HTTP Basic Authentication string Does not include: "Authorization: Basic" part.

const MISTRING& MGUI::FORM_PASSWORD::GetPassword (  ) 

Get password entered If you make a copy of the password, you need to make sure to clean up properly.

const MISTRING& MGUI::FORM_PASSWORD::GetUserName (  ) 

Get user name entered.

void MGUI::FORM_PASSWORD::SetDelegateOnComplete ( FastDelegate< void(bool)>  delegate  )  [inline]

Set delegate to call to get notified on any descriptor changes.

void MGUI::FORM_PASSWORD::SetDelegateOnValidateUserName ( FastDelegate< bool(const MISTRING &)>  delegate  )  [inline]

Set delegate to call to validate user name.

This delegate is called only if the FLAG_ValidatePassword is used. This delegate can be used to enforce a unique user name

void MGUI::FORM_PASSWORD::SetFocusToName (  ) 

Sets the focus to the name prompt Note: if the form was created with FLAG_NoUserName, this will actually set the focus to the password form.

void MGUI::FORM_PASSWORD::SetUserName ( const MISTRING UserName  ) 

Set the UserName to a value.


The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:36:04 2012 for TNTsdk 2012 by  doxygen 1.6.1