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/pmid__validator_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/edit/pmid_validator.cpp Source File

Go to the documentation of this file.

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."

),

76

wxTextValidator::Copy(

val

);

86

wxCHECK_MSG( m_validatorWindow,

false

,

87  wxT

(

"No window associated with validator"

) );

88

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

false

,

89  wxT

(

"CPmidValidator is only for wxTextCtrl's"

) );

91  wxT

(

"Invalid number range in CPmidValidator"

) );

105

wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;

110

control->ChangeValue(s);

125

wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;

126

wxString pmid_wx = control->GetValue();

127  string

pmid_str(pmid_wx.c_str());

142

wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;

145  if

( !control->IsEnabled() )

148  if

(!wxTextValidator::Validate(parent))

151

wxString pmid_wx = control->GetValue();

152  if

(pmid_wx.IsEmpty()) {

156  string

pmid_str(pmid_wx.c_str());

165

wxMessageBox(

m_ErrMsg

,

wxT

(

"Input is not valid"

), wxOK | wxICON_ERROR, parent);

166

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