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

Search Toolkit Book for CFieldHandlerNamePanel

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

+ Inheritance diagram for CFieldHandlerNamePanel:
+ Collaboration diagram for CFieldHandlerNamePanel:

Public Types

enum  { ID_PUBFIELDNAMEPANEL = 6130 , ID_PUBFIELDNAME_FIELD }
 
- 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

 CFieldHandlerNamePanel ()
 Constructors. More...
 
 CFieldHandlerNamePanel (wxWindow *parent, wxWindowID id=ID_PUBFIELDNAMEPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
 
bool Create (wxWindow *parent, wxWindowID id=ID_PUBFIELDNAMEPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
 Creation. More...
 
 ~CFieldHandlerNamePanel ()
 Destructor. More...
 
void Init ()
 Initialises member variables. More...
 
void CreateControls ()
 Creates the controls and sizers. More...
 
void OnFieldSelected (wxCommandEvent &event)
 wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_PUBFIELDNAME_FIELD More...
 
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)
 
void SetFieldNames (const vector< string > &field_names)
 
virtual vector< stringGetChoices (bool &allow_other)
 
virtual vector< stringGetMacroValues ()
 
virtual void ClearValues (void)
 
virtual string GetMacroFieldName (const string &target, const string &selected_field=kEmptyStr)
 
virtual string GetMacroFieldLabel (const string &target, const string &selected_field=kEmptyStr)
 
void SetMacroFieldNames (const vector< string > &field_names)
 
void SetMacroSelf (const string &self)
 
- Public Member Functions inherited from CFieldNamePanel
 CFieldNamePanel ()
 Constructors. More...
 
 ~CFieldNamePanel ()
 Destructor. More...
 
virtual void SetShowLegalOnly (bool show)
 

Static Public Member Functions

static bool ShowToolTips ()
 Should we show tooltips? More...
 
- 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_Field
 

Private Attributes

vector< stringm_MacroField
 
string m_self
 

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

CFieldHandlerNamePanel class declaration

Definition at line 57 of file pub_field_name_panel.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ID_PUBFIELDNAMEPANEL 
ID_PUBFIELDNAME_FIELD 

Definition at line 121 of file pub_field_name_panel.hpp.

Constructor & Destructor Documentation

◆ CFieldHandlerNamePanel() [1/2]

CFieldHandlerNamePanel::CFieldHandlerNamePanel ( )

Constructors.

CFieldHandlerNamePanel type definition

CFieldHandlerNamePanel event table definition

CFieldHandlerNamePanel constructors

Definition at line 70 of file pub_field_name_panel.cpp.

References Init().

◆ CFieldHandlerNamePanel() [2/2]

CFieldHandlerNamePanel::CFieldHandlerNamePanel ( wxWindow *  parent,
wxWindowID  id = ID_PUBFIELDNAMEPANEL,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize(400, 300),
long  style = wxTAB_TRAVERSAL 
)

◆ ~CFieldHandlerNamePanel()

CFieldHandlerNamePanel::~CFieldHandlerNamePanel ( )

Destructor.

CFieldHandlerNamePanel destructor

Definition at line 106 of file pub_field_name_panel.cpp.

Member Function Documentation

◆ ClearValues()

void CFieldHandlerNamePanel::ClearValues ( void  )
virtual

Reimplemented from CFieldNamePanel.

Definition at line 144 of file pub_field_name_panel.cpp.

References m_Field.

◆ Create()

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

Creation.

CPubFieldNamePanel creator

Definition at line 86 of file pub_field_name_panel.cpp.

References CreateControls(), and ncbi::grid::netcache::search::fields::size.

Referenced by CFieldHandlerNamePanel().

◆ CreateControls()

void CFieldHandlerNamePanel::CreateControls ( )

Creates the controls and sizers.

Control creation for CPubFieldNamePanel

Definition at line 129 of file pub_field_name_panel.cpp.

References ID_PUBFIELDNAME_FIELD, and m_Field.

Referenced by Create().

◆ GetBitmapResource()

wxBitmap CFieldHandlerNamePanel::GetBitmapResource ( const wxString &  name)

Retrieves bitmap resources.

Get bitmap resources

Definition at line 174 of file pub_field_name_panel.cpp.

◆ GetChoices()

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

◆ GetFieldName()

string CFieldHandlerNamePanel::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 197 of file pub_field_name_panel.cpp.

References CPubFieldType::GetTypeForLabel(), CPubFieldType::IsAffilField(), m_Field, ToStdString(), and val.

Referenced by GetChoices(), CEditPubDlg::GetCommand(), CReplaceSingleFieldPanel::GetCommand(), CEditPubDlg::GetFieldName(), and GetMacroValues().

◆ GetIconResource()

wxIcon CFieldHandlerNamePanel::GetIconResource ( const wxString &  name)

Retrieves icon resources.

Get icon resources

Definition at line 187 of file pub_field_name_panel.cpp.

◆ GetMacroFieldLabel()

string CFieldHandlerNamePanel::GetMacroFieldLabel ( const string target,
const string selected_field = kEmptyStr 
)
virtual

Reimplemented from CFieldNamePanel.

Definition at line 304 of file pub_field_name_panel.cpp.

References kEmptyStr, kGenomeProjectID, m_Field, m_self, ToStdString(), and val.

◆ GetMacroFieldName()

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

◆ GetMacroValues()

vector< string > CFieldHandlerNamePanel::GetMacroValues ( )
virtual

◆ Init()

void CFieldHandlerNamePanel::Init ( void  )

Initialises member variables.

Member initialisation

Definition at line 117 of file pub_field_name_panel.cpp.

References m_Field, and NULL.

Referenced by CFieldHandlerNamePanel().

◆ OnFieldSelected()

void CFieldHandlerNamePanel::OnFieldSelected ( wxCommandEvent &  event)

wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_PUBFIELDNAME_FIELD

wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_PUBFIELDNAME_FIELD

Definition at line 154 of file pub_field_name_panel.cpp.

References CFieldNamePanel::x_UpdateParent().

◆ SetFieldName()

bool CFieldHandlerNamePanel::SetFieldName ( const string field)
virtual

◆ SetFieldNames()

void CFieldHandlerNamePanel::SetFieldNames ( const vector< string > &  field_names)

◆ SetMacroFieldNames()

void CFieldHandlerNamePanel::SetMacroFieldNames ( const vector< string > &  field_names)

◆ SetMacroSelf()

void CFieldHandlerNamePanel::SetMacroSelf ( const string self)
inline

◆ ShowToolTips()

bool CFieldHandlerNamePanel::ShowToolTips ( )
static

Should we show tooltips?

Should we show tooltips?

Definition at line 165 of file pub_field_name_panel.cpp.

Member Data Documentation

◆ m_Field

wxListBox* CFieldHandlerNamePanel::m_Field

◆ m_MacroField

vector<string> CFieldHandlerNamePanel::m_MacroField
private

Definition at line 126 of file pub_field_name_panel.hpp.

Referenced by GetMacroFieldName(), and SetMacroFieldNames().

◆ m_self

string CFieldHandlerNamePanel::m_self
private

Definition at line 127 of file pub_field_name_panel.hpp.

Referenced by GetMacroFieldLabel(), GetMacroFieldName(), and SetMacroSelf().


The documentation for this class was generated from the following files:
Modified on Tue Feb 27 05:51:22 2024 by modify_doxy.py rev. 669887