ToolMap
Loading...
Searching...
No Matches
tmvalidator.h
1/***************************************************************************
2 tmvalidator.h
3 Create various validator
4 -------------------
5 copyright : (C) 2007 CREALP Lucien Schreiber
6 ***************************************************************************/
7
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17#ifndef _TMVALIDATOR_H_
18#define _TMVALIDATOR_H_
19
20// For compilers that support precompilation, includes "wx/wx.h".
21#include <wx/wxprec.h>
22
23// Include wxWidgets' headers
24#ifndef WX_PRECOMP
25#include <wx/wx.h>
26#endif
27
28#define tmFILTER_EXCLUDE_CHAR_RESTRICTED 0x0100
29#define tmFILTER_EXCLUDE_CHAR_DATABASE 0x0200
30#define tmFILTER_EXCLUDE_CHAR_NUMERIC_STRICT 0x0400
31#define tmFILTER_EXCLUDE_CHAR_COMPLEX 0x0800
32
33/***************************************************************************/
46class tmValidator : public wxTextValidator {
47 private:
48 void SetCharRestricted();
49
50 void SetCharDataBase();
51
52 void SetCharNumericStric();
53
54 void GetAlphaList(wxArrayString& mylist);
55
56 void GetStrictNumList(wxArrayString& mylist);
57
58 void GetComplexList(wxArrayString& mylist);
59
60 bool SetEnhancedStyle(long style);
61
62 void GetExcludeChars(wxArrayString& mylist);
63
64 public:
65 tmValidator(long style = wxFILTER_NONE);
66};
67
68#endif
Validator for text controls.
Definition tmvalidator.h:46