(parent,
id, caption, pos,
size, style);
125SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
126wxDialog::Create( parent,
id, caption, pos,
size, style );
131GetSizer()->SetSizeHints(
this);
182wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
183itemDialog1->SetSizer(itemBoxSizer2);
185wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
186itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_RIGHT|wxALL, 2);
188wxStaticText* itemStaticText4 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Feature type"), wxDefaultPosition, wxDefaultSize, 0 );
189itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
191wxArrayString itemChoice5Strings;
192itemChoice5Strings.Add(
_(
"Gene"));
193itemChoice5Strings.Add(
_(
"RNA"));
194itemChoice5Strings.Add(
_(
"mRNA"));
195itemChoice5Strings.Add(
_(
"CD region"));
196wxChoice* itemChoice5 =
newwxChoice( itemDialog1,
ID_CHOICE5, wxDefaultPosition, wxDefaultSize, itemChoice5Strings, 0 );
197itemChoice5->SetStringSelection(
_(
"Gene"));
198itemBoxSizer3->Add(itemChoice5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
200wxBoxSizer* itemBoxSizer6 =
newwxBoxSizer(wxHORIZONTAL);
201itemBoxSizer2->Add(itemBoxSizer6, 1, wxGROW|wxALL, 2);
203wxBoxSizer* itemBoxSizer7 =
newwxBoxSizer(wxVERTICAL);
204itemBoxSizer6->Add(itemBoxSizer7, 1, wxGROW|wxALL, 0);
206wxArrayString m_FeatureListStrings;
207 m_FeatureList=
newwxListBox( itemDialog1,
ID_LISTBOX2, wxDefaultPosition, wxSize(-1, itemDialog1->ConvertDialogToPixels(wxSize(-1, 150)).y), m_FeatureListStrings, wxLB_SINGLE|wxLB_HSCROLL );
210wxBoxSizer* itemBoxSizer9 =
newwxBoxSizer(wxHORIZONTAL);
211itemBoxSizer7->Add(itemBoxSizer9, 0, wxGROW|wxALL, 0);
213 m_LoadedStatus=
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Not loaded..."), wxDefaultPosition, wxDefaultSize, 0 );
214itemBoxSizer9->Add(
m_LoadedStatus, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
216itemBoxSizer9->Add(7, 8, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
220itemBoxSizer9->Add(
m_EditFeatureBtn, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
222wxStaticLine* itemStaticLine13 =
newwxStaticLine( itemDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
223itemBoxSizer2->Add(itemStaticLine13, 0, wxGROW|wxALL, 5);
225wxBoxSizer* itemBoxSizer14 =
newwxBoxSizer(wxVERTICAL);
226itemBoxSizer2->Add(itemBoxSizer14, 0, wxALIGN_RIGHT|wxALL, 0);
228wxBoxSizer* itemBoxSizer15 =
newwxBoxSizer(wxHORIZONTAL);
229itemBoxSizer14->Add(itemBoxSizer15, 0, wxALIGN_RIGHT|wxALL, 2);
231wxButton* itemButton16 =
newwxButton( itemDialog1,
ID_BUTTON3,
_(
"Load File..."), wxDefaultPosition, wxDefaultSize, 0 );
232itemBoxSizer15->Add(itemButton16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
234 m_SaveFileBtn=
newwxButton( itemDialog1,
ID_BUTTON4,
_(
"Save File..."), wxDefaultPosition, wxDefaultSize, 0 );
236itemBoxSizer15->Add(
m_SaveFileBtn, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
238wxBoxSizer* itemBoxSizer18 =
newwxBoxSizer(wxHORIZONTAL);
239itemBoxSizer14->Add(itemBoxSizer18, 0, wxALIGN_RIGHT|wxALL, 2);
241 m_AccInput=
newwxTextCtrl( itemDialog1,
ID_TEXTCTRL7,
_(
"NT_029998"), wxDefaultPosition, wxDefaultSize, 0 );
242itemBoxSizer18->Add(
m_AccInput, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
244wxButton* itemButton20 =
newwxButton( itemDialog1,
ID_BUTTON1,
_(
"Load Accession"), wxDefaultPosition, wxDefaultSize, 0 );
245itemBoxSizer18->Add(itemButton20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
247wxButton* itemButton21 =
newwxButton( itemDialog1, wxID_CANCEL,
_(
"Close"), wxDefaultPosition, wxDefaultSize, 0 );
248itemBoxSizer18->Add(itemButton21, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
285 string msg(
"Accession '");
286 msg+= acc +
" not recognized as a valid accession";
288wxOK | wxICON_ERROR);
405sel.SetResolveAll().SetNoMapping().SetSortOrder(sel.eSortOrder_None);
407 if(mf->GetOriginalFeature().Equals(feat)) {
408 returnmf->GetSeq_feat_Handle();
418 if(index == wxNOT_FOUND)
438 for( ; it && index > 0; ++it, --index);
448editor(CreateObjectInterface<IEditObject>(sso,
NULL));
451wxMessageBox(
wxT(
"No editor found for object of type \'") +
454 wxT(
"Error"), wxOK|wxICON_ERROR);
459wxWindow* editorWindow = editor->CreateWindow(&edit_dlg);
461 if(edit_dlg.Show(
true))
466wxMessageBox(
wxT(
"Editor returned no action!"),
wxT(
"Error"), wxOK|wxICON_ERROR);
469edit_command->Execute();
500wxFileDialog dlg(
this,
wxT(
"Select a file"), wxEmptyString,
502 wxT(
"ASN files (*.asn)|*.asn|All files (*.*)|*.*"),
503wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
505 if(dlg.ShowModal() != wxID_OK)
509 if(fileName.empty())
519wxMessageBox(s,
wxT(
"Error writing file."), wxOK | wxICON_ERROR);
530wxFileDialog dlg(
this,
wxT(
"Select a file"), wxEmptyString, wxEmptyString,
531 wxT(
"ASN files (*.asn)|*.asn|All files (*.*)|*.*"),
534 if(dlg.ShowModal() != wxID_OK)
537wxString fileName = dlg.GetPath();
538 if(fileName.empty())
551wxMessageBox(s,
wxT(
"Error loading file."), wxOK | wxICON_ERROR);
const CSeq_id * GetFirstId() const
void SetEditorWindow(wxWindow *editorWindow)
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
void OnFeatureEdit(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON2
void OnFeatureDoubleClicked(wxCommandEvent &event)
wxEVT_COMMAND_LISTBOX_DOUBLECLICKED event handler for ID_LISTBOX2
void OnButtonSaveFile(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON4
wxButton * m_EditFeatureBtn
void OnFeatureSelected(wxCommandEvent &event)
wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_LISTBOX2
CSelectFeatureDlg()
Constructors.
CRef< CObjectManager > m_ObjMgr
static bool ShowToolTips()
Should we show tooltips?
CBioseq_Handle m_BioseqHandle
bool Create(wxWindow *parent, wxWindowID id=10015, const wxString &caption=_("Select feature to edit"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void OnFeatureTypeSelected(wxCommandEvent &event)
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CHOICE5
void Init()
Initialises member variables.
wxListBox * m_FeatureList
void OnButtonLoadFile(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON3
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
~CSelectFeatureDlg()
Destructor.
wxStaticText * m_LoadedStatus
void CreateControls()
Creates the controls and sizers.
void OnLoadAccession(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1
ESubtype GetSubtype(void) const
namespace ncbi::objects::
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
const string & GetMsg(void) const
Get message string.
string ReportAll(TDiagPostFlags flags=eDPF_Exception) const
Report all exceptions.
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
virtual const CTypeInfo * GetThisTypeInfo(void) const =0
@ eSerial_AsnText
ASN.1 text.
static CObjectOStream * Open(ESerialDataFormat format, CNcbiOstream &outStream, bool deleteOutStream)
Create serial object writer and attach it to an output stream.
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
void ResetHistory(EActionIfLocked action=eKeepIfLocked)
Clean all unused TSEs from the scope's cache and release the memory.
CBioseq_Handle AddBioseq(CBioseq &bioseq, TPriority pri=kPriority_Default, EExist action=eExist_Throw)
Add bioseq, return bioseq handle.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
CConstRef< CBioseq > GetCompleteBioseq(void) const
Get the complete bioseq.
void Reset(void)
Reset handle and make it not to point to any bioseq.
SAnnotSelector & SetFeatType(TFeatType type)
Set feature type (also set annotation type to feat)
const CSeq_feat & GetMappedFeature(void) const
Feature mapped to the master sequence.
SAnnotSelector & SetFeatSubtype(TFeatSubtype subtype)
Set feature subtype (also set annotation and feat type)
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
const string & GetName(void) const
Get name of this type.
static const char label[]
const TLocation & GetLocation(void) const
Get the Location member data.
const TData & GetData(void) const
Get the Data member data.
const struct ncbi::grid::netcache::search::fields::SIZE size
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static const char * type_name(CS_INT value)
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