NCBI C++ ToolKit
cds_gene_prot_field_name_panel.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_EDIT___CDSGENEPROTFIELDNAMEPANEL__HPP
2 #define GUI_WIDGETS_EDIT___CDSGENEPROTFIELDNAMEPANEL__HPP
3 /* $Id: cds_gene_prot_field_name_panel.hpp 45348 2020-07-09 19:29:04Z asztalos $
4  * ===========================================================================
5  *
6  * PUBLIC DOMAIN NOTICE
7  * National Center for Biotechnology Information
8  *
9  * This software/database is a "United States Government Work" under the
10  * terms of the United States Copyright Act. It was written as part of
11  * the author's official duties as a United States Government employee and
12  * thus cannot be copyrighted. This software/database is freely available
13  * to the public for use. The National Library of Medicine and the U.S.
14  * Government have not placed any restriction on its use or reproduction.
15  *
16  * Although all reasonable efforts have been taken to ensure the accuracy
17  * and reliability of the software and data, the NLM and the U.S.
18  * Government do not and cannot warrant the performance or results that
19  * may be obtained by using this software or data. The NLM and the U.S.
20  * Government disclaim all warranties, express or implied, including
21  * warranties of performance, merchantability or fitness for any particular
22  * purpose.
23  *
24  * Please cite the author in any work or product based on this material.
25  *
26  * ===========================================================================
27  *
28  * Authors: Colleen Bollin
29  */
30 
31 #include <corelib/ncbistd.hpp>
33 
34 /*!
35  * Includes
36  */
37 
38 ////@begin includes
39 ////@end includes
40 
41 #include <wx/listbox.h>
42 
43 /*!
44  * Forward declarations
45  */
46 
47 ////@begin forward declarations
48 ////@end forward declarations
49 
51 
52 /*!
53  * Control identifiers
54  */
55 
56 ////@begin control identifiers
57 #define SYMBOL_CCDSGENEPROTFIELDNAMEPANEL_STYLE wxTAB_TRAVERSAL
58 #define SYMBOL_CCDSGENEPROTFIELDNAMEPANEL_TITLE _("CDSGeneProtFieldNamePanel")
59 #define SYMBOL_CCDSGENEPROTFIELDNAMEPANEL_IDNAME ID_CCDSGENEPROTFIELDNAMEPANEL
60 #define SYMBOL_CCDSGENEPROTFIELDNAMEPANEL_SIZE wxSize(400, 300)
61 #define SYMBOL_CCDSGENEPROTFIELDNAMEPANEL_POSITION wxDefaultPosition
62 ////@end control identifiers
63 
64 
65 /*!
66  * CCDSGeneProtFieldNamePanel class declaration
67  */
68 
70 {
71  DECLARE_DYNAMIC_CLASS( CCDSGeneProtFieldNamePanel )
72  DECLARE_EVENT_TABLE()
73 
74 public:
75  /// Constructors
77  CCDSGeneProtFieldNamePanel(wxWindow* parent,
79  const wxPoint& pos = SYMBOL_CCDSGENEPROTFIELDNAMEPANEL_POSITION,
82 
83  /// Creation
84  bool Create(wxWindow* parent,
86  const wxPoint& pos = SYMBOL_CCDSGENEPROTFIELDNAMEPANEL_POSITION,
89 
90  /// Destructor
92 
93  /// Initialises member variables
94  void Init();
95 
96  /// Creates the controls and sizers
97  void CreateControls();
98 
99 ////@begin CCDSGeneProtFieldNamePanel event handler declarations
100 
101  /// wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_FIELD
102  void OnFieldSelected( wxCommandEvent& event );
103 
104 ////@end CCDSGeneProtFieldNamePanel event handler declarations
105 
106 ////@begin CCDSGeneProtFieldNamePanel member function declarations
107 
108  /// Retrieves bitmap resources
109  wxBitmap GetBitmapResource( const wxString& name );
110 
111  /// Retrieves icon resources
112  wxIcon GetIconResource( const wxString& name );
113 ////@end CCDSGeneProtFieldNamePanel member function declarations
114 
115  /// Should we show tooltips?
116  static bool ShowToolTips();
117 
118 ////@begin CCDSGeneProtFieldNamePanel member variables
119  wxListBox* m_Field;
120 ////@end CCDSGeneProtFieldNamePanel member variables
121 
122  virtual string GetFieldName(const bool subfield = false);
123  virtual bool SetFieldName(const string& field);
124  virtual void ClearValues(void);
125  virtual vector<string> GetChoices(bool& allow_other);
126  virtual string GetMacroFieldName(const string &target, const string& selected_field = kEmptyStr);
127  static string s_GetMacroFieldName(const string& field_name, const string& target, const string& selected_field = kEmptyStr);
128 
129  static vector<string> GetStrings();
130  enum {
131  ID_CCDSGENEPROTFIELDNAMEPANEL = 6080,
132  ID_CCDSGENEPROTFIELDNAME_FIELD
133  };
134 };
135 
137 
138 #endif
139  // GUI_WIDGETS_EDIT___CDSGENEPROTFIELDNAMEPANEL__HPP
#define SYMBOL_CCDSGENEPROTFIELDNAMEPANEL_STYLE
#define SYMBOL_CCDSGENEPROTFIELDNAMEPANEL_IDNAME
#define SYMBOL_CCDSGENEPROTFIELDNAMEPANEL_SIZE
#define SYMBOL_CCDSGENEPROTFIELDNAMEPANEL_POSITION
virtual string GetFieldName(const bool subfield=false)=0
Returns the name of the field as selected in the panel.
virtual string GetMacroFieldName(const string &target, const string &selected_field=kEmptyStr)
virtual vector< string > GetChoices(bool &allow_other)
virtual bool SetFieldName(const string &field)=0
virtual void ClearValues(void)
Include a standard set of the NCBI C++ Toolkit most basic headers.
static void Init(void)
Definition: cursor6.c:76
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define kEmptyStr
Definition: ncbistr.hpp:123
#define NCBI_GUIWIDGETS_EDIT_EXPORT
Definition: gui_export.h:526
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Wed Apr 17 13:11:04 2024 by modify_doxy.py rev. 669887