|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
An input filter for a TextEditor that limits the length of text and/or the characters that it may contain. More...
#include "juce_TextEditor.h"
Public Member Functions | |
| LengthAndCharacterRestriction (int maxNumChars, const String &allowedCharacters) | |
| Creates a filter that limits the length of text, and/or the characters that it can contain. | |
| String | filterNewText (TextEditor &, const String &) override |
| This method is called whenever text is entered into the editor. | |
An input filter for a TextEditor that limits the length of text and/or the characters that it may contain.
Definition at line 635 of file juce_TextEditor.h.
| juce::TextEditor::LengthAndCharacterRestriction::LengthAndCharacterRestriction | ( | int | maxNumChars, |
| const String & | allowedCharacters | ||
| ) |
Creates a filter that limits the length of text, and/or the characters that it can contain.
| maxNumChars | if this is > 0, it sets a maximum length limit; if <= 0, no limit is set |
| allowedCharacters | if this is non-empty, then only characters that occur in this string are allowed to be entered into the editor. |
Definition at line 1176 of file juce_TextEditor.cpp.
|
overridevirtual |
This method is called whenever text is entered into the editor.
An implementation of this class should should check the input string, and return an edited version of it that should be used.
Implements juce::TextEditor::InputFilter.
Definition at line 1181 of file juce_TextEditor.cpp.