99 wxPanel::Create( parent,
id, pos,
size, style );
104 GetSizer()->SetSizeHints(
this);
148 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxHORIZONTAL);
149 itemPanel1->SetSizer(itemBoxSizer2);
152 itemBoxSizer2->Add(
m_Accession, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);
154 m_GI =
new wxTextCtrl( itemPanel1,
ID_GI_TXT, wxEmptyString, wxDefaultPosition, wxSize(100, -1), 0 );
155 itemBoxSizer2->Add(
m_GI, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);
157 m_Start =
new wxTextCtrl( itemPanel1,
ID_START_TXT, wxEmptyString, wxDefaultPosition, wxSize(100, -1), 0 );
158 itemBoxSizer2->Add(
m_Start, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);
160 m_Stop =
new wxTextCtrl( itemPanel1,
ID_STOP_TXT, wxEmptyString, wxDefaultPosition, wxSize(100, -1), 0 );
161 itemBoxSizer2->Add(
m_Stop, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);
163 m_Comment =
new wxTextCtrl( itemPanel1,
ID_COMMENT_TXT, wxEmptyString, wxDefaultPosition, wxSize(100, -1), 0 );
164 itemBoxSizer2->Add(
m_Comment, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);
172 if (!wxPanel::TransferDataToWindow())
175 string accession =
"";
181 if (
m_Field->GetData().IsFields()) {
183 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr()) {
184 const string&
label = (*it)->GetLabel().GetStr();
186 if ((*it)->GetData().IsStr()) {
187 accession = (*it)->GetData().GetStr();
190 if ((*it)->GetData().IsStr()) {
191 comment = (*it)->GetData().GetStr();
194 if ((*it)->GetData().IsInt()) {
195 gi = (*it)->GetData().GetInt();
198 if ((*it)->GetData().IsInt()) {
199 from = (*it)->GetData().GetInt();
202 if ((*it)->GetData().IsInt()) {
203 to = (*it)->GetData().GetInt();
214 m_GI->SetValue(wxEmptyString);
219 m_Start->SetValue(wxEmptyString);
224 m_Stop->SetValue(wxEmptyString);
249 if (!wxPanel::TransferDataFromWindow())
259 }
catch(
CException &e) {}
catch (exception &e) {}
264 }
catch(
CException &e) {}
catch (exception &e) {}
268 }
catch(
CException &e) {}
catch (exception &e) {}
272 CUser_field::TData::TFields::iterator it =
m_Field->SetData().SetFields().begin();
273 while (it !=
m_Field->SetData().SetFields().end()) {
274 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr() &&
x_IsControlled((*it)->GetLabel().GetStr())) {
275 it =
m_Field->SetData().SetFields().erase(it);
283 acc_field->
SetLabel().SetStr(
"accession");
284 acc_field->
SetData().SetStr(accession);
285 m_Field->SetData().SetFields().push_back(acc_field);
289 comment_field->
SetLabel().SetStr(
"name");
290 comment_field->
SetData().SetStr(comment);
291 m_Field->SetData().SetFields().push_back(comment_field);
293 if (to > 0 && from > 0) {
295 from_field->
SetLabel().SetStr(
"from");
296 from_field->
SetData().SetInt(from);
297 m_Field->SetData().SetFields().push_back(from_field);
300 to_field->
SetData().SetInt(to);
301 m_Field->SetData().SetFields().push_back(to_field);
306 gi_field->
SetData().SetInt(gi);
307 m_Field->SetData().SetFields().push_back(gi_field);
368 wxTextCtrl* item = (wxTextCtrl*)event.GetEventObject();
382 wxTextCtrl* item = (wxTextCtrl*)event.GetEventObject();
396 wxTextCtrl* item = (wxTextCtrl*)event.GetEventObject();
410 wxTextCtrl* item = (wxTextCtrl*)event.GetEventObject();
424 wxTextCtrl* item = (wxTextCtrl*)event.GetEventObject();
void Init()
Initialises member variables.
bool Create(wxWindow *parent, wxWindowID id=ID_CSINGLEREFGENETRACKLOCPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
static bool ShowToolTips()
Should we show tooltips?
void OnAccessionTxtTextUpdated(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_UPDATED event handler for ID_ACCESSION_TXT
virtual bool TransferDataToWindow()
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CRef< objects::CUser_field > m_Field
void CreateControls()
Creates the controls and sizers.
void OnStopTxtTextUpdated(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_UPDATED event handler for ID_STOP_TXT
virtual bool TransferDataFromWindow()
void OnStartTxtTextUpdated(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_UPDATED event handler for ID_START_TXT
bool x_IsControlled(const string &field)
void OnGiTxtTextUpdated(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_UPDATED event handler for ID_GI_TXT
CSingleRefGeneTrackLocPanel()
Constructors.
~CSingleRefGeneTrackLocPanel()
Destructor.
CRef< objects::CUser_field > GetUser_field()
void OnCommentTxtTextUpdated(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_UPDATED event handler for ID_COMMENT_TXT
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
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.
static const char label[]
vector< CRef< CUser_field > > TFields
void SetLabel(TLabel &value)
Assign a value to Label data member.
void SetData(TData &value)
Assign a value to Data data member.
const struct ncbi::grid::netcache::search::fields::SIZE size
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)