28 #ifndef _EDIT_SEQUENCE_H_
29 #define _EDIT_SEQUENCE_H_
45 #include <wx/bmpbuttn.h>
46 #include <wx/textctrl.h>
48 #include <wx/dialog.h>
49 #include <wx/radiobut.h>
50 #include <wx/checkbox.h>
51 #include <wx/choice.h>
55 #include <unordered_map>
72 #define ID_CEDIT_SEQUENCE wxID_ANY
73 #define SYMBOL_CEDIT_SEQUENCE_STYLE wxMINIMIZE_BOX | wxMAXIMIZE_BOX |wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
74 #define SYMBOL_CEDIT_SEQUENCE_TITLE _("Edit Sequence")
75 #define SYMBOL_CEDIT_SEQUENCE_IDNAME ID_CEDIT_SEQUENCE
76 #define SYMBOL_CEDIT_SEQUENCE_SIZE wxSize(704, 504)
77 #define SYMBOL_CEDIT_SEQUENCE_POSITION wxDefaultPosition
79 #define ID_CLOSE_EDSEQ_BUTTON 11401
80 #define ID_ACCEPT_EDSEQ_BUTTON 11402
81 #define ID_GOTO_EDSEQ_BUTTON 11403
82 #define ID_SHOW_TRANSLATE_EDSEQ_MENU 11405
83 #define ID_SHOW_TRANSLATE1_EDSEQ_MENU 11406
84 #define ID_SHOW_TRANSLATE2_EDSEQ_MENU 11407
85 #define ID_SHOW_TRANSLATE_ALL_EDSEQ_MENU 11408
86 #define ID_SHOW_ONTHEFLY_EDSEQ_MENU 11409
87 #define ID_SHOW_MISMATCH_EDSEQ_MENU 11410
88 #define ID_SHOW_REVCOMP_EDSEQ_MENU 11411
89 #define ID_SHOW_FEATURES_EDSEQ_MENU 11412
90 #define ID_EDIT_COPY_EDSEQ_MENU 11413
91 #define ID_EDIT_CUT_EDSEQ_MENU 11414
92 #define ID_EDIT_PASTE_EDSEQ_MENU 11415
93 #define ID_SHOW_REVTRANSLATE_EDSEQ_MENU 11416
94 #define ID_SHOW_REVTRANSLATE1_EDSEQ_MENU 11417
95 #define ID_SHOW_REVTRANSLATE2_EDSEQ_MENU 11418
96 #define ID_SHOW_REVTRANSLATE_ALL_EDSEQ_MENU 11419
97 #define ID_CANCEL_EDSEQ_BUTTON 11420
98 #define ID_SHOW_TRANSLATE_EVERYTHING_EDSEQ_MENU 11421
99 #define ID_SHOW_TRANSLATE_NONE_EDSEQ_MENU 11422
100 #define ID_EDIT_FIND_EDSEQ_MENU 11423
101 #define ID_RETRANSLATE_EDSEQ_BUTTON 11424
102 #define ID_RANGE_EDSEQ_BUTTON 11425
103 #define READONLY_TIMER_ID 11426
108 DECLARE_EVENT_TABLE()
126 void CreateControls();
129 wxBitmap GetBitmapResource(
const wxString& name );
132 wxIcon GetIconResource(
const wxString& name );
135 static bool ShowToolTips();
137 virtual void SetRegistryPath(
const string& reg_path);
138 virtual void LoadSettings();
139 virtual void SaveSettings()
const;
141 void OnClose( wxCommandEvent& event );
142 void OnCancel( wxCommandEvent& event );
143 void OnAccept( wxCommandEvent& event );
144 void OnGoTo( wxCommandEvent& event );
145 void OnRange( wxCommandEvent& event );
146 void OnFind( wxCommandEvent& event );
147 void OnTranslate( wxCommandEvent& event );
148 void OnTranslate1( wxCommandEvent& event );
149 void OnTranslate2( wxCommandEvent& event );
150 void OnTranslateAll( wxCommandEvent& event );
151 void OnRevTranslate( wxCommandEvent& event );
152 void OnRevTranslate1( wxCommandEvent& event );
153 void OnRevTranslate2( wxCommandEvent& event );
154 void OnRevTranslateAll( wxCommandEvent& event );
155 void OnTranslateEverything( wxCommandEvent& event );
156 void OnTranslateNone( wxCommandEvent& event );
157 void OnOnTheFly( wxCommandEvent& event );
158 void OnMismatch( wxCommandEvent& event );
159 void OnComplement( wxCommandEvent& event );
160 void OnFeatures( wxCommandEvent& event );
161 void OnCopy( wxCommandEvent& event );
162 void OnCut( wxCommandEvent& event );
163 void OnPaste( wxCommandEvent& event );
165 void ReportPos(
int pos);
166 void ReportRange(
int pos1,
int pos2);
167 void IsClipboard(wxUpdateUIEvent &event);
168 void IsSelection(wxUpdateUIEvent &event);
169 void IsSelectionAndClean(wxUpdateUIEvent &event);
170 void IsNucleotide(wxUpdateUIEvent &event);
171 void CreateFeature ( wxCommandEvent& event);
172 void CreateRegulatory( wxCommandEvent& event);
173 void EnableCommit(
bool enable);
174 void OnRetranslate ( wxCommandEvent& event);
175 void ShowReadOnlyWarning();
176 void OnReadOnlyTimer(wxTimerEvent& event);
179 void GetFeatures(
const CSeq_loc &loc,
CScope &scope);
223 #define ID_CFINDEDITSEQUENCE 29000
224 #define ID_TEXTCTRL_FIND_EDIT_SEQ 29001
225 #define ID_NUC_FIND_EDIT_SEQ 29002
226 #define ID_REVCOMP_FIND_EDIT_SEQ 29003
227 #define ID_TRANSFRAME_FIND_EDIT_SEQ 29004
228 #define ID_FRAMECHOICE_FIND_EDIT_SEQ 29005
229 #define ID_PREV_FIND_EDIT_SEQ 29006
230 #define ID_NEXT_FIND_EDIT_SEQ 29007
231 #define ID_DISMISS_FIND_EDIT_SEQ 29008
232 #define SYMBOL_CFINDEDITSEQUENCE_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
233 #define SYMBOL_CFINDEDITSEQUENCE_TITLE _("find")
234 #define SYMBOL_CFINDEDITSEQUENCE_IDNAME ID_CFINDEDITSEQUENCE
235 #define SYMBOL_CFINDEDITSEQUENCE_SIZE wxSize(400, 300)
236 #define SYMBOL_CFINDEDITSEQUENCE_POSITION wxDefaultPosition
247 DECLARE_EVENT_TABLE()
264 void CreateControls();
273 wxBitmap GetBitmapResource(
const wxString& name );
276 wxIcon GetIconResource(
const wxString& name );
280 static bool ShowToolTips();
281 void OnPrev( wxCommandEvent& event );
282 void OnNext( wxCommandEvent& event );
283 void OnDismiss( wxCommandEvent& event );
284 void OnClose(wxCloseEvent& event);
285 void OnChange( wxCommandEvent& event );
287 void FindMatchPositions(
const string &choice);
288 void SetHighlights();
wxMenuItem * m_translate_item_none
wxStaticText * m_readonly_warning
wxTextCtrl * m_GoTo_TextCtrl
wxMenuItem * m_translate_item_all
vector< vector< pair< TSeqPos, TSeqPos > > > m_FeatRanges
vector< pair< string, CSeqFeatData::ESubtype > > m_FeatTypes
vector< CBioseq_Handle::EVectorStrand > m_FeatStrand
vector< bool > m_Feat5Partial
vector< int > m_FeatFrames
wxButton * m_CommitButton
wxButton * m_RetranslateButton
vector< CRef< CGenetic_code > > m_GeneticCode
IUndoManager * m_UndoManager
vector< string > m_RealProt
unordered_map< int, vector< vector< pair< TSeqPos, TSeqPos > > > > m_ProtFeatRanges
wxStaticText * m_RangeLabel
wxMenuItem * m_revtranslate_item_all
wxStaticText * m_commit_warning
set< int >::iterator m_CurrentPos
wxRadioButton * m_TransFrame
wxStaticText * m_ItemOfText
namespace ncbi::objects::
Undo/Redo interface for editing operations.
Interface (functor) for object editing.
void AdjustFeatureLocations(const map< objects::CBioseq_Handle, vector< SGap >> &map_gaps, CRef< CCmdComposite > composite, bool split_gene_locations, bool break_features, bool keep_gap_length, bool create_general_only, objects::CObject_id::TId &max_feat_id, map< objects::CObject_id::TId, objects::CObject_id::TId > &old_to_new, bool create_xref_map)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define SYMBOL_CEDIT_SEQUENCE_IDNAME
#define SYMBOL_CEDIT_SEQUENCE_POSITION
#define SYMBOL_CFINDEDITSEQUENCE_STYLE
#define SYMBOL_CFINDEDITSEQUENCE_SIZE
#define SYMBOL_CFINDEDITSEQUENCE_IDNAME
#define SYMBOL_CEDIT_SEQUENCE_SIZE
#define SYMBOL_CEDIT_SEQUENCE_STYLE
#define SYMBOL_CEDIT_SEQUENCE_TITLE
#define SYMBOL_CFINDEDITSEQUENCE_POSITION
#define SYMBOL_CFINDEDITSEQUENCE_TITLE
SBlastSequence GetSequence(const objects::CSeq_loc &sl, EBlastEncoding encoding, objects::CScope *scope, objects::ENa_strand strand=objects::eNa_strand_plus, ESentinelType sentinel=eSentinels, std::string *warnings=NULL)
Retrieves a sequence using the object manager.
unsigned int TSeqPos
Type for sequence locations and lengths.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_GUIWIDGETS_EDIT_EXPORT
const struct ncbi::grid::netcache::search::fields::SIZE size
string GetSeqTitle(CBioseq_Handle bsh)