CSrcModEditPanel::Create( parent,
id, pos,
size, style );
100GetSizer()->SetSizeHints(
this);
143wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxHORIZONTAL);
144itemCSrcModEditPanel1->SetSizer(itemBoxSizer2);
146 m_Lat=
newwxTextCtrl( itemCSrcModEditPanel1,
ID_LAT_TXT, wxEmptyString, wxDefaultPosition, wxSize(80, -1), 0 );
147itemBoxSizer2->Add(
m_Lat, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);
149wxArrayString m_NSStrings;
150m_NSStrings.Add(
_(
"N"));
151m_NSStrings.Add(
_(
"S"));
152 m_NS=
newwxChoice( itemCSrcModEditPanel1,
ID_CHOICE, wxDefaultPosition, wxDefaultSize, m_NSStrings, 0 );
153 m_NS->SetStringSelection(
_(
"N"));
154itemBoxSizer2->Add(
m_NS, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);
156 m_Lon=
newwxTextCtrl( itemCSrcModEditPanel1,
ID_LON_TXT, wxEmptyString, wxDefaultPosition, wxSize(80, -1), 0 );
157itemBoxSizer2->Add(
m_Lon, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);
159wxArrayString m_EWStrings;
160m_EWStrings.Add(
_(
"E"));
161m_EWStrings.Add(
_(
"W"));
162 m_EW=
newwxChoice( itemCSrcModEditPanel1,
ID_CHOICE1, wxDefaultPosition, wxDefaultSize, m_EWStrings, 0 );
163 m_EW->SetStringSelection(
_(
"E"));
164itemBoxSizer2->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 boolformat_correct =
false;
253 boolprecision_correct =
false;
254 boollat_in_range =
false;
255 boollon_in_range =
false;
256 doublelat_value = 0.0;
257 doublelon_value = 0.0;
259objects::CSubSource::IsCorrectLatLonFormat (
val, format_correct, precision_correct,
260lat_in_range, lon_in_range,
261lat_value, lon_value);
263 if(lat_value < 0.0) {
264 m_NS->SetStringSelection(
wxT(
"S"));
265lat_value = 0.0 - lat_value;
267 m_NS->SetStringSelection(
wxT(
"N"));
273 if(lon_value < 0.0) {
274 m_EW->SetStringSelection(
wxT(
"W"));
275lon_value = 0.0 - lon_value;
277 m_EW->SetStringSelection(
wxT(
"E"));
290 boolformat_correct =
false;
291 boolprecision_correct =
false;
292 boollat_in_range =
false;
293 boollon_in_range =
false;
294 doublelat_value = 0.0;
295 doublelon_value = 0.0;
297objects::CSubSource::IsCorrectLatLonFormat (
val, format_correct, precision_correct,
298lat_in_range, lon_in_range,
299lat_value, lon_value);
301 returnformat_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