A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/number__validator_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/wx/number_validator.cpp Source File

38 #include <wx/msgdlg.h> 39 #include <wx/textctrl.h> 44  const char

* 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 const

wxChar*

chars

[] =

69  int n

=

sizeof

(

chars

) /

sizeof

(wxChar*);

71

wxArrayString valid_chars(

n

,

chars

);

72

SetIncludes(valid_chars);

83

wxTextValidator::Copy(

val

);

93

wxCHECK_MSG( m_validatorWindow,

false

,

94  wxT

(

"No window associated with validator"

) );

95

wxCHECK_MSG( m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)),

false

,

96  wxT

(

"CNumberValidator is only for wxTextCtrl's"

) );

98  wxT

(

"Invalid number range in CNumberValidator"

) );

112

wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;

114

control->ChangeValue(s);

129

wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;

130

control->GetValue().ToLong(

m_ValPtr

);

141

wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;

144  if

( !control->IsEnabled() )

147  if

(!wxTextValidator::Validate(parent))

154

wxMessageBox(

m_ErrMsg

,

wxT

(

"Input is not valid"

), wxOK | wxICON_ERROR, parent);

155

control->SetSelection(-1,-1);

163  const char

* szErrMsg)

183

wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;

184

wxString s = wxEmptyString;

188

control->ChangeValue(s);

200

wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;

203  if

( !control->IsEnabled() )

206  if

(!wxTextValidator::Validate(parent))

209

wxString

str

= control->GetValue();

210  if

(

str

.IsEmpty()) {

217

wxMessageBox(

m_ErrMsg

,

wxT

(

"Input is not valid"

), wxOK | wxICON_ERROR, parent);

218

control->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