NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <objects/valerr/ValidErrItem.hpp>
#include <gui/core/project_service.hpp>
#include <gui/core/selection_service_impl.hpp>
#include <gui/objects/GBWorkspace.hpp>
#include <gui/widgets/edit/init.hpp>
#include <gui/widgets/edit/edit_object.hpp>
#include <gui/widgets/edit/edit_object_seq_feat.hpp>
#include <gui/widgets/edit/edit_object_seq_desc.hpp>
#include <gui/packages/pkg_sequence_edit/common_commands.hpp>
#include <gui/packages/pkg_sequence_edit/create_seq_hist_for_tpa.hpp>
#include <gui/packages/pkg_sequence_edit/edit_history.hpp>
#include <gui/packages/pkg_sequence_edit/remove_sequences.hpp>
#include <gui/packages/pkg_sequence_edit/trim_n.hpp>
#include <gui/packages/pkg_sequence_edit/apply_gcode.hpp>
#include <gui/packages/pkg_sequence_edit/remove_structured_comment.hpp>
#include <gui/objutils/cmd_del_desc.hpp>
#include <gui/widgets/edit/generic_report_dlg.hpp>
#include <gui/widgets/edit/bioseq_editor.hpp>
#include <gui/widgets/edit/edit_obj_view_dlg.hpp>
#include <gui/widgets/edit/alignment_assistant.hpp>
#include <gui/widgets/edit/edit_sequence.hpp>
#include <gui/objutils/util_cmds.hpp>
#include <gui/packages/pkg_sequence_edit/retranslate_cds.hpp>
#include <gui/packages/pkg_sequence_edit/rem_prot_titles.hpp>
#include <gui/packages/pkg_sequence_edit/raw_seq_to_delta_by_n.hpp>
#include <gui/widgets/wx/wx_utils.hpp>
#include <array>
#include "wx/wxprec.h"
#include "wx/wx.h"
#include "wx/imaglist.h"
#include <wx/display.h>
#include <wx/filename.h>
Go to the source code of this file.
Go to the SVN repository for this file.
Macros | |
#define | REGISTER_HANDLER(code) |
Typedefs | |
using | handler = void(*)(CSeq_entry_Handle seh, IWorkbench *wb, const CSerialObject &obj) |
#define REGISTER_HANDLER | ( | code | ) |
Definition at line 298 of file common_commands.cpp.
Definition at line 295 of file common_commands.cpp.
ICommandProccessor* CommandProcessorFromWorkbench | ( | IWorkbench * | wb, |
CScope & | scope | ||
) |
Definition at line 86 of file common_commands.cpp.
References IServiceLocator::GetServiceByType(), CGBDocument::GetUndoManager(), and NULL.
Referenced by handler_eErr_GENERIC_MissingPubRequirement(), handler_eErr_SEQ_DESCR_InconsistentProteinTitle(), handler_eErr_SEQ_DESCR_MultipleStrucComms(), handler_eErr_SEQ_DESCR_NoPubFound(), handler_eErr_SEQ_DESCR_TitleNotAppropriateForSet(), handler_eErr_SEQ_FEAT_GenCodeMismatch(), handler_eErr_SEQ_INST_HistAssemblyMissing(), handler_eErr_SEQ_INST_HistoryGiCollision(), handler_eErr_SEQ_INST_InternalNsInSeqRaw(), handler_eErr_SEQ_INST_TerminalNs(), handler_eErr_SEQ_PKG_OrphanedProtein(), LaunchAlignmentAssistant(), LaunchBioseqEditor(), LaunchDefaultEditor(), LaunchMolInfoEditor(), LaunchSrcEditor(), RemoveSequence(), and TrimTerminalNRichRegions().
wxString GetWorkDirFromWorkbench | ( | IWorkbench * | wb, |
CScope & | scope | ||
) |
Definition at line 118 of file common_commands.cpp.
References _ASSERT, IServiceLocator::GetServiceByType(), and CGBDocument::GetWorkDir().
Referenced by handler_eErr_GENERIC_MissingPubRequirement(), handler_eErr_SEQ_DESCR_NoPubFound(), handler_eErr_SEQ_INST_TerminalNs(), LaunchMolInfoEditor(), LaunchSrcEditor(), and TrimTerminalNRichRegions().
|
static |
Definition at line 312 of file common_commands.cpp.
References CommandProcessorFromWorkbench(), CSeq_entry_Handle::GetScope(), GetWorkDirFromWorkbench(), LaunchDescEditor(), CPubdesc_Base::SetPub(), CSeqdesc_Base::SetPub(), and CPub_Base::SetSub().
|
static |
Definition at line 477 of file common_commands.cpp.
References CRemProtTitles::apply(), CommandProcessorFromWorkbench(), CSeq_entry_Handle::GetScope(), CSeq_entry_Handle::GetTopLevelEntry(), and wxT.
|
static |
Definition at line 444 of file common_commands.cpp.
References CRemoveStructuredComment::apply(), CommandProcessorFromWorkbench(), CSeq_entry_Handle::GetScope(), CSeq_entry_Handle::GetTopLevelEntry(), and wxT.
|
static |
Definition at line 334 of file common_commands.cpp.
References LaunchMolInfoEditor().
|
static |
Definition at line 303 of file common_commands.cpp.
References CommandProcessorFromWorkbench(), CSeq_entry_Handle::GetScope(), GetWorkDirFromWorkbench(), LaunchDescEditor(), and CSeqdesc_Base::SetPub().
|
static |
Definition at line 324 of file common_commands.cpp.
References LaunchSrcEditor().
|
static |
Definition at line 437 of file common_commands.cpp.
References CommandProcessorFromWorkbench(), CSeq_entry_Handle::GetScope(), and OfferToDeleteDescriptor().
|
static |
Definition at line 454 of file common_commands.cpp.
References cleanup(), CleanupCommand(), cmd, CommandProcessorFromWorkbench(), CRetranslateCDS::eRetranslateCDSIgnoreStopExceptEnd, ICommandProccessor::Execute(), CApplyGCode::GetCommand(), CRetranslateCDS::GetCommand(), CSeq_entry_Handle::GetScope(), CSeq_entry_Handle::GetTopLevelEntry(), and MainWindowFromWorkbench().
|
static |
Definition at line 487 of file common_commands.cpp.
References RemoveSequence().
|
static |
Definition at line 432 of file common_commands.cpp.
References TrimTerminalNRichRegions().
|
static |
Definition at line 427 of file common_commands.cpp.
References TrimTerminalNRichRegions().
|
static |
Definition at line 344 of file common_commands.cpp.
References cmd, CommandProcessorFromWorkbench(), ICommandProccessor::Execute(), CCreateSeqHistForTpa::GetCreateSeqHistFromTpaCommand(), CSeq_entry_Handle::GetScope(), CSeq_entry_Handle::GetTopLevelEntry(), MainWindowFromWorkbench(), msg(), CGenericReportDlg::SetText(), and wxT.
|
static |
Definition at line 368 of file common_commands.cpp.
References cmd, CommandProcessorFromWorkbench(), ICommandProccessor::Execute(), CEditHistory::GetCommand(), CSeq_entry_Handle::GetScope(), CSeq_entry_Handle::GetSeq(), CSeq_entry_Handle::IsSeq(), and MainWindowFromWorkbench().
|
static |
Definition at line 492 of file common_commands.cpp.
References CRawSeqToDeltaByN::apply(), CommandProcessorFromWorkbench(), CSeq_entry_Handle::GetScope(), CSeq_entry_Handle::GetTopLevelEntry(), CSeq_entry_Handle::IsSeq(), and MainWindowFromWorkbench().
|
static |
Definition at line 329 of file common_commands.cpp.
References LaunchSrcEditor().
|
static |
Definition at line 339 of file common_commands.cpp.
References LaunchMolInfoEditor().
|
static |
Definition at line 391 of file common_commands.cpp.
References RemoveSequence().
|
static |
Definition at line 410 of file common_commands.cpp.
References CTrimN::apply(), CommandProcessorFromWorkbench(), CSeq_entry_Handle::GetScope(), CSeq_entry_Handle::GetTopLevelEntry(), GetWorkDirFromWorkbench(), MainWindowFromWorkbench(), and wxT.
|
static |
Definition at line 396 of file common_commands.cpp.
References cmd, CommandProcessorFromWorkbench(), ICommandProccessor::Execute(), CSeq_entry_Handle::GetScope(), CSeq_entry_Handle::GetTopLevelEntry(), CRemoveProteins::OrphanedProteins(), and wxT.
bool IsEditable | ( | int | err_code, |
const CSerialObject & | obj, | ||
CSeq_entry_Handle | seh | ||
) |
Definition at line 517 of file common_commands.cpp.
References ConstRef(), CreateEditorForObject(), and valerr_to_handler.
void LaunchAlignmentAssistant | ( | CSeq_entry_Handle | seh, |
IWorkbench * | wb, | ||
const CSeq_align * | align | ||
) |
Definition at line 225 of file common_commands.cpp.
References CommandProcessorFromWorkbench(), ConstRef(), CSeq_entry_Handle::GetScope(), MainWindowFromWorkbench(), NULL, and wxT.
Referenced by LaunchDefaultEditor().
void LaunchBioseqEditor | ( | CSeq_entry_Handle | seh, |
IWorkbench * | wb | ||
) |
Definition at line 242 of file common_commands.cpp.
References CommandProcessorFromWorkbench(), CRef< C, Locker >::GetPointer(), CBioseq_Handle::GetRangeSeq_loc(), CSeq_entry_Handle::GetScope(), CSeq_entry_Handle::GetSeq(), CSeq_entry_Handle::IsSeq(), NULL, and wxT.
Referenced by LaunchDefaultEditor().
void LaunchDefaultEditor | ( | CSeq_entry_Handle | seh, |
IWorkbench * | wb, | ||
const CSerialObject & | obj | ||
) |
Definition at line 264 of file common_commands.cpp.
References CommandProcessorFromWorkbench(), ConstRef(), CreateEditorForObject(), CSeq_entry_Handle::GetScope(), LaunchAlignmentAssistant(), LaunchBioseqEditor(), MainWindowFromWorkbench(), CEditObjViewDlg::SetEditor(), CEditObjViewDlg::SetEditorWindow(), and CEditObjViewDlg::SetUndoManager().
Referenced by LaunchEditor().
void LaunchDescEditor | ( | CRef< CSeqdesc > | seqdesc, |
CSeq_entry_Handle | seh, | ||
ICommandProccessor * | cmdProcessor, | ||
const wxString & | workDir | ||
) |
Definition at line 139 of file common_commands.cpp.
References CSeq_entry_Handle::GetScope(), NULL, CEditObjViewDlg::SetEditor(), CEditObjViewDlg::SetEditorWindow(), CEditObjViewDlg::SetUndoManager(), and CEditObjViewDlg::SetWorkDir().
Referenced by handler_eErr_GENERIC_MissingPubRequirement(), handler_eErr_SEQ_DESCR_NoPubFound(), LaunchDescEditorForSeq(), LaunchMolInfoEditor(), and LaunchSrcEditor().
void LaunchDescEditorForSeq | ( | CRef< CSeqdesc > | seqdesc, |
const objects::CBioseq & | bioseq, | ||
ICommandProccessor * | cmdProcessor, | ||
CScope & | scope, | ||
const wxString & | workDir | ||
) |
Definition at line 152 of file common_commands.cpp.
References CScope::GetBioseqHandle(), CBioseq_Handle::GetSeq_entry_Handle(), and LaunchDescEditor().
void LaunchEditor | ( | int | err_code, |
const CSerialObject & | obj, | ||
CSeq_entry_Handle | seh, | ||
IWorkbench * | wb | ||
) |
Definition at line 507 of file common_commands.cpp.
References LaunchDefaultEditor(), and valerr_to_handler.
void LaunchMolInfoEditor | ( | CSeq_entry_Handle | seh, |
IWorkbench * | wb | ||
) |
Definition at line 165 of file common_commands.cpp.
References CommandProcessorFromWorkbench(), CSeq_entry_Handle::GetScope(), GetWorkDirFromWorkbench(), LaunchDescEditor(), and CSeqdesc_Base::SetMolinfo().
Referenced by handler_eErr_SEQ_DESCR_NoMolInfoFound(), and handler_eErr_SEQ_INST_MolNuclAcid().
void LaunchSrcEditor | ( | CSeq_entry_Handle | seh, |
IWorkbench * | wb | ||
) |
Definition at line 175 of file common_commands.cpp.
References CommandProcessorFromWorkbench(), CSeq_entry_Handle::GetScope(), GetWorkDirFromWorkbench(), LaunchDescEditor(), and CSeqdesc_Base::SetSource().
Referenced by handler_eErr_SEQ_DESCR_NoSourceDescriptor(), and handler_eErr_SEQ_INST_MitoMetazoanTooLong().
wxWindow* MainWindowFromWorkbench | ( | IWorkbench * | wb | ) |
Definition at line 108 of file common_commands.cpp.
References CWorkbench::GetMainWindow(), and NULL.
Referenced by handler_eErr_SEQ_FEAT_GenCodeMismatch(), handler_eErr_SEQ_INST_HistAssemblyMissing(), handler_eErr_SEQ_INST_HistoryGiCollision(), handler_eErr_SEQ_INST_InternalNsInSeqRaw(), handler_eErr_SEQ_INST_TerminalNs(), LaunchAlignmentAssistant(), LaunchDefaultEditor(), RemoveSequence(), and TrimTerminalNRichRegions().
void OfferToDeleteDescriptor | ( | const string & | label, |
CSeq_entry_Handle | seh, | ||
const CSeqdesc & | seqDesc, | ||
ICommandProccessor * | cmdProcessor | ||
) |
Definition at line 217 of file common_commands.cpp.
References cmd, ICommandProccessor::Execute(), label, ToWxString(), and wxT.
Referenced by handler_eErr_SEQ_DESCR_TitleNotAppropriateForSet().
void RemoveSequence | ( | CSeq_entry_Handle | seh, |
IWorkbench * | wb | ||
) |
Definition at line 184 of file common_commands.cpp.
References CRemoveSequencesDlg::ChooseSequence(), cmd, CommandProcessorFromWorkbench(), ICommandProccessor::Execute(), CRemoveSequencesDlg::GetCommand(), CSeq_entry_Handle::GetScope(), CSeq_entry_Handle::GetSeq(), CSeq_entry_Handle::GetTopLevelEntry(), CSeq_entry_Handle::IsSeq(), and MainWindowFromWorkbench().
Referenced by handler_eErr_SEQ_INST_AllNs(), and handler_eErr_SEQ_INST_ShortSeq().
void TrimTerminalNRichRegions | ( | CSeq_entry_Handle | seh, |
IWorkbench * | wb | ||
) |
Definition at line 202 of file common_commands.cpp.
References CTrimN::apply(), CommandProcessorFromWorkbench(), CSeq_entry_Handle::GetScope(), CSeq_entry_Handle::GetTopLevelEntry(), GetWorkDirFromWorkbench(), MainWindowFromWorkbench(), and wxT.
Referenced by handler_eErr_SEQ_INST_HighNpercent3Prime(), and handler_eErr_SEQ_INST_HighNpercent5Prime().
|
static |
Definition at line 312 of file common_commands.cpp.
|
static |
Definition at line 477 of file common_commands.cpp.
|
static |
Definition at line 444 of file common_commands.cpp.
|
static |
Definition at line 334 of file common_commands.cpp.
|
static |
Definition at line 303 of file common_commands.cpp.
|
static |
Definition at line 324 of file common_commands.cpp.
|
static |
Definition at line 437 of file common_commands.cpp.
|
static |
Definition at line 454 of file common_commands.cpp.
|
static |
Definition at line 487 of file common_commands.cpp.
|
static |
Definition at line 432 of file common_commands.cpp.
|
static |
Definition at line 427 of file common_commands.cpp.
|
static |
Definition at line 344 of file common_commands.cpp.
|
static |
Definition at line 368 of file common_commands.cpp.
|
static |
Definition at line 492 of file common_commands.cpp.
|
static |
Definition at line 329 of file common_commands.cpp.
|
static |
Definition at line 339 of file common_commands.cpp.
|
static |
Definition at line 391 of file common_commands.cpp.
|
static |
Definition at line 410 of file common_commands.cpp.
|
static |
Definition at line 396 of file common_commands.cpp.
Definition at line 296 of file common_commands.cpp.
Referenced by IsEditable(), and LaunchEditor().