MGUI::CTRL_EDIT_URL Class Reference

Control for allowing user to edit a "URL". More...

#include <mgui/editurl.h>

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

List of all members.

Public Member Functions

 CTRL_EDIT_URL (bool AddHTTP=true)
virtual ~CTRL_EDIT_URL ()
void AddProtocol (const char *protocol)
void ClearValue (bool notify=true)
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, int width=0, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedHeight)
const MISTRINGGetValue ()
void IniRead (INIHANDLE IniHandle, const char *IniGroup, const char *IniField, bool notify=true)
void IniWrite (INIHANDLE IniHandle, const char *IniGroup, const char *IniField) const
void SetValue (const MIUNICODE *string, bool notify=true)

Detailed Description

Control for allowing user to edit a "URL".

Provides for matching against specified list of protocols (eg "http"), as well as prefixing a default protocol if user does not enter one. Also provides error reporting if user enters unrecognized/nonallowed protocol.


Constructor & Destructor Documentation

MGUI::CTRL_EDIT_URL::CTRL_EDIT_URL ( bool  AddHTTP = true  ) 

Constructor.

Parameters:
AddHTTP Include "http" and "https" protocols by default.
virtual MGUI::CTRL_EDIT_URL::~CTRL_EDIT_URL (  )  [virtual]

Destructor.


Member Function Documentation

void MGUI::CTRL_EDIT_URL::AddProtocol ( const char *  protocol  ) 

Add protocol to validation list.

The first added protocol (or "http" if defaults used) will be the default if not specified by user.

Parameters:
protocol Protocol, eg "http", "https", "ftp", etc, not including "://"
void MGUI::CTRL_EDIT_URL::ClearValue ( bool  notify = true  ) 

Clear to empty string.

Parameters:
notify Call OnChangeValue() if control has already been created
void MGUI::CTRL_EDIT_URL::Create ( MGUI::LAYOUT_PANE_BASE ParentPane,
int  width = 0,
MGUI::LAYOUT_SIZEALIGN  sizealign = MGUI::LAYOUT_SIZEALIGN_FixedHeight 
)

Create control.

Parameters:
ParentPane Parent pane
width Width in 'typical' characters, minimum if can expand based on sizealign
const MISTRING& MGUI::CTRL_EDIT_URL::GetValue (  ) 

Get current string value.

void MGUI::CTRL_EDIT_URL::IniRead ( INIHANDLE  IniHandle,
const char *  IniGroup,
const char *  IniField,
bool  notify = true 
)

Read value from INI file.

If Create() has already been performed the control's state will be updated.

Parameters:
IniHandle Handle to INI file to read from, 0 for default
IniGroup INI group to read from
IniField INI field to read from
notify Call OnChangeValue() if control has already been created
void MGUI::CTRL_EDIT_URL::IniWrite ( INIHANDLE  IniHandle,
const char *  IniGroup,
const char *  IniField 
) const

Write current value to INI file.

Parameters:
IniHandle Handle to INI file to read from, 0 for default
IniGroup INI group to read from
IniField INI field to read from
void MGUI::CTRL_EDIT_URL::SetValue ( const MIUNICODE string,
bool  notify = true 
)

Set current string value with validation.

OnValidate() will be called and if valid, the string will be updated. No comparison is made with the current string value.

Parameters:
string New string to set
notify Call OnChangeValue() if string actually updated

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

Generated on Sun Oct 7 21:35:33 2012 for TNTsdk 2012 by  doxygen 1.6.1