NCBI C++ ToolKit
|
Search Toolkit Book for CRNAFieldNamePanel
#include <gui/widgets/edit/rna_field_name_panel.hpp>
Public Types | |
enum | { ID_CRNAFIELDNAMEPANEL = 6060 , ID_CRNAFIELDNAME_RNA_TYPE , ID_CRNAFIELDNAME_NCRNA_CLASS , ID_CRNAFIELDNAME_RNA_FIELD } |
![]() | |
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 } |
Public Member Functions | |
CRNAFieldNamePanel () | |
Constructors. More... | |
CRNAFieldNamePanel (wxWindow *parent, CRNAFieldNamePanel *sibling=NULL, wxWindowID id=ID_CRNAFIELDNAMEPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL) | |
bool | Create (wxWindow *parent, wxWindowID id=ID_CRNAFIELDNAMEPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL) |
Creation. More... | |
~CRNAFieldNamePanel () | |
Destructor. More... | |
void | Init () |
Initialises member variables. More... | |
void | CreateControls () |
Creates the controls and sizers. More... | |
void | OnRnaTypeSelected (wxCommandEvent &event) |
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_RNA_TYPE More... | |
void | OnRnaFieldSelected (wxCommandEvent &event) |
void | OnncRNAClassSelected (wxCommandEvent &event) |
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) |
string | GetRnaType () |
bool | SetRnaType (const string &rna_type) |
string | GetRnaTypeOnly (void) |
string | GetNcrnaType (void) |
string | GetRnaField (void) |
virtual void | ClearValues (void) |
virtual string | GetMacroFieldName (const string &target, const string &selected_field=kEmptyStr) |
![]() | |
CFieldNamePanel () | |
Constructors. More... | |
~CFieldNamePanel () | |
Destructor. More... | |
virtual vector< string > | GetChoices (bool &allow_other) |
virtual vector< string > | GetMacroValues () |
virtual void | SetShowLegalOnly (bool show) |
virtual string | GetMacroFieldLabel (const string &target, const string &selected_field=kEmptyStr) |
Static Public Member Functions | |
static bool | ShowToolTips () |
Should we show tooltips? More... | |
static vector< string > | GetRNATypes () |
static vector< string > | GetRNAFields () |
static string | s_GetMacroFieldName (const string &rna_type, const string &qual_field, const string &target, const string &selected_field=kEmptyStr) |
![]() | |
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 | |
wxStaticText * | m_RnaTypeLabel |
wxChoice * | m_RNAType |
wxComboBox * | m_NcrnaClass |
wxListBox * | m_RnaField |
Private Member Functions | |
void | x_EnableNcRnaClass () |
Private Attributes | |
CRNAFieldNamePanel * | m_Sibling |
Additional Inherited Members | |
![]() | |
void | x_UpdateParent (void) |
bool | x_IsParentAECRDlg (void) |
void | x_UpdateAECRDlgLayout (void) |
bool | x_ShouldDecreaseStrConstrPanel (void) |
CRNAFieldNamePanel class declaration
Definition at line 71 of file rna_field_name_panel.hpp.
anonymous enum |
Enumerator | |
---|---|
ID_CRNAFIELDNAMEPANEL | |
ID_CRNAFIELDNAME_RNA_TYPE | |
ID_CRNAFIELDNAME_NCRNA_CLASS | |
ID_CRNAFIELDNAME_RNA_FIELD |
Definition at line 124 of file rna_field_name_panel.hpp.
CRNAFieldNamePanel::CRNAFieldNamePanel | ( | ) |
Constructors.
CRNAFieldNamePanel type definition
CRNAFieldNamePanel event table definition
CRNAFieldNamePanel constructors
Definition at line 68 of file rna_field_name_panel.cpp.
References Init().
CRNAFieldNamePanel::CRNAFieldNamePanel | ( | wxWindow * | parent, |
CRNAFieldNamePanel * | sibling = NULL , |
||
wxWindowID | id = ID_CRNAFIELDNAMEPANEL , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(400, 300) , |
||
long | style = wxTAB_TRAVERSAL |
||
) |
Definition at line 73 of file rna_field_name_panel.cpp.
References Create(), Init(), and ncbi::grid::netcache::search::fields::size.
CRNAFieldNamePanel::~CRNAFieldNamePanel | ( | ) |
|
virtual |
Reimplemented from CFieldNamePanel.
Definition at line 185 of file rna_field_name_panel.cpp.
References _, m_NcrnaClass, m_RnaField, and m_RNAType.
bool CRNAFieldNamePanel::Create | ( | wxWindow * | parent, |
wxWindowID | id = ID_CRNAFIELDNAMEPANEL , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(400, 300) , |
||
long | style = wxTAB_TRAVERSAL |
||
) |
Creation.
CRNAFieldNamePanel creator
Definition at line 85 of file rna_field_name_panel.cpp.
References CreateControls(), and ncbi::grid::netcache::search::fields::size.
Referenced by CRNAFieldNamePanel().
void CRNAFieldNamePanel::CreateControls | ( | ) |
Creates the controls and sizers.
Control creation for CRNAFieldNamePanel
Definition at line 131 of file rna_field_name_panel.cpp.
References _, GetRNAFields(), GetRNATypes(), ID_CRNAFIELDNAME_NCRNA_CLASS, ID_CRNAFIELDNAME_RNA_FIELD, ID_CRNAFIELDNAME_RNA_TYPE, ITERATE, m_NcrnaClass, m_RnaField, m_RNAType, m_RnaTypeLabel, m_Sibling, ToWxString(), and x_EnableNcRnaClass().
Referenced by Create().
wxBitmap CRNAFieldNamePanel::GetBitmapResource | ( | const wxString & | name | ) |
Retrieves bitmap resources.
Get bitmap resources
Definition at line 208 of file rna_field_name_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 280 of file rna_field_name_panel.cpp.
References GetRnaType(), NStr::IsBlank(), m_RnaField, and val.
Referenced by GetRnaField().
wxIcon CRNAFieldNamePanel::GetIconResource | ( | const wxString & | name | ) |
Retrieves icon resources.
Get icon resources
Definition at line 221 of file rna_field_name_panel.cpp.
|
virtual |
Reimplemented from CFieldNamePanel.
Definition at line 433 of file rna_field_name_panel.cpp.
References m_RnaField, m_RNAType, s_GetMacroFieldName(), ToStdString(), and val.
string CRNAFieldNamePanel::GetNcrnaType | ( | void | ) |
Definition at line 270 of file rna_field_name_panel.cpp.
References m_NcrnaClass.
Referenced by GetSubtype().
string CRNAFieldNamePanel::GetRnaField | ( | void | ) |
Definition at line 275 of file rna_field_name_panel.cpp.
References GetFieldName().
|
static |
Definition at line 415 of file rna_field_name_panel.cpp.
Referenced by CFieldChoicePanel::AutoMatchRNA(), CreateControls(), CDualRNAFieldNamePanel::CreateControls(), and CMacroEditorContext::GetFieldNames().
string CRNAFieldNamePanel::GetRnaType | ( | ) |
Definition at line 231 of file rna_field_name_panel.cpp.
References NStr::eNocase, NStr::EqualNocase(), GetRnaType(), m_NcrnaClass, m_RNAType, m_Sibling, NStr::StartsWith(), ToStdString(), and val.
Referenced by GetFieldName(), and GetRnaType().
string CRNAFieldNamePanel::GetRnaTypeOnly | ( | void | ) |
Definition at line 256 of file rna_field_name_panel.cpp.
References GetRnaTypeOnly(), i, kEmptyStr, m_RNAType, and m_Sibling.
Referenced by GetRnaTypeOnly(), GetSubtype(), and CSelectQualdDlg::UpdateEditor().
|
static |
Definition at line 400 of file rna_field_name_panel.cpp.
Referenced by CFieldChoicePanel::AutoMatchRNA(), CreateControls(), CDualRNAFieldNamePanel::CreateControls(), and CMacroEditorContext::GetRNATypes().
void CRNAFieldNamePanel::Init | ( | void | ) |
Initialises member variables.
Member initialisation
Definition at line 116 of file rna_field_name_panel.cpp.
References m_NcrnaClass, m_RnaField, m_RNAType, m_RnaTypeLabel, and NULL.
Referenced by CRNAFieldNamePanel().
void CRNAFieldNamePanel::OnncRNAClassSelected | ( | wxCommandEvent & | event | ) |
Definition at line 394 of file rna_field_name_panel.cpp.
References CFieldNamePanel::x_UpdateParent().
void CRNAFieldNamePanel::OnRnaFieldSelected | ( | wxCommandEvent & | event | ) |
Definition at line 388 of file rna_field_name_panel.cpp.
References CFieldNamePanel::x_UpdateParent().
void CRNAFieldNamePanel::OnRnaTypeSelected | ( | wxCommandEvent & | event | ) |
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_RNA_TYPE
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_RNA_TYPE
Definition at line 381 of file rna_field_name_panel.cpp.
References x_EnableNcRnaClass(), and CFieldNamePanel::x_UpdateParent().
|
static |
Definition at line 445 of file rna_field_name_panel.cpp.
References eGene, eRNA, CMacroEditorContext::GetAsnPathToFieldName(), CMacroEditorContext::GetInstance(), CFieldNamePanel::IsFeature(), NPOS, NStr::StartsWith(), and str().
Referenced by GetMacroFieldName(), and CTableReaderMacro::x_GetMatchFieldConstraint().
Implements CFieldNamePanel.
Definition at line 339 of file rna_field_name_panel.cpp.
References NStr::EndsWith(), i, m_NcrnaClass, m_RnaField, SetRnaType(), ToStdString(), NStr::TruncateSpacesInPlace(), and CFieldNamePanel::x_UpdateParent().
Referenced by CConstraintPanel::CreateControls(), and CQualChoicePanel::CreateControls().
Definition at line 300 of file rna_field_name_panel.cpp.
References NStr::EqualNocase(), i, NStr::IsBlank(), m_NcrnaClass, m_RNAType, m_Sibling, SetRnaType(), ncbi::grid::netcache::search::fields::size, NStr::StartsWith(), ToStdString(), ToWxString(), NStr::TruncateSpacesInPlace(), and x_EnableNcRnaClass().
Referenced by SetFieldName(), and SetRnaType().
|
static |
Should we show tooltips?
Should we show tooltips?
Definition at line 199 of file rna_field_name_panel.cpp.
|
private |
Definition at line 366 of file rna_field_name_panel.cpp.
References NStr::EqualNocase(), m_NcrnaClass, m_RNAType, and ToStdString().
Referenced by CreateControls(), OnRnaTypeSelected(), and SetRnaType().
wxComboBox* CRNAFieldNamePanel::m_NcrnaClass |
Definition at line 132 of file rna_field_name_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetNcrnaType(), GetRnaType(), Init(), SetFieldName(), SetRnaType(), and x_EnableNcRnaClass().
wxListBox* CRNAFieldNamePanel::m_RnaField |
Definition at line 133 of file rna_field_name_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetFieldName(), GetMacroFieldName(), Init(), and SetFieldName().
wxChoice* CRNAFieldNamePanel::m_RNAType |
Definition at line 131 of file rna_field_name_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetMacroFieldName(), GetRnaType(), GetRnaTypeOnly(), Init(), SetRnaType(), and x_EnableNcRnaClass().
wxStaticText* CRNAFieldNamePanel::m_RnaTypeLabel |
Definition at line 130 of file rna_field_name_panel.hpp.
Referenced by CreateControls(), and Init().
|
private |
Definition at line 151 of file rna_field_name_panel.hpp.
Referenced by CreateControls(), GetRnaType(), GetRnaTypeOnly(), and SetRnaType().