1 #ifndef GUI_WIDGETS_EDIT___BIOSEQ_EDITOR__HPP
2 #define GUI_WIDGETS_EDIT___BIOSEQ_EDITOR__HPP
147 DECLARE_EVENT_TABLE()
158 virtual int GetEditFlags(
const objects::IFlatItem& item)
const;
164 bool IsEditable(
const objects::IFlatItem& item)
const;
171 void OnEditBiosourceDesc(wxCommandEvent& event);
172 void OnUpdateEditBiosourceDesc(wxUpdateUIEvent& event);
173 void OnCreateBiosourceDesc(wxCommandEvent& event);
174 void OnUpdateCreateBiosourceDesc(wxUpdateUIEvent& event);
175 void OnDeleteBiosourceDesc(wxCommandEvent& event);
176 void OnUpdateDeleteBiosourceDesc(wxUpdateUIEvent& event);
178 void OnEditBiosourceFeat(wxCommandEvent& event);
179 void OnUpdateEditBiosourceFeat(wxUpdateUIEvent& event);
180 void OnCreateBiosourceFeat(wxCommandEvent& event);
181 void OnUpdateCreateBiosourceFeat(wxUpdateUIEvent& event);
182 void OnDeleteBiosourceFeat(wxCommandEvent& event);
183 void OnUpdateDeleteBiosourceFeat(wxUpdateUIEvent& event);
185 void OnPropagateAllFeatures(wxCommandEvent& event);
186 void OnUpdatePropagateAllFeatures(wxUpdateUIEvent& event);
187 void OnPropagateSelectedFeatures(wxCommandEvent& event);
188 void OnUpdatePropagateSelectedFeatures(wxUpdateUIEvent& event);
192 void OnUpdateNucleotideFeat(wxUpdateUIEvent& event);
193 void OnUpdateProteinFeat(wxUpdateUIEvent& event);
194 void OnUpdateAnyFeat(wxUpdateUIEvent& event);
195 void OnCreateCodingRegion(wxCommandEvent& event);
196 void OnCreateGene(wxCommandEvent& event);
197 void OnCreateProt(wxCommandEvent& event);
198 void OnCreateImport(wxCommandEvent& evt);
199 void OnCreateRegion(wxCommandEvent& evt);
200 void OnCreateSecondaryStructure(wxCommandEvent& evt);
201 void OnCreateRNA(wxCommandEvent& evt);
202 void OnCreateSite(wxCommandEvent& event);
203 void OnCreateBond(wxCommandEvent& event);
204 void OnCreatePubFeat(wxCommandEvent& event);
205 void OnCreateDescriptor(wxCommandEvent& evt);
207 void OnEditSelection(wxCommandEvent& event);
208 void OnUpdateEditSelection(wxUpdateUIEvent& event);
210 void OnDeleteSelection(wxCommandEvent& event);
211 void OnUpdateDeleteSelection(wxUpdateUIEvent& event);
213 virtual bool ProcessEvent(wxEvent& event);
215 static objects::CSeqFeatData::ESubtype GetFeatTypeFromCmdID (
int cmd_id);
219 void x_DeleteObject(objects::CSeq_entry_Handle& seh,
const objects::CSeqdesc& seqDesq);
220 void x_DeleteObject(objects::CSeq_entry_Handle& seh,
const objects::CSeq_feat& seqFeat);
221 bool x_DeleteFromSingleSeq(objects::CSeq_entry_Handle& seh, objects::CSeq_entry_Handle& sehdesc,
const objects::CSeqdesc& seqDesq,
bool &any,
bool& cancel);
222 CIRef<IEditCommand> x_GetDeleteCommand(objects::CSeq_entry_Handle& seh,
const objects::CSeqdesc& seqDesc,
bool from_single);
223 CRef<CCmdComposite> x_GetDeleteCommand(objects::CSeq_entry_Handle& seh,
const objects::CSeq_feat& seqFeat);
228 void x_ReportError(
const string&
cmd,
const std::exception& e);
230 bool x_HandleFeatCreationHere(wxCommandEvent& event);
231 bool x_HaveBiosourceDesc();
232 bool x_HaveBiosourceFeat();
233 int x_GetFromPosition(
void);
234 bool x_HasAlignment(
void);
252 virtual string GetExtensionIdentifier()
const;
253 virtual string GetExtensionLabel()
const;
263 static void CollectBioseqEditorCommands(vector<CUICommand*> &commands);
@ eCmdCreateRegulatory_ribosome_binding_site
@ eCmdCreateMobileElement
@ eCmdCreateMiscStructure
@ eCmdCreateBiosourceFeat
@ eCmdCreateRefGeneTracking
@ eCmdDeleteBiosourceDesc
@ eCmdCreatePrimTranscript
@ eCmdCreatePubDescriptorLabeled
@ eCmdCreateRegulatory_promoter
@ eCmdCreateRegulatory_riboswitch
@ eCmdCreateCodingRegion_ext
@ eCmdCreateCommentDescriptor
@ eCmdCreateBiosourceDesc
@ eCmdCreatePubFeatureLabeled
@ eCmdCreateRegulatory_enhancer
@ eCmdCreatePubDescriptor
@ eCmdCreateTransitPeptide
@ eCmdPropagateAllFeatures
@ eCmdCreateRegionDescriptor
@ eCmdCreateSecondaryStructure
@ eCmdCreateAuthorizedAccess
@ eCmdPropagateSelectedFeatures
@ eCmdCreateStructuredComment
@ eCmdCreateRegulatory_terminator
@ eCmdCreateMiscDifference
@ eCmdDeleteBiosourceFeat
CIRef< IEditObject > CreateEditorForObject(CConstRef< CObject > obj, objects::CSeq_entry_Handle seh, bool create)
virtual void RegisterIconAliases(wxFileArtProvider &provider)
CIRef< IEditCommand > x_GetDeleteCommand(objects::CSeq_entry_Handle &seh, const objects::CSeq_align &align)
IGuiWidgetHost * m_GuiWidgetHost
virtual void SetCallBack(IBioseqEditorCB *cb)
ICommandProccessor & m_CmdProccessor
CBioseqEditor(ICommandProccessor &cmdProccessor, IGuiWidgetHost *guiWidgetHost)
CRef< CCmdComposite > x_GetDeleteCommand(objects::CSeq_entry_Handle &seh, const objects::CSeq_annot &annot)
bool IsDeletable(const objects::IFlatItem &item) const
namespace ncbi::objects::
CUICommandRegistry is a centralized registry where all application commands should be registered.
virtual wxMenu * CreateContextMenu(bool shorter=false) const =0
virtual wxMenu * CreateBioseqMenu() const =0
virtual void EditSelection()=0
virtual int GetEditFlags(CEditObject &editObj) const =0
Undo/Redo interface for editing operations.
IExtension IExtension interface represents an abstract pluggable component.
bool IsEditable(int err_code, const CSerialObject &obj, objects::CSeq_entry_Handle seh)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
#define NCBI_GUIWIDGETS_EDIT_EXPORT
@ eBioseqEditBaseCommandsEnd