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

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

Go to the documentation of this file.

Go to the SVN repository for this file.

39 #include <wx/msgdlg.h> 46 #define INIT_BASE_MEMBERS \ 47  : wxTextValidator(wxFILTER_INCLUDE_CHAR_LIST) \ 48  , m_OutputFormat( outputFormat ? outputFormat : "%.3g"

) \

55  const char

* outputFormat

74  static const

wxChar*

chars

[]

75

= {

wxT

(

"0"

),

wxT

(

"1"

),

wxT

(

"2"

),

wxT

(

"3"

),

wxT

(

"4"

),

wxT

(

"5"

),

wxT

(

"6"

),

wxT

(

"7"

),

wxT

(

"8"

),

wxT

(

"9"

),

wxT

(

"e"

),

wxT

(

"E"

),

wxT

(

"-"

),

wxT

(

"+"

),

wxT

(

"."

) };

76  const int n

=

sizeof

(

chars

) /

sizeof

(wxChar*);

78

wxArrayString valid_chars(

n

,

chars

);

79

SetIncludes(valid_chars);

91

wxTextValidator::Copy(

val

);

111

wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;

125

wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;

127  if

(

m_ValPtr

&& control->IsEnabled() && !control->HasFlag( wxTE_READONLY ) ){

137

wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;

138  if

( ! control->IsEnabled())

141  if

(wxTextValidator::Validate(parent)) {

147  string

err_msg = e.GetMsg();

148

wxMessageBox(

ToWxString

(err_msg),

wxT

(

"Input is not valid"

),

149

wxOK | wxICON_EXCLAMATION, parent);

151

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

159

wxString errMsg, fmt;

162

fmt.Printf(

wxT

(

"Please enter number between %s and %s."

),

167

fmt.Printf(

wxT

(

"Please enter number greater or equal then %s."

),

172

fmt.Printf(

wxT

(

"Please enter number less or equal then %s."

),

177

wxMessageBox(errMsg,

wxT

(

"Input is not valid"

), wxOK | wxICON_ERROR, parent);

178

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

CFloatTextValidator(double *val_ptr, double minVal=-numeric_limits< double >::infinity(), double maxVal=numeric_limits< double >::infinity(), const char *out_format="%.3g")

bool Copy(const CFloatTextValidator &val)

virtual bool TransferFromWindow()

virtual bool TransferToWindow()

bool CheckValidator() const

virtual bool Validate(wxWindow *parent)

The NCBI C++ standard methods for dealing with std::string.

#define INIT_BASE_MEMBERS

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 double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)

Convert string to double.

static const BitmapCharRec *const chars[]

wxString ToWxString(const string &s)

string ToStdString(const wxString &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