* szErrMsg)
45: wxTextValidator(wxFILTER_INCLUDE_CHAR_LIST)
56 m_ErrMsg.Printf(
wxT(
"Please enter number between %ld and %ld."),
59 m_ErrMsg.Printf(
wxT(
"Please enter number greater or equal then %ld."),
62 m_ErrMsg.Printf(
wxT(
"Please enter number less or equal then %ld."),
66 static constwxChar*
chars[] =
69 int n=
sizeof(
chars) /
sizeof(wxChar*);
71wxArrayString valid_chars(
n,
chars);
72SetIncludes(valid_chars);
83wxTextValidator::Copy(
val);
93wxCHECK_MSG( m_validatorWindow,
false,
94 wxT(
"No window associated with validator") );
95wxCHECK_MSG( m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)),
false,
96 wxT(
"CNumberValidator is only for wxTextCtrl's") );
98 wxT(
"Invalid number range in CNumberValidator") );
112wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;
114control->ChangeValue(s);
129wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;
130control->GetValue().ToLong(
m_ValPtr);
141wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;
144 if( !control->IsEnabled() )
147 if(!wxTextValidator::Validate(parent))
154wxMessageBox(
m_ErrMsg,
wxT(
"Input is not valid"), wxOK | wxICON_ERROR, parent);
155control->SetSelection(-1,-1);
163 const char* szErrMsg)
183wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;
184wxString s = wxEmptyString;
188control->ChangeValue(s);
200wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;
203 if( !control->IsEnabled() )
206 if(!wxTextValidator::Validate(parent))
209wxString
str= control->GetValue();
210 if(
str.IsEmpty()) {
217wxMessageBox(
m_ErrMsg,
wxT(
"Input is not valid"), wxOK | wxICON_ERROR, parent);
218control->SetSelection(-1,-1);
CNumberOrBlankValidator(long *val_ptr, long minVal=numeric_limits< long >::min(), long maxVal=numeric_limits< long >::max(), const char *szErrMsg=0)
virtual bool TransferToWindow()
virtual bool Validate(wxWindow *parent)
CNumberValidator(long *val_ptr, long minVal=numeric_limits< long >::min(), long maxVal=numeric_limits< long >::max(), const char *szErrMsg=0)
virtual bool TransferToWindow()
bool Copy(const CNumberValidator &val)
virtual bool Validate(wxWindow *parent)
virtual bool TransferFromWindow()
bool CheckValidator() const
The NCBI C++ standard methods for dealing with std::string.
static const char * str(char *buf, int n)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static const BitmapCharRec *const chars[]
wxString ToWxString(const string &s)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4