NCBI C++ ToolKit
|
Search Toolkit Book for CFeatureTypePanel
#include <gui/widgets/edit/feature_type_panel.hpp>
Public Member Functions | |
CFeatureTypePanel () | |
Constructors. More... | |
CFeatureTypePanel (wxWindow *parent, wxWindowID id=10179, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxSIMPLE_BORDER|wxTAB_TRAVERSAL) | |
bool | Create (wxWindow *parent, wxWindowID id=10179, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxSIMPLE_BORDER|wxTAB_TRAVERSAL) |
Creation. More... | |
~CFeatureTypePanel () | |
Destructor. More... | |
void | Init () |
Initialises member variables. More... | |
void | CreateControls () |
Creates the controls and sizers. More... | |
void | OnListbox1Selected (wxCommandEvent &event) |
wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_LISTBOX1 More... | |
void | ListAnyOption (void) |
void | ListAllOption (void) |
void | ListPresentFeaturesFirst (const objects::CSeq_entry_Handle &entry, vector< const objects::CFeatListItem * > *featlist=nullptr) |
wxBitmap | GetBitmapResource (const wxString &name) |
Retrieves bitmap resources. More... | |
wxIcon | GetIconResource (const wxString &name) |
Retrieves icon resources. More... | |
virtual string | GetFieldName (const bool subfield=false) |
Returns the name of the field as selected in the panel. More... | |
virtual bool | SetFieldName (const string &field) |
virtual void | ClearValues (void) |
void | SetListAllFeats (bool flag) |
virtual void | SetShowLegalOnly (bool show) |
Public Member Functions inherited from CFieldNamePanel | |
CFieldNamePanel () | |
Constructors. More... | |
~CFieldNamePanel () | |
Destructor. More... | |
virtual vector< string > | GetChoices (bool &allow_other) |
virtual vector< string > | GetMacroValues () |
virtual string | GetMacroFieldName (const string &target, const string &selected_field=kEmptyStr) |
virtual string | GetMacroFieldLabel (const string &target, const string &selected_field=kEmptyStr) |
Static Public Member Functions | |
static bool | ShowToolTips () |
Should we show tooltips? More... | |
static bool | s_IsRarelyUsedOrDiscouragedFeatureType (int subtype) |
Static Public Member Functions inherited from CFieldNamePanel | |
static string | GetFieldTypeName (EFieldType field_type) |
static EFieldType | GetFieldTypeFromName (const string &field_type_name) |
static bool | IsFeature (const string &target) |
static bool | IsDescriptor (const string &target) |
Public Attributes | |
wxListBox * | m_List |
Private Attributes | |
vector< string > | m_Featlist |
bool | m_list_all_feats |
bool | m_show_legal_only |
Additional Inherited Members | |
Public Types inherited from CFieldNamePanel | |
enum | EFieldType { eFieldType_Unknown = 0 , eFieldType_Source , eFieldType_Feature , eFieldType_CDSGeneProt , eFieldType_RNA , eFieldType_Gene , eFieldType_Protein , eFieldType_MolInfo , eFieldType_Pub , eFieldType_StructuredComment , eFieldType_BankITComment , eFieldType_Comment , eFieldType_DBLink , eFieldType_Dbxref , eFieldType_Misc , eFieldType_DefLine , eFieldType_TaxnameAfterBinomial , eFieldType_FlatFile , eFieldType_FileId , eFieldType_GeneralId , eFieldType_LocalId , eFieldType_SeqId , eFieldType_Taxname } |
Protected Member Functions inherited from CFieldNamePanel | |
void | x_UpdateParent (void) |
bool | x_IsParentAECRDlg (void) |
void | x_UpdateAECRDlgLayout (void) |
bool | x_ShouldDecreaseStrConstrPanel (void) |
CFeatureTypePanel class declaration
Definition at line 65 of file feature_type_panel.hpp.
CFeatureTypePanel::CFeatureTypePanel | ( | ) |
Constructors.
CFeatureTypePanel type definition
CFeatureTypePanel constructors
Definition at line 67 of file feature_type_panel.cpp.
References Init().
CFeatureTypePanel::CFeatureTypePanel | ( | wxWindow * | parent, |
wxWindowID | id = 10179 , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxSIMPLE_BORDER|wxTAB_TRAVERSAL |
||
) |
Definition at line 72 of file feature_type_panel.cpp.
References Create(), Init(), and ncbi::grid::netcache::search::fields::size.
CFeatureTypePanel::~CFeatureTypePanel | ( | ) |
|
virtual |
Reimplemented from CFieldNamePanel.
Definition at line 156 of file feature_type_panel.cpp.
References m_List.
Referenced by CFeatureFieldNamePanel::ClearValues().
bool CFeatureTypePanel::Create | ( | wxWindow * | parent, |
wxWindowID | id = 10179 , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxSIMPLE_BORDER|wxTAB_TRAVERSAL |
||
) |
Creation.
CFeatureTypePanel creator
Definition at line 83 of file feature_type_panel.cpp.
References CreateControls(), and ncbi::grid::netcache::search::fields::size.
Referenced by CFeatureTypePanel().
void CFeatureTypePanel::CreateControls | ( | ) |
Creates the controls and sizers.
Control creation for CFeatureTypePanel
Definition at line 128 of file feature_type_panel.cpp.
References ID_LISTBOX1, and m_List.
Referenced by Create().
wxBitmap CFeatureTypePanel::GetBitmapResource | ( | const wxString & | name | ) |
Retrieves bitmap resources.
Get bitmap resources
Definition at line 218 of file feature_type_panel.cpp.
Returns the name of the field as selected in the panel.
In case of names composed of multiple words, for example, feature_name + qualifier when the subfield parameter is true, the qualifier name is returned only.
Implements CFieldNamePanel.
Definition at line 252 of file feature_type_panel.cpp.
References m_List, and ToStdString().
Referenced by CConvertFeatDlg::DoesObjectAllQualsMatchFieldConstraint(), CBulkEditFeatDlg::GetCommand(), CConvertFeatDlg::GetCommand(), CExtendPartialFeatDlg::GetCommand(), CFuseFeaturesDlg::GetCommand(), CGeneFeatFromOtherFeatDlg::GetCommand(), CRmDupFeaturesDlg::GetCommand(), CResolveIntersectingFeats::GetCommand(), CUpdateSeqPanel::GetData(), CFeatureFieldNamePanel::GetFeatureType(), CMacroFeatsOnSeqPanel::GetFuncWithArgs(), CMacroFeatsOnSeqPanel::GetMatcher(), CSelectFeatures::OnAccept(), CFeatureTypeSubpanel::OnSelectButton(), CGeneFeatFromOtherFeatDlg::OnSelectFeature(), CFeatureTypeSubpanel::SetClusters(), and CConvertFeatDlg::UpdateEditor().
wxIcon CFeatureTypePanel::GetIconResource | ( | const wxString & | name | ) |
void CFeatureTypePanel::Init | ( | void | ) |
Initialises member variables.
Member initialisation
Definition at line 114 of file feature_type_panel.cpp.
References m_List, m_list_all_feats, m_show_legal_only, and NULL.
Referenced by CFeatureTypePanel().
void CFeatureTypePanel::ListAllOption | ( | void | ) |
Definition at line 151 of file feature_type_panel.cpp.
References m_List, and ToWxString().
void CFeatureTypePanel::ListAnyOption | ( | void | ) |
Definition at line 146 of file feature_type_panel.cpp.
References m_List, and ToWxString().
Referenced by CBulkEditFeatDlg::CreateControls(), CExtendPartialFeatDlg::CreateControls(), CMacroFeatsOnSeqPanel::CreateControls(), CUpdateSeqPanel::CreateControls(), CBulkEditFeatDlg::ProcessUpdateFeatEvent(), CExtendPartialFeatDlg::ProcessUpdateFeatEvent(), CGeneFeatFromOtherFeatDlg::ProcessUpdateFeatEvent(), and CUpdateSeqPanel::UpdatePanel().
void CFeatureTypePanel::ListPresentFeaturesFirst | ( | const objects::CSeq_entry_Handle & | entry, |
vector< const objects::CFeatListItem * > * | featlist = nullptr |
||
) |
Definition at line 163 of file feature_type_panel.cpp.
References compile_time_bits::const_bitset< _Bits, T >::empty(), set< Key, Compare >::end(), set< Key, Compare >::find(), CFeatListItem::GetDescription(), CSeqFeatData::GetLegalQualifiers(), GetSortedFeatList(), CFeatListItem::GetSubtype(), CFeatListItem::GetType(), i, set< Key, Compare >::insert(), CSeqFeatData::IsRegulatory(), ITERATE, m_Featlist, m_List, m_list_all_feats, m_show_legal_only, s_IsRarelyUsedOrDiscouragedFeatureType(), CSeqFeatData::SubtypeNameToValue(), ToWxString(), and types.
Referenced by CBulkEditFeatDlg::CreateControls(), CConvertFeatDlg::CreateControls(), CExtendPartialFeatDlg::CreateControls(), CFuseFeaturesDlg::CreateControls(), CGeneFeatFromOtherFeatDlg::CreateControls(), CRmDupFeaturesDlg::CreateControls(), CResolveIntersectingFeats::CreateControls(), CSelectFeatures::CreateControls(), CMacroFeatsOnSeqPanel::CreateControls(), CUpdateSeqPanel::CreateControls(), CFeatureFieldNamePanel::ListPresentFeaturesFirst(), CBulkCmdDlg::UpdateChildrenFeaturePanels(), CCdsFromGeneMrnaExon::UpdateChildrenFeaturePanels(), CCdsToMatPeptide::UpdateChildrenFeaturePanels(), CFuseFeaturesDlg::UpdateChildrenFeaturePanels(), CmRNAFromGeneCdsExon::UpdateChildrenFeaturePanels(), CRmDupFeaturesDlg::UpdateChildrenFeaturePanels(), CResolveIntersectingFeats::UpdateChildrenFeaturePanels(), CFieldSubpanel::UpdateChildrenFeaturePanels(), CSelectFeatures::UpdateChildrenFeaturePanels(), CtRNAFromGene::UpdateChildrenFeaturePanels(), CBulkEditFeatDlg::UpdateChildrenFeaturePanels(), CParseTextDlg::UpdateChildrenFeaturePanels(), CAttribTableColumnIdPanel::UpdateChildrenFeaturePanels(), CAECRFrame::UpdateChildrenFeaturePanels(), and CUpdateSeqPanel::UpdatePanel().
void CFeatureTypePanel::OnListbox1Selected | ( | wxCommandEvent & | event | ) |
wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_LISTBOX1
wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_LISTBOX1
Definition at line 245 of file feature_type_panel.cpp.
References CFieldNamePanel::x_UpdateParent().
Definition at line 280 of file feature_type_panel.cpp.
References CSeqFeatData::eSubtype_allele, CSeqFeatData::eSubtype_assembly_gap, CSeqFeatData::eSubtype_bad, CSeqFeatData::eSubtype_biosrc, CSeqFeatData::eSubtype_bond, CSeqFeatData::eSubtype_clone, CSeqFeatData::eSubtype_conflict, CSeqFeatData::eSubtype_gap, CSeqFeatData::eSubtype_het, CSeqFeatData::eSubtype_imp, CSeqFeatData::eSubtype_mat_peptide, CSeqFeatData::eSubtype_mutation, CSeqFeatData::eSubtype_non_std_residue, CSeqFeatData::eSubtype_num, CSeqFeatData::eSubtype_old_sequence, CSeqFeatData::eSubtype_org, CSeqFeatData::eSubtype_prim_transcript, CSeqFeatData::eSubtype_pub, CSeqFeatData::eSubtype_repeat_unit, CSeqFeatData::eSubtype_satellite, CSeqFeatData::eSubtype_seq, CSeqFeatData::eSubtype_sig_peptide, CSeqFeatData::eSubtype_STS, CSeqFeatData::eSubtype_transit_peptide, CSeqFeatData::eSubtype_unsure, CSeqFeatData::eSubtype_variation_ref, and CSeqFeatData::eSubtype_virion.
Referenced by CMacroEditorContext::GetFeatureTypes(), ListPresentFeaturesFirst(), CMacroFeatsOnSeqPanel::x_GetFeatureChoices(), CAddFeatureBetweenDlg::x_ListFeatures(), CBulkOtherAddPanel::x_ListFeatures(), and CAlignOtherAddPanel::x_ListFeatures().
Implements CFieldNamePanel.
Definition at line 258 of file feature_type_panel.cpp.
References NStr::EqualNocase(), m_List, and ToWxString().
Referenced by CExtendPartialFeatDlg::ApplyToAllAndDie(), CUpdateSeqPanel::OnImportChecked(), CFeatureFieldNamePanel::SetFeatureType(), and CMacroFeatsOnSeqPanel::SetMatcher().
|
inline |
Definition at line 119 of file feature_type_panel.hpp.
References m_list_all_feats.
Referenced by CConvertFeatDlg::CreateControls().
|
virtual |
Reimplemented from CFieldNamePanel.
Definition at line 275 of file feature_type_panel.cpp.
References m_show_legal_only.
Referenced by CFeatureFieldNamePanel::SetShowLegalOnly().
|
static |
Should we show tooltips?
Should we show tooltips?
Definition at line 209 of file feature_type_panel.cpp.
|
private |
Definition at line 123 of file feature_type_panel.hpp.
Referenced by ListPresentFeaturesFirst().
wxListBox* CFeatureTypePanel::m_List |
Definition at line 114 of file feature_type_panel.hpp.
Referenced by ClearValues(), CGeneFeatFromOtherFeatDlg::CreateControls(), CreateControls(), GetFieldName(), Init(), ListAllOption(), ListAnyOption(), ListPresentFeaturesFirst(), and SetFieldName().
|
private |
Definition at line 124 of file feature_type_panel.hpp.
Referenced by Init(), ListPresentFeaturesFirst(), and SetListAllFeats().
|
private |
Definition at line 125 of file feature_type_panel.hpp.
Referenced by Init(), ListPresentFeaturesFirst(), and SetShowLegalOnly().