NCBI C++ ToolKit
|
Search Toolkit Book for CSuspectProductRulesEditor
#include <gui/packages/pkg_sequence_edit/suspect_product_rule_editor.hpp>
Public Member Functions | |
CSuspectProductRulesEditor () | |
Constructors. More... | |
CSuspectProductRulesEditor (wxWindow *parent, IWorkbench *workbench, wxWindowID id=wxID_ANY, const wxString &caption=_("Suspect Product Rule Editor"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(704, 504), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL) | |
bool | Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Suspect Product Rule Editor"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(704, 504), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL) |
Creation. More... | |
virtual | ~CSuspectProductRulesEditor () |
Destructor. More... | |
void | Init () |
Initialises member variables. More... | |
void | CreateControls () |
Creates the controls and sizers. More... | |
wxBitmap | GetBitmapResource (const wxString &name) |
Retrieves bitmap resources. More... | |
wxIcon | GetIconResource (const wxString &name) |
Retrieves icon resources. More... | |
void | OnFileLoad (wxCommandEvent &event) |
void | OnFileAdd (wxCommandEvent &event) |
void | OnFileSave (wxCommandEvent &event) |
void | CanFileSave (wxUpdateUIEvent &event) |
void | OnFileSaveAs (wxCommandEvent &event) |
void | CanFileSaveAs (wxUpdateUIEvent &event) |
void | OnQuit (wxCommandEvent &event) |
void | CanSort (wxUpdateUIEvent &event) |
void | OnSortByFind (wxCommandEvent &event) |
void | OnSortByCat (wxCommandEvent &event) |
void | OnDisplay (wxCommandEvent &event) |
void | OnShowDiffs (wxCommandEvent &event) |
void | OnApplyFixes (wxCommandEvent &event) |
void | OnListMatches (wxCommandEvent &event) |
void | OnDeleteRules (wxCommandEvent &event) |
void | OnAddRuleBefore (wxCommandEvent &event) |
void | OnAddRuleAfter (wxCommandEvent &event) |
virtual void | UpdateCheckedState (size_t checked) |
void | AddRule (CRef< CSuspect_rule > rule, bool before) |
void | ReplaceRule (CRef< CSuspect_rule > rule, int n) |
virtual void | DoubleClick (int n) |
Public Member Functions inherited from CCheckListBoxListener | |
virtual | ~CCheckListBoxListener () |
Public Member Functions inherited from CDoubleClickConsumer | |
virtual | ~CDoubleClickConsumer () |
Static Public Member Functions | |
static bool | ShowToolTips () |
Should we show tooltips? More... | |
Private Member Functions | |
void | x_SetUpTSEandUnDoManager () |
bool | MatchConstraint (CRef< CSuspect_rule > rule, const string &str) |
Private Attributes | |
IWorkbench * | m_Workbench |
objects::CSeq_entry_Handle | m_TopSeqEntry |
ICommandProccessor * | m_CmdProcessor |
CRearrangeCtrl * | m_Panel |
wxString | m_File |
wxString | m_DefaultDir |
vector< CRef< CSuspect_rule > > | m_Rules |
wxButton * | m_DeleteButton |
Definition at line 93 of file suspect_product_rule_editor.hpp.
CSuspectProductRulesEditor::CSuspectProductRulesEditor | ( | ) |
Constructors.
CSuspectProductRulesEditor event table definition
CSuspectProductRulesEditor constructors
Definition at line 106 of file suspect_product_rule_editor.cpp.
References Init().
CSuspectProductRulesEditor::CSuspectProductRulesEditor | ( | wxWindow * | parent, |
IWorkbench * | workbench, | ||
wxWindowID | id = wxID_ANY , |
||
const wxString & | caption = _("Suspect Product Rule Editor") , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(704, 504) , |
||
long | style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL |
||
) |
Definition at line 112 of file suspect_product_rule_editor.cpp.
References Create(), Init(), NEditingStats::ReportUsage(), and ncbi::grid::netcache::search::fields::size.
|
virtual |
Destructor.
CSuspectProductRulesEditor destructor
Definition at line 145 of file suspect_product_rule_editor.cpp.
void CSuspectProductRulesEditor::AddRule | ( | CRef< CSuspect_rule > | rule, |
bool | before | ||
) |
Definition at line 898 of file suspect_product_rule_editor.cpp.
References CRearrangeList::GetCurrentOrder(), CRearrangeCtrl::GetList(), i, m_Panel, m_Rules, CRearrangeList::Set(), and CSuspect_rule::SummarizeRule().
Referenced by CAddSuspectProductRule::OnAccept().
void CSuspectProductRulesEditor::CanFileSave | ( | wxUpdateUIEvent & | event | ) |
Definition at line 360 of file suspect_product_rule_editor.cpp.
void CSuspectProductRulesEditor::CanFileSaveAs | ( | wxUpdateUIEvent & | event | ) |
Definition at line 384 of file suspect_product_rule_editor.cpp.
References m_Rules.
void CSuspectProductRulesEditor::CanSort | ( | wxUpdateUIEvent & | event | ) |
Definition at line 423 of file suspect_product_rule_editor.cpp.
References m_Rules.
bool CSuspectProductRulesEditor::Create | ( | wxWindow * | parent, |
wxWindowID | id = wxID_ANY , |
||
const wxString & | caption = _("Suspect Product Rule Editor") , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(704, 504) , |
||
long | style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL |
||
) |
Creation.
Definition at line 122 of file suspect_product_rule_editor.cpp.
References CreateControls(), and ncbi::grid::netcache::search::fields::size.
Referenced by CSuspectProductRulesEditor().
void CSuspectProductRulesEditor::CreateControls | ( | ) |
Creates the controls and sizers.
Control creation for CSuspectProductRulesEditor
Definition at line 167 of file suspect_product_rule_editor.cpp.
References _, ctll::add_item(), CRearrangeCtrl::GetList(), ID_ADD_AFTER_RULE_LIST_BUTTON, ID_ADD_BEFORE_RULE_LIST_BUTTON, ID_ADD_RULE_LIST_MENU, ID_APPLY_FIXES_RULE_LIST_BUTTON, ID_DELETE_SELECTED_RULE_LIST_BUTTON, ID_DISPLAY_TEXT_RULE_LIST_BUTTON, ID_LIST_MATCHES_RULE_LIST_BUTTON, ID_LOAD_RULE_LIST_MENU, ID_QUIT_RULE_LIST_MENU, ID_SAVE_AS_RULE_LIST_MENU, ID_SAVE_RULE_LIST_MENU, ID_SHOW_DIFFS_RULE_LIST_BUTTON, ID_SORT_CAT_RULE_LIST_MENU, ID_SORT_FIND_RULE_LIST_MENU, m_DeleteButton, m_Panel, CRearrangeList::SetCheckListListener(), CRearrangeList::SetDoubleClickConsumer(), wxID_ANY, and wxT.
Referenced by Create().
|
virtual |
Reimplemented from CDoubleClickConsumer.
Definition at line 959 of file suspect_product_rule_editor.cpp.
References CRearrangeList::GetCurrentOrder(), CRearrangeCtrl::GetList(), i, m_Panel, m_Rules, m_TopSeqEntry, n, CAddSuspectProductRule::SetRule(), and x_SetUpTSEandUnDoManager().
wxBitmap CSuspectProductRulesEditor::GetBitmapResource | ( | const wxString & | name | ) |
Retrieves bitmap resources.
Get bitmap resources
Definition at line 264 of file suspect_product_rule_editor.cpp.
wxIcon CSuspectProductRulesEditor::GetIconResource | ( | const wxString & | name | ) |
Retrieves icon resources.
Get icon resources
Definition at line 275 of file suspect_product_rule_editor.cpp.
void CSuspectProductRulesEditor::Init | ( | void | ) |
Initialises member variables.
Member initialisation
Definition at line 156 of file suspect_product_rule_editor.cpp.
References m_DeleteButton, m_Panel, and NULL.
Referenced by CSuspectProductRulesEditor().
|
private |
Definition at line 612 of file suspect_product_rule_editor.cpp.
References CConstraint_choice_set_Base::Get(), CSuspect_rule_Base::GetFeat_constraint(), CConstraint_choice_set_Base::IsSet(), CSuspect_rule_Base::IsSetFeat_constraint(), and str().
Referenced by OnApplyFixes(), and OnListMatches().
void CSuspectProductRulesEditor::OnAddRuleAfter | ( | wxCommandEvent & | event | ) |
Definition at line 891 of file suspect_product_rule_editor.cpp.
References m_TopSeqEntry, and x_SetUpTSEandUnDoManager().
void CSuspectProductRulesEditor::OnAddRuleBefore | ( | wxCommandEvent & | event | ) |
Definition at line 884 of file suspect_product_rule_editor.cpp.
References m_TopSeqEntry, and x_SetUpTSEandUnDoManager().
void CSuspectProductRulesEditor::OnApplyFixes | ( | wxCommandEvent & | event | ) |
Definition at line 630 of file suspect_product_rule_editor.cpp.
References CCmdComposite::AddCommand(), CSerialObject::Assign(), EDIT_EACH_NAME_ON_PROTREF, CRNA_ref_Base::eType_mRNA, ICommandProccessor::Execute(), CSeq_feat_Base::GetData(), CRNA_ref_Base::GetExt(), CRNA_ref_Base::C_Ext::GetName(), CSeqFeatData_Base::GetProt(), CSeqFeatData_Base::GetRna(), CRNA_ref_Base::GetType(), CRNA_ref_Base::C_Ext::IsName(), CSeqFeatData_Base::IsProt(), CSeqFeatData_Base::IsRna(), CSeq_feat_Base::IsSetData(), CRNA_ref_Base::IsSetExt(), CProt_ref_Base::IsSetName(), CRNA_ref_Base::IsSetType(), m_CmdProcessor, m_Rules, m_TopSeqEntry, MatchConstraint(), orig, CSeq_feat_Base::SetData(), and x_SetUpTSEandUnDoManager().
void CSuspectProductRulesEditor::OnDeleteRules | ( | wxCommandEvent & | event | ) |
Definition at line 824 of file suspect_product_rule_editor.cpp.
References set< Key, Compare >::empty(), set< Key, Compare >::end(), set< Key, Compare >::find(), CRearrangeList::GetCurrentOrder(), CRearrangeCtrl::GetList(), i, set< Key, Compare >::insert(), m_DeleteButton, m_Panel, m_Rules, CRearrangeList::Set(), and swap().
void CSuspectProductRulesEditor::OnDisplay | ( | wxCommandEvent & | event | ) |
Definition at line 524 of file suspect_product_rule_editor.cpp.
References CRearrangeList::GetCurrentOrder(), CRearrangeCtrl::GetList(), i, m_Panel, m_Rules, CGenericReportDlg::SetText(), and wxT.
void CSuspectProductRulesEditor::OnFileAdd | ( | wxCommandEvent & | event | ) |
Definition at line 318 of file suspect_product_rule_editor.cpp.
References eSerial_AsnText, file, CRearrangeList::GetCurrentOrder(), CFileExtensions::GetDialogFilter(), CRearrangeCtrl::GetList(), i, CFileExtensions::kAllFiles, m_DefaultDir, m_Panel, m_Rules, ObjectInfo(), CObjectIStream::Open(), CRearrangeList::Set(), and wxT.
void CSuspectProductRulesEditor::OnFileLoad | ( | wxCommandEvent & | event | ) |
Definition at line 282 of file suspect_product_rule_editor.cpp.
References eSerial_AsnText, file, CFileExtensions::GetDialogFilter(), CRearrangeCtrl::GetList(), i, CFileExtensions::kAllFiles, m_DefaultDir, m_DeleteButton, m_File, m_Panel, m_Rules, ObjectInfo(), CObjectIStream::Open(), CRearrangeList::Set(), and wxT.
void CSuspectProductRulesEditor::OnFileSave | ( | wxCommandEvent & | event | ) |
Definition at line 365 of file suspect_product_rule_editor.cpp.
References CRearrangeList::GetCurrentOrder(), CRearrangeCtrl::GetList(), i, m_File, m_Panel, m_Rules, MSerial_AsnText, and out().
void CSuspectProductRulesEditor::OnFileSaveAs | ( | wxCommandEvent & | event | ) |
Definition at line 389 of file suspect_product_rule_editor.cpp.
References file, CRearrangeList::GetCurrentOrder(), CFileExtensions::GetDialogFilter(), CRearrangeCtrl::GetList(), i, CFileExtensions::kAllFiles, m_DefaultDir, m_File, m_Panel, m_Rules, MSerial_AsnText, out(), and wxT.
void CSuspectProductRulesEditor::OnListMatches | ( | wxCommandEvent & | event | ) |
Definition at line 697 of file suspect_product_rule_editor.cpp.
References map_checker< Container >::end(), CRNA_ref_Base::eType_mRNA, map_checker< Container >::find(), FOR_EACH_NAME_ON_PROTREF, CRearrangeList::GetCurrentOrder(), CSeq_feat_Base::GetData(), CRNA_ref_Base::GetExt(), CRearrangeCtrl::GetList(), CRNA_ref_Base::C_Ext::GetName(), CSeqFeatData_Base::GetProt(), CSeqFeatData_Base::GetRna(), GetTextObjectDescription(), CRNA_ref_Base::GetType(), i, CRNA_ref_Base::C_Ext::IsName(), CSeqFeatData_Base::IsProt(), CSeqFeatData_Base::IsRna(), CSeq_feat_Base::IsSetData(), CRNA_ref_Base::IsSetExt(), CProt_ref_Base::IsSetName(), CRNA_ref_Base::IsSetType(), m_Panel, m_Rules, m_TopSeqEntry, MatchConstraint(), CGenericReportDlg::SetText(), wxT, and x_SetUpTSEandUnDoManager().
void CSuspectProductRulesEditor::OnQuit | ( | wxCommandEvent & | event | ) |
Definition at line 418 of file suspect_product_rule_editor.cpp.
void CSuspectProductRulesEditor::OnShowDiffs | ( | wxCommandEvent & | event | ) |
Definition at line 548 of file suspect_product_rule_editor.cpp.
References _, set< Key, Compare >::begin(), set< Key, Compare >::end(), eSerial_AsnText, file, CRearrangeList::GetCurrentOrder(), CFileExtensions::GetDialogFilter(), CRearrangeCtrl::GetList(), i, set< Key, Compare >::insert(), CFileExtensions::kAllFiles, m_DefaultDir, m_Panel, m_Rules, ObjectInfo(), CObjectIStream::Open(), CGenericReportDlg::SetText(), set< Key, Compare >::size(), and wxT.
void CSuspectProductRulesEditor::OnSortByCat | ( | wxCommandEvent & | event | ) |
Definition at line 509 of file suspect_product_rule_editor.cpp.
References CRearrangeList::GetCurrentOrder(), CRearrangeCtrl::GetList(), m_Panel, m_Rules, and CRearrangeList::Set().
void CSuspectProductRulesEditor::OnSortByFind | ( | wxCommandEvent & | event | ) |
Definition at line 472 of file suspect_product_rule_editor.cpp.
References CRearrangeList::GetCurrentOrder(), CRearrangeCtrl::GetList(), m_Panel, m_Rules, and CRearrangeList::Set().
void CSuspectProductRulesEditor::ReplaceRule | ( | CRef< CSuspect_rule > | rule, |
int | n | ||
) |
Definition at line 937 of file suspect_product_rule_editor.cpp.
References CRearrangeList::GetCurrentOrder(), CRearrangeCtrl::GetList(), i, m_Panel, m_Rules, n, CRearrangeList::Set(), CSuspect_rule::SummarizeRule(), and swap().
Referenced by CAddSuspectProductRule::OnAccept().
|
static |
Should we show tooltips?
Should we show tooltips?
Definition at line 255 of file suspect_product_rule_editor.cpp.
|
virtual |
Reimplemented from CCheckListBoxListener.
Definition at line 876 of file suspect_product_rule_editor.cpp.
References m_DeleteButton.
|
private |
Definition at line 775 of file suspect_product_rule_editor.cpp.
References CSelectionService::GetActiveObjects(), IServiceLocator::GetServiceByType(), GetTopSeqEntryFromScopedObject(), CGBDocument::GetUndoManager(), GetViewObjects(), m_CmdProcessor, m_TopSeqEntry, m_Workbench, NON_CONST_ITERATE, and NULL.
Referenced by DoubleClick(), OnAddRuleAfter(), OnAddRuleBefore(), OnApplyFixes(), and OnListMatches().
|
private |
Definition at line 155 of file suspect_product_rule_editor.hpp.
Referenced by OnApplyFixes(), and x_SetUpTSEandUnDoManager().
|
private |
Definition at line 158 of file suspect_product_rule_editor.hpp.
Referenced by OnFileAdd(), OnFileLoad(), OnFileSaveAs(), and OnShowDiffs().
|
private |
Definition at line 160 of file suspect_product_rule_editor.hpp.
Referenced by CreateControls(), Init(), OnDeleteRules(), OnFileLoad(), and UpdateCheckedState().
|
private |
Definition at line 157 of file suspect_product_rule_editor.hpp.
Referenced by CanFileSave(), OnFileLoad(), OnFileSave(), and OnFileSaveAs().
|
private |
Definition at line 156 of file suspect_product_rule_editor.hpp.
Referenced by AddRule(), CreateControls(), DoubleClick(), Init(), OnDeleteRules(), OnDisplay(), OnFileAdd(), OnFileLoad(), OnFileSave(), OnFileSaveAs(), OnListMatches(), OnShowDiffs(), OnSortByCat(), OnSortByFind(), and ReplaceRule().
|
private |
Definition at line 159 of file suspect_product_rule_editor.hpp.
Referenced by AddRule(), CanFileSave(), CanFileSaveAs(), CanSort(), DoubleClick(), OnApplyFixes(), OnDeleteRules(), OnDisplay(), OnFileAdd(), OnFileLoad(), OnFileSave(), OnFileSaveAs(), OnListMatches(), OnShowDiffs(), OnSortByCat(), OnSortByFind(), and ReplaceRule().
|
private |
Definition at line 154 of file suspect_product_rule_editor.hpp.
Referenced by DoubleClick(), OnAddRuleAfter(), OnAddRuleBefore(), OnApplyFixes(), OnListMatches(), and x_SetUpTSEandUnDoManager().
|
private |
Definition at line 153 of file suspect_product_rule_editor.hpp.
Referenced by x_SetUpTSEandUnDoManager().