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

A textfield model that denies some chars

. More...

#include <BlacklistTextFieldModel.hpp>

Inheritance diagram for sf::ui::BlacklistTextFieldModel:
sf::ui::TextFieldModel sf::ui::DefaultTextFieldModel

Public Member Functions

 BlacklistTextFieldModel ()
 Creates a text field model that denies character present in the blacklist Notice that the blacklist is empty in this class. More...
 
virtual bool isCharAllowed (sf::Uint32 c) const
 
void addCharDenied (sf::Uint32 c)
 Add a character to the blacklist. More...
 
void rmCharDenied (sf::Uint32 c)
 Removes a character to the blacklist. More...
 
std::vector< sf::Uint32 > getCharsDenied () const
 

Protected Attributes

std::set< sf::Uint32 > m_blacklist
 

Detailed Description

A textfield model that denies some chars

.

Definition at line 30 of file BlacklistTextFieldModel.hpp.

Constructor & Destructor Documentation

sf::ui::BlacklistTextFieldModel::BlacklistTextFieldModel ( )

Creates a text field model that denies character present in the blacklist Notice that the blacklist is empty in this class.

Member Function Documentation

void sf::ui::BlacklistTextFieldModel::addCharDenied ( sf::Uint32  c)

Add a character to the blacklist.

Parameters
cthe character to deny
std::vector<sf::Uint32> sf::ui::BlacklistTextFieldModel::getCharsDenied ( ) const
Returns
all of the chars blacklisted
virtual bool sf::ui::BlacklistTextFieldModel::isCharAllowed ( sf::Uint32  c) const
virtual
Returns
if the given character is allowed for the text field
Parameters
cthe character to check

Implements sf::ui::TextFieldModel.

void sf::ui::BlacklistTextFieldModel::rmCharDenied ( sf::Uint32  c)

Removes a character to the blacklist.

Parameters
cthe character to allow

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