NCBI C++ ToolKit
|
Search Toolkit Book for CStringConstraintPanel
#include <gui/packages/pkg_sequence_edit/string_constraint_panel.hpp>
Public Member Functions | |
CStringConstraintPanel () | |
Constructors. More... | |
CStringConstraintPanel (wxWindow *parent, bool parentAECRDlg=false, wxWindowID id=ID_CSTRINGCONSTRAINTPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL, bool cap_constraints=false) | |
bool | Create (wxWindow *parent, wxWindowID id=ID_CSTRINGCONSTRAINTPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL) |
Creation. More... | |
~CStringConstraintPanel () | |
Destructor. More... | |
void | Init () |
Initialises member variables. More... | |
void | CreateControls () |
Creates the controls and sizers. More... | |
void | OnClear (wxCommandEvent &event) |
void | OnMatchTypeSelected (wxCommandEvent &event) |
CRef< edit::CStringConstraint > | GetStringConstraint () |
bool | Match (const string &str) |
string | GetMacroStringConstraint (const string &field_name) |
void | SetStringSelection (const wxString &str) |
void | ClearValues (void) |
void | SetChoices (const vector< string > &choices, const vector< string > &values) |
void | ShowChoiceOrText (void) |
wxBitmap | GetBitmapResource (const wxString &name) |
Retrieves bitmap resources. More... | |
wxIcon | GetIconResource (const wxString &name) |
Retrieves icon resources. More... | |
Static Public Member Functions | |
static bool | ShowToolTips () |
Should we show tooltips? More... | |
Private Member Functions | |
string | x_ReplaceChoices (const string &orig) |
Private Attributes | |
wxChoice * | m_MatchType |
wxTextCtrl * | m_MatchText |
wxCheckBox * | m_IgnoreCase |
wxCheckBox * | m_IgnoreSpace |
wxComboBox * | m_MatchChoice |
bool | m_ParentAECRDlg |
flag is set if parent is the AECRDlg, for having specific features More... | |
bool | m_CapConstraints |
wxBoxSizer * | m_TextSizer |
bool | m_is_choice |
map< string, string > | m_ChoiceToValue |
CStringConstraintPanel class declaration
Definition at line 75 of file string_constraint_panel.hpp.
anonymous enum |
Enumerator | |
---|---|
ID_CSTRINGCONSTRAINTPANEL | |
ID_STRING_CONSTRAINT_MATCH_CHOICE | |
ID_STRING_CONSTRAINT_MATCH_TEXT | |
ID_STRING_CONSTRAINT_CHECKBOX5 | |
ID_STRING_CONSTRAINT_CHECKBOX6 | |
ID_STRING_CONSTRAINT_CLEAR_BUTTON |
Definition at line 133 of file string_constraint_panel.hpp.
|
private |
Definition at line 143 of file string_constraint_panel.hpp.
CStringConstraintPanel::CStringConstraintPanel | ( | ) |
Constructors.
CStringConstraintPanel type definition
CStringConstraintPanel event table definition
CStringConstraintPanel constructors
Definition at line 63 of file string_constraint_panel.cpp.
References Init().
CStringConstraintPanel::CStringConstraintPanel | ( | wxWindow * | parent, |
bool | parentAECRDlg = false , |
||
wxWindowID | id = ID_CSTRINGCONSTRAINTPANEL , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(400,300) , |
||
long | style = wxTAB_TRAVERSAL , |
||
bool | cap_constraints = false |
||
) |
Definition at line 68 of file string_constraint_panel.cpp.
References Create(), Init(), and ncbi::grid::netcache::search::fields::size.
CStringConstraintPanel::~CStringConstraintPanel | ( | ) |
Destructor.
CStringConstraintPanel destructor
Definition at line 102 of file string_constraint_panel.cpp.
void CStringConstraintPanel::ClearValues | ( | void | ) |
Definition at line 202 of file string_constraint_panel.cpp.
References _, m_IgnoreCase, m_IgnoreSpace, m_is_choice, m_MatchChoice, m_MatchText, m_MatchType, and m_TextSizer.
Referenced by CConstraintPanel::ClearValues(), and OnClear().
bool CStringConstraintPanel::Create | ( | wxWindow * | parent, |
wxWindowID | id = ID_CSTRINGCONSTRAINTPANEL , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(400,300) , |
||
long | style = wxTAB_TRAVERSAL |
||
) |
Creation.
CStringConstraintPanel creator
Definition at line 80 of file string_constraint_panel.cpp.
References CreateControls(), ShowChoiceOrText(), and ncbi::grid::netcache::search::fields::size.
Referenced by CStringConstraintPanel().
void CStringConstraintPanel::CreateControls | ( | ) |
Creates the controls and sizers.
Control creation for CStringConstraintPanel
Definition at line 131 of file string_constraint_panel.cpp.
References _, ID_STRING_CONSTRAINT_CHECKBOX5, ID_STRING_CONSTRAINT_CHECKBOX6, ID_STRING_CONSTRAINT_CLEAR_BUTTON, ID_STRING_CONSTRAINT_MATCH_CHOICE, ID_STRING_CONSTRAINT_MATCH_TEXT, m_CapConstraints, m_IgnoreCase, m_IgnoreSpace, m_MatchChoice, m_MatchText, m_MatchType, m_ParentAECRDlg, m_TextSizer, and wxID_ANY.
Referenced by Create().
wxBitmap CStringConstraintPanel::GetBitmapResource | ( | const wxString & | name | ) |
Retrieves bitmap resources.
Get bitmap resources
Definition at line 282 of file string_constraint_panel.cpp.
wxIcon CStringConstraintPanel::GetIconResource | ( | const wxString & | name | ) |
Retrieves icon resources.
Get icon resources
Definition at line 295 of file string_constraint_panel.cpp.
Definition at line 374 of file string_constraint_panel.cpp.
References eMatchType_Contains, eMatchType_DoesNotContain, eMatchType_DoesNotEndWith, eMatchType_DoesNotEqual, eMatchType_DoesNotStartWith, eMatchType_EndsWith, eMatchType_Equals, eMatchType_IsNotOneOf, eMatchType_IsOneOf, eMatchType_StartsWith, ctll::empty(), kEmptyStr, m_IgnoreCase, m_IgnoreSpace, m_is_choice, m_MatchChoice, m_MatchText, m_MatchType, NStr::Replace(), ToStdString(), and x_ReplaceChoices().
Referenced by CConstraintPanel::GetMacroStringConstraint().
CRef< edit::CStringConstraint > CStringConstraintPanel::GetStringConstraint | ( | void | ) |
Definition at line 304 of file string_constraint_panel.cpp.
References eMatchType_Contains, eMatchType_DoesNotContain, eMatchType_DoesNotEndWith, eMatchType_DoesNotEqual, eMatchType_DoesNotStartWith, eMatchType_EndsWith, eMatchType_Equals, eMatchType_IsNotOneOf, eMatchType_IsOneOf, eMatchType_StartsWith, m_IgnoreCase, m_IgnoreSpace, m_is_choice, m_MatchChoice, m_MatchText, m_MatchType, not_found, NULL, NStr::Replace(), CRef< C, Locker >::Reset(), ToStdString(), and val.
Referenced by CClearKeywords::ApplyToCSeq_entry(), CApplyIndexerComments::ApplyToCSeq_entry(), CCdsFromGeneMrnaExon::GetCommand(), CConvertCdsWithGapsToMiscFeat::GetCommand(), CConvertFeatDlg::GetCommand(), CEditPubDlg::GetCommand(), CExonFromCds::GetCommand(), CExtendPartialFeatDlg::GetCommand(), CFuseFeaturesDlg::GetCommand(), CGeneFeatFromOtherFeatDlg::GetCommand(), CmRNAFromGeneCdsExon::GetCommand(), CRmDupFeaturesDlg::GetCommand(), CRemoveGeneXrefs::GetCommand(), CResolveIntersectingFeats::GetCommand(), CSuppressGenes::GetCommand(), CtRNAFromGene::GetCommand(), CAddFeatureBetweenDlg::GetFeatureLocations(), CEditPubDlg::GetStringConstraint(), CFieldConstraintPanel::GetStringConstraint(), CConstraintPanel::GetStringConstraint(), Match(), CCdsToMatPeptide::MergeConvert(), CSelectFeatures::OnAccept(), CBarcodeTool::OnSelect(), CRemoveSequencesDlg::OnSelect(), CRevCompSequencesDlg::OnSelect(), CIDSubpanel::OnSelectButton(), CEditSeqId::x_CollectChangedIds(), and CRemoveGeneralId::x_CollectChangedIds().
void CStringConstraintPanel::Init | ( | void | ) |
Initialises member variables.
Member initialisation
Definition at line 113 of file string_constraint_panel.cpp.
References m_IgnoreCase, m_IgnoreSpace, m_is_choice, m_MatchChoice, m_MatchText, m_MatchType, m_TextSizer, and NULL.
Referenced by CStringConstraintPanel().
Definition at line 445 of file string_constraint_panel.cpp.
References eMatchType_Is_all_caps, eMatchType_Is_first_each_cap, eMatchType_IsFirstCap, GetStringConstraint(), m_MatchType, CString_constraint::Match(), not_found, CString_constraint_Base::SetIs_all_caps(), CString_constraint_Base::SetIs_first_cap(), CString_constraint_Base::SetIs_first_each_cap(), str(), and val.
Referenced by CStringConstraintSelect::OnApply().
void CStringConstraintPanel::OnClear | ( | wxCommandEvent & | event | ) |
Definition at line 197 of file string_constraint_panel.cpp.
References ClearValues().
void CStringConstraintPanel::OnMatchTypeSelected | ( | wxCommandEvent & | event | ) |
Definition at line 263 of file string_constraint_panel.cpp.
References ShowChoiceOrText().
void CStringConstraintPanel::SetChoices | ( | const vector< string > & | choices, |
const vector< string > & | values | ||
) |
Definition at line 219 of file string_constraint_panel.cpp.
References _ASSERT, map_checker< Container >::clear(), i, ITERATE, m_ChoiceToValue, m_MatchChoice, ShowChoiceOrText(), and ToWxString().
Referenced by CAddFeatureBetweenDlg::OnFeatLeftChanged(), CAddFeatureBetweenDlg::OnFeatRightChanged(), and CConstraintPanel::UpdateEditor().
|
inline |
Definition at line 117 of file string_constraint_panel.hpp.
References m_MatchType, and str().
Referenced by CApplyIndexerComments::CreateControls(), CBarcodeTool::CreateControls(), CClearKeywords::CreateControls(), CConvertCdsToMiscFeat::CreateControls(), CEditSeqId::CreateControls(), CRemoveGeneralId::CreateControls(), CRemoveGeneXrefs::CreateControls(), CRemoveSequencesDlg::CreateControls(), and CSuppressGenes::CreateControls().
void CStringConstraintPanel::ShowChoiceOrText | ( | void | ) |
Definition at line 236 of file string_constraint_panel.cpp.
References eMatchType_DoesNotEqual, eMatchType_Equals, m_is_choice, m_MatchChoice, m_MatchText, m_MatchType, and m_TextSizer.
Referenced by Create(), OnMatchTypeSelected(), and SetChoices().
|
static |
Should we show tooltips?
Should we show tooltips?
Definition at line 273 of file string_constraint_panel.cpp.
Definition at line 436 of file string_constraint_panel.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), m_ChoiceToValue, orig, and result.
Referenced by GetMacroStringConstraint().
|
private |
Definition at line 171 of file string_constraint_panel.hpp.
Referenced by CreateControls().
Definition at line 174 of file string_constraint_panel.hpp.
Referenced by SetChoices(), and x_ReplaceChoices().
|
private |
Definition at line 164 of file string_constraint_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetMacroStringConstraint(), GetStringConstraint(), and Init().
|
private |
Definition at line 165 of file string_constraint_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetMacroStringConstraint(), GetStringConstraint(), and Init().
|
private |
Definition at line 173 of file string_constraint_panel.hpp.
Referenced by ClearValues(), GetMacroStringConstraint(), GetStringConstraint(), Init(), and ShowChoiceOrText().
|
private |
Definition at line 166 of file string_constraint_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetMacroStringConstraint(), GetStringConstraint(), Init(), SetChoices(), and ShowChoiceOrText().
|
private |
Definition at line 163 of file string_constraint_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetMacroStringConstraint(), GetStringConstraint(), Init(), and ShowChoiceOrText().
|
private |
Definition at line 162 of file string_constraint_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetMacroStringConstraint(), GetStringConstraint(), Init(), Match(), SetStringSelection(), and ShowChoiceOrText().
|
private |
flag is set if parent is the AECRDlg, for having specific features
Definition at line 169 of file string_constraint_panel.hpp.
Referenced by CreateControls().
|
private |
Definition at line 172 of file string_constraint_panel.hpp.
Referenced by ClearValues(), CreateControls(), Init(), and ShowChoiceOrText().