Public Member Functions | Protected Attributes | List of all members
sf::ui::AlphaTextFieldModel Class Reference

A textfield model that allows only letters

. More...

#include <AlphaTextFieldModel.hpp>

Inheritance diagram for sf::ui::AlphaTextFieldModel:
sf::ui::WhitelistTextFieldModel sf::ui::TextFieldModel

Public Member Functions

 AlphaTextFieldModel ()
 An alphabetic text field model that allows only character in range 'A' - 'Z' and 'a' - 'z'. More...
 
virtual bool isCharAllowed (sf::Uint32 c) const
 
void addCharAllowed (sf::Uint32 c)
 Add a character to the whitelist. More...
 
void rmCharAllowed (sf::Uint32 c)
 Remove a character to the whitelist. More...
 
std::vector< sf::Uint32 > getCharsAllowed () const
 

Protected Attributes

std::set< sf::Uint32 > m_whitelist
 

Detailed Description

A textfield model that allows only letters

.

Definition at line 28 of file AlphaTextFieldModel.hpp.

Constructor & Destructor Documentation

sf::ui::AlphaTextFieldModel::AlphaTextFieldModel ( )

An alphabetic text field model that allows only character in range 'A' - 'Z' and 'a' - 'z'.

Member Function Documentation

void sf::ui::WhitelistTextFieldModel::addCharAllowed ( sf::Uint32  c)
inherited

Add a character to the whitelist.

Parameters
cthe character to allow
std::vector<sf::Uint32> sf::ui::WhitelistTextFieldModel::getCharsAllowed ( ) const
inherited
Returns
all of the chars whitelisted
virtual bool sf::ui::WhitelistTextFieldModel::isCharAllowed ( sf::Uint32  c) const
virtualinherited
Returns
if the given character is allowed for the text field
Parameters
cthe character to check

Implements sf::ui::TextFieldModel.

void sf::ui::WhitelistTextFieldModel::rmCharAllowed ( sf::Uint32  c)
inherited

Remove a character to the whitelist.

Parameters
cthe character to disallow

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