Go to the SVN repository for this file.
38 #include <wx/msgdlg.h> 39 #include <wx/textctrl.h> 44 const char* szErrMsg)
45: wxTextValidator(wxFILTER_NONE)
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."),
76wxTextValidator::Copy(
val);
86wxCHECK_MSG( m_validatorWindow,
false,
87 wxT(
"No window associated with validator") );
88wxCHECK_MSG( m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)),
false,
89 wxT(
"CPmidValidator is only for wxTextCtrl's") );
91 wxT(
"Invalid number range in CPmidValidator") );
105wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;
110control->ChangeValue(s);
125wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;
126wxString pmid_wx = control->GetValue();
127 stringpmid_str(pmid_wx.c_str());
142wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;
145 if( !control->IsEnabled() )
148 if(!wxTextValidator::Validate(parent))
151wxString pmid_wx = control->GetValue();
152 if(pmid_wx.IsEmpty()) {
156 stringpmid_str(pmid_wx.c_str());
165wxMessageBox(
m_ErrMsg,
wxT(
"Input is not valid"), wxOK | wxICON_ERROR, parent);
166control->SetSelection(-1,-1);
virtual bool TransferToWindow()
virtual bool TransferFromWindow()
bool Copy(const CPmidValidator &val)
CPmidValidator(long *val_ptr, long minVal=numeric_limits< long >::min(), long maxVal=numeric_limits< long >::max(), const char *szErrMsg=0)
virtual bool Validate(wxWindow *parent)
bool CheckValidator() const
The NCBI C++ standard methods for dealing with std::string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
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