NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
CSourceFieldNamePanel Class Reference

Search Toolkit Book for CSourceFieldNamePanel

#include <gui/widgets/edit/source_field_name_panel.hpp>

+ Inheritance diagram for CSourceFieldNamePanel:
+ Collaboration diagram for CSourceFieldNamePanel:

Public Types

enum  {
  ID_CSOURCEFIELDNAMEPANEL = 6040 , ID_CSOURCEFIELD_TEXT_QUAL_BTN , ID_CSOURCEFIELD_TAXONOMY_BTN , ID_CSOURCEFIELD_LOCATION_BTN ,
  ID_CSOURCEFIELD_ORIGIN_BTN , ID_CSOURCEFIELD_SRC_SUBLIST , ID_CSOURCEFIELD_SRCTYPES
}
 
- 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
}
 

Public Member Functions

 CSourceFieldNamePanel ()
 Constructors. More...
 
 CSourceFieldNamePanel (wxWindow *parent, bool additional_items=false, wxWindowID id=ID_CSOURCEFIELDNAMEPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
 
bool Create (wxWindow *parent, wxWindowID id=ID_CSOURCEFIELDNAMEPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
 Creation. More...
 
 ~CSourceFieldNamePanel ()
 Destructor. More...
 
void Init ()
 Initialises member variables. More...
 
void CreateControls ()
 Creates the controls and sizers. More...
 
void OnTextQualBtnSelected (wxCommandEvent &event)
 wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TEXT_QUAL_BTN More...
 
void OnTaxonomyBtnSelected (wxCommandEvent &event)
 wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TAXONOMY_BTN More...
 
void OnLocationBtnSelected (wxCommandEvent &event)
 wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_LOCATION_BTN More...
 
void OnOriginBtnSelected (wxCommandEvent &event)
 wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ORIGIN_BTN More...
 
void OnSrcSublistSelected (wxCommandEvent &event)
 wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_SRC_SUBLIST More...
 
wxBitmap GetBitmapResource (const wxString &name)
 Retrieves bitmap resources. More...
 
wxIcon GetIconResource (const wxString &name)
 Retrieves icon resources. More...
 
void HideSourceType ()
 
void DoNotShowSubList (bool val)
 
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 vector< stringGetChoices (bool &allow_other)
 
virtual string GetMacroFieldName (const string &target, const string &selected_field=kEmptyStr)
 
void SetSourceSubpanelSelection (const string &sel)
 
void AddAdditionalItems (void)
 
virtual void ClearValues (void)
 
- Public Member Functions inherited from CFieldNamePanel
 CFieldNamePanel ()
 Constructors. More...
 
 ~CFieldNamePanel ()
 Destructor. More...
 
virtual vector< stringGetMacroValues ()
 
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< strings_GetSourceOriginOptions ()
 
static vector< strings_GetSourceLocationOptions ()
 
- 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

wxRadioButton * m_TextQualifier
 
wxRadioButton * m_Taxonomy
 
wxRadioButton * m_Location
 
wxRadioButton * m_Origin
 
wxListBox * m_SourceSubList
 
wxRadioBox * m_SourceType
 

Private Member Functions

void x_ChooseTextQualifier ()
 
void x_ChooseTaxonomy ()
 
void x_ChooseLocation ()
 

Private Attributes

bool m_AdditionalItems
 
bool m_DoNotShowSubList
 
bool m_is_taxonomy_panel
 
bool m_first_run
 

Additional Inherited Members

- Protected Member Functions inherited from CFieldNamePanel
void x_UpdateParent (void)
 
bool x_IsParentAECRDlg (void)
 
void x_UpdateAECRDlgLayout (void)
 
bool x_ShouldDecreaseStrConstrPanel (void)
 

Detailed Description

CSourceFieldNamePanel class declaration

Definition at line 57 of file source_field_name_panel.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ID_CSOURCEFIELDNAMEPANEL 
ID_CSOURCEFIELD_TEXT_QUAL_BTN 
ID_CSOURCEFIELD_TAXONOMY_BTN 
ID_CSOURCEFIELD_LOCATION_BTN 
ID_CSOURCEFIELD_ORIGIN_BTN 
ID_CSOURCEFIELD_SRC_SUBLIST 
ID_CSOURCEFIELD_SRCTYPES 

Definition at line 122 of file source_field_name_panel.hpp.

Constructor & Destructor Documentation

◆ CSourceFieldNamePanel() [1/2]

CSourceFieldNamePanel::CSourceFieldNamePanel ( )

Constructors.

CSourceFieldNamePanel type definition

CSourceFieldNamePanel event table definition

CSourceFieldNamePanel constructors

Definition at line 80 of file source_field_name_panel.cpp.

References Init().

◆ CSourceFieldNamePanel() [2/2]

CSourceFieldNamePanel::CSourceFieldNamePanel ( wxWindow *  parent,
bool  additional_items = false,
wxWindowID  id = ID_CSOURCEFIELDNAMEPANEL,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize(400, 300),
long  style = wxTAB_TRAVERSAL 
)

◆ ~CSourceFieldNamePanel()

CSourceFieldNamePanel::~CSourceFieldNamePanel ( )

Destructor.

CSourceFieldNamePanel destructor

Definition at line 117 of file source_field_name_panel.cpp.

Member Function Documentation

◆ AddAdditionalItems()

void CSourceFieldNamePanel::AddAdditionalItems ( void  )
inline

Definition at line 145 of file source_field_name_panel.hpp.

References m_AdditionalItems, and x_ChooseTextQualifier().

◆ ClearValues()

void CSourceFieldNamePanel::ClearValues ( void  )
virtual

◆ Create()

bool CSourceFieldNamePanel::Create ( wxWindow *  parent,
wxWindowID  id = ID_CSOURCEFIELDNAMEPANEL,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize(400, 300),
long  style = wxTAB_TRAVERSAL 
)

◆ CreateControls()

void CSourceFieldNamePanel::CreateControls ( )

◆ DoNotShowSubList()

void CSourceFieldNamePanel::DoNotShowSubList ( bool  val)
inline

Definition at line 120 of file source_field_name_panel.hpp.

References m_DoNotShowSubList, and val.

Referenced by CFieldChoicePanel::SetFieldType().

◆ GetBitmapResource()

wxBitmap CSourceFieldNamePanel::GetBitmapResource ( const wxString &  name)

Retrieves bitmap resources.

Get bitmap resources

Definition at line 231 of file source_field_name_panel.cpp.

◆ GetChoices()

vector< string > CSourceFieldNamePanel::GetChoices ( bool allow_other)
virtual

◆ GetFieldName()

string CSourceFieldNamePanel::GetFieldName ( const bool  subfield = false)
virtual

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 262 of file source_field_name_panel.cpp.

References m_Location, m_Origin, m_SourceSubList, m_SourceType, m_Taxonomy, m_TextQualifier, ToStdString(), and val.

◆ GetIconResource()

wxIcon CSourceFieldNamePanel::GetIconResource ( const wxString &  name)

Retrieves icon resources.

Get icon resources

Definition at line 244 of file source_field_name_panel.cpp.

◆ GetMacroFieldName()

string CSourceFieldNamePanel::GetMacroFieldName ( const string target,
const string selected_field = kEmptyStr 
)
virtual

◆ HideSourceType()

void CSourceFieldNamePanel::HideSourceType ( )

◆ Init()

void CSourceFieldNamePanel::Init ( void  )

Initialises member variables.

Member initialisation

Definition at line 128 of file source_field_name_panel.cpp.

References m_Location, m_Origin, m_SourceSubList, m_Taxonomy, m_TextQualifier, and NULL.

Referenced by CSourceFieldNamePanel().

◆ OnLocationBtnSelected()

void CSourceFieldNamePanel::OnLocationBtnSelected ( wxCommandEvent &  event)

wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_LOCATION_BTN

wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_LOCATION_BTN

Definition at line 648 of file source_field_name_panel.cpp.

References x_ChooseLocation(), and CFieldNamePanel::x_UpdateParent().

◆ OnOriginBtnSelected()

void CSourceFieldNamePanel::OnOriginBtnSelected ( wxCommandEvent &  event)

wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ORIGIN_BTN

wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ORIGIN_BTN

Definition at line 660 of file source_field_name_panel.cpp.

References m_SourceSubList, and CFieldNamePanel::x_UpdateParent().

◆ OnSrcSublistSelected()

void CSourceFieldNamePanel::OnSrcSublistSelected ( wxCommandEvent &  event)

wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_SRC_SUBLIST

wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_SRC_SUBLIST

Definition at line 672 of file source_field_name_panel.cpp.

References CFieldNamePanel::x_UpdateParent().

◆ OnTaxonomyBtnSelected()

void CSourceFieldNamePanel::OnTaxonomyBtnSelected ( wxCommandEvent &  event)

wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TAXONOMY_BTN

wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TAXONOMY_BTN

Definition at line 636 of file source_field_name_panel.cpp.

References x_ChooseTaxonomy(), and CFieldNamePanel::x_UpdateParent().

◆ OnTextQualBtnSelected()

void CSourceFieldNamePanel::OnTextQualBtnSelected ( wxCommandEvent &  event)

wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TEXT_QUAL_BTN

wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TEXT_QUAL_BTN

Definition at line 624 of file source_field_name_panel.cpp.

References x_ChooseTextQualifier(), and CFieldNamePanel::x_UpdateParent().

◆ s_GetSourceLocationOptions()

vector< string > CSourceFieldNamePanel::s_GetSourceLocationOptions ( )
static

Definition at line 397 of file source_field_name_panel.cpp.

References ENUM_METHOD_NAME.

Referenced by GetChoices(), and CMacroEditorContext::GetFieldNames().

◆ s_GetSourceOriginOptions()

vector< string > CSourceFieldNamePanel::s_GetSourceOriginOptions ( )
static

Definition at line 384 of file source_field_name_panel.cpp.

Referenced by GetChoices(), and CMacroEditorContext::GetFieldNames().

◆ SetFieldName()

bool CSourceFieldNamePanel::SetFieldName ( const string field)
virtual

◆ SetSourceSubpanelSelection()

void CSourceFieldNamePanel::SetSourceSubpanelSelection ( const string sel)

Definition at line 375 of file source_field_name_panel.cpp.

References m_SourceSubList.

Referenced by CFieldChoicePanel::SetSubpanelSelection().

◆ ShowToolTips()

bool CSourceFieldNamePanel::ShowToolTips ( )
static

Should we show tooltips?

Should we show tooltips?

Definition at line 222 of file source_field_name_panel.cpp.

◆ x_ChooseLocation()

void CSourceFieldNamePanel::x_ChooseLocation ( )
private

Definition at line 613 of file source_field_name_panel.cpp.

References m_SourceSubList.

Referenced by OnLocationBtnSelected(), and SetFieldName().

◆ x_ChooseTaxonomy()

void CSourceFieldNamePanel::x_ChooseTaxonomy ( )
private

Definition at line 600 of file source_field_name_panel.cpp.

References _, and m_SourceSubList.

Referenced by ClearValues(), OnTaxonomyBtnSelected(), and SetFieldName().

◆ x_ChooseTextQualifier()

void CSourceFieldNamePanel::x_ChooseTextQualifier ( )
private

Member Data Documentation

◆ m_AdditionalItems

bool CSourceFieldNamePanel::m_AdditionalItems
private

Definition at line 154 of file source_field_name_panel.hpp.

Referenced by AddAdditionalItems(), and x_ChooseTextQualifier().

◆ m_DoNotShowSubList

bool CSourceFieldNamePanel::m_DoNotShowSubList
private

Definition at line 155 of file source_field_name_panel.hpp.

Referenced by DoNotShowSubList().

◆ m_first_run

bool CSourceFieldNamePanel::m_first_run
private

Definition at line 157 of file source_field_name_panel.hpp.

Referenced by SetFieldName().

◆ m_is_taxonomy_panel

bool CSourceFieldNamePanel::m_is_taxonomy_panel
private

Definition at line 156 of file source_field_name_panel.hpp.

Referenced by ClearValues(), and SetFieldName().

◆ m_Location

wxRadioButton* CSourceFieldNamePanel::m_Location

◆ m_Origin

wxRadioButton* CSourceFieldNamePanel::m_Origin

◆ m_SourceSubList

wxListBox* CSourceFieldNamePanel::m_SourceSubList

◆ m_SourceType

wxRadioBox* CSourceFieldNamePanel::m_SourceType

◆ m_Taxonomy

wxRadioButton* CSourceFieldNamePanel::m_Taxonomy

◆ m_TextQualifier

wxRadioButton* CSourceFieldNamePanel::m_TextQualifier

The documentation for this class was generated from the following files:
Modified on Thu Jun 13 17:32:29 2024 by modify_doxy.py rev. 669887