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

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

95 

CSrcModEditPanel::Create( parent,

id

, pos,

size

, style );

100

GetSizer()->SetSizeHints(

this

);

143

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxHORIZONTAL);

144

itemCSrcModEditPanel1->SetSizer(itemBoxSizer2);

146  m_Lat

=

new

wxTextCtrl( itemCSrcModEditPanel1,

ID_LAT_TXT

, wxEmptyString, wxDefaultPosition, wxSize(80, -1), 0 );

147

itemBoxSizer2->Add(

m_Lat

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);

149

wxArrayString m_NSStrings;

150

m_NSStrings.Add(

_

(

"N"

));

151

m_NSStrings.Add(

_

(

"S"

));

152  m_NS

=

new

wxChoice( itemCSrcModEditPanel1,

ID_CHOICE

, wxDefaultPosition, wxDefaultSize, m_NSStrings, 0 );

153  m_NS

->SetStringSelection(

_

(

"N"

));

154

itemBoxSizer2->Add(

m_NS

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);

156  m_Lon

=

new

wxTextCtrl( itemCSrcModEditPanel1,

ID_LON_TXT

, wxEmptyString, wxDefaultPosition, wxSize(80, -1), 0 );

157

itemBoxSizer2->Add(

m_Lon

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);

159

wxArrayString m_EWStrings;

160

m_EWStrings.Add(

_

(

"E"

));

161

m_EWStrings.Add(

_

(

"W"

));

162  m_EW

=

new

wxChoice( itemCSrcModEditPanel1,

ID_CHOICE1

, wxDefaultPosition, wxDefaultSize, m_EWStrings, 0 );

163  m_EW

->SetStringSelection(

_

(

"E"

));

164

itemBoxSizer2->Add(

m_EW

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);

237  string val

= lat +

" "

+ ns +

" "

+ lon +

" "

+ ew;

246  m_Lat

->SetValue(wxEmptyString);

247  m_Lon

->SetValue(wxEmptyString);

248  m_NS

->SetStringSelection(

wxT

(

"N"

));

249  m_EW

->SetStringSelection(

wxT

(

"E"

));

252  bool

format_correct =

false

;

253  bool

precision_correct =

false

;

254  bool

lat_in_range =

false

;

255  bool

lon_in_range =

false

;

256  double

lat_value = 0.0;

257  double

lon_value = 0.0;

259

objects::CSubSource::IsCorrectLatLonFormat (

val

, format_correct, precision_correct,

260

lat_in_range, lon_in_range,

261

lat_value, lon_value);

263  if

(lat_value < 0.0) {

264  m_NS

->SetStringSelection(

wxT

(

"S"

));

265

lat_value = 0.0 - lat_value;

267  m_NS

->SetStringSelection(

wxT

(

"N"

));

273  if

(lon_value < 0.0) {

274  m_EW

->SetStringSelection(

wxT

(

"W"

));

275

lon_value = 0.0 - lon_value;

277  m_EW

->SetStringSelection(

wxT

(

"E"

));

290  bool

format_correct =

false

;

291  bool

precision_correct =

false

;

292  bool

lat_in_range =

false

;

293  bool

lon_in_range =

false

;

294  double

lat_value = 0.0;

295  double

lon_value = 0.0;

297

objects::CSubSource::IsCorrectLatLonFormat (

val

, format_correct, precision_correct,

298

lat_in_range, lon_in_range,

299

lat_value, lon_value);

301  return

format_correct;

void OnLonTxtTextUpdated(wxCommandEvent &event)

wxEVT_COMMAND_TEXT_UPDATED event handler for ID_LON_TXT

virtual bool IsWellFormatted(const string &val)

void OnLatTxtTextUpdated(wxCommandEvent &event)

wxEVT_COMMAND_TEXT_UPDATED event handler for ID_LAT_TXT

void CreateControls()

Creates the controls and sizers.

wxBitmap GetBitmapResource(const wxString &name)

Retrieves bitmap resources.

wxIcon GetIconResource(const wxString &name)

Retrieves icon resources.

virtual void SetValue(const string &val)

virtual string GetValue()

~CLatLonPanel()

Destructor.

static bool ShowToolTips()

Should we show tooltips?

bool Create(wxWindow *parent, wxWindowID id=10024, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)

Creation.

CLatLonPanel()

Constructors.

void Init()

Initialises member variables.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)

Check if a string is blank (has no text).

static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)

Convert numeric value to string.

@ fDoubleFixed

DoubleToString*(): Use n.nnnn format for double conversions.

const struct ncbi::grid::netcache::search::fields::SIZE size

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