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

Go to the SVN repository for this file.

1 /* $Id: generalid_panel.hpp 39649 2017-10-24 15:22:12Z asztalos $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Andrea Asztalos
27  */
28 #ifndef _GENERALID_PANEL_H_
29 #define _GENERALID_PANEL_H_
30 
31 #include <corelib/ncbistd.hpp>
33 
34 class wxChoice;
35 class wxStaticText;
36 class wxTextCtrl;
37 
39 /*!
40  * Control identifiers
41  */
42 
43 ////@begin control identifiers
44 #define SYMBOL_CGENERALIDPANEL_STYLE wxTAB_TRAVERSAL
45 #define SYMBOL_CGENERALIDPANEL_TITLE _("General ID")
46 #define SYMBOL_CGENERALIDPANEL_IDNAME ID_CGENERALIDPANEL
47 #define SYMBOL_CGENERALIDPANEL_SIZE wxSize(400, 300)
48 #define SYMBOL_CGENERALIDPANEL_POSITION wxDefaultPosition
49 ////@end control identifiers
50 
51 
52 /*!
53  * CGeneralIDPanel class declaration
54  */
55 
57 {
58  DECLARE_DYNAMIC_CLASS( CGeneralIDPanel )
59  DECLARE_EVENT_TABLE()
60 
61 public:
62  /// Constructors
64  CGeneralIDPanel( wxWindow* parent,
65  wxWindowID id = SYMBOL_CGENERALIDPANEL_IDNAME,
66  const wxPoint& pos = SYMBOL_CGENERALIDPANEL_POSITION,
67  const wxSize& size = SYMBOL_CGENERALIDPANEL_SIZE,
68  long style = SYMBOL_CGENERALIDPANEL_STYLE );
69 
70  /// Creation
71  bool Create( wxWindow* parent,
72  wxWindowID id = SYMBOL_CGENERALIDPANEL_IDNAME,
73  const wxPoint& pos = SYMBOL_CGENERALIDPANEL_POSITION,
74  const wxSize& size = SYMBOL_CGENERALIDPANEL_SIZE,
75  long style = SYMBOL_CGENERALIDPANEL_STYLE );
76 
77  /// Destructor
79 
80  /// Initialises member variables
81  void Init();
82 
83  /// Creates the controls and sizers
84  void CreateControls();
85 
86 ////@begin CGeneralIDPanel event handler declarations
87 
88  /// wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CGENERALID_CHOICE
89  void OnGeneralIDChoice( wxCommandEvent& event );
90 
91 ////@end CGeneralIDPanel event handler declarations
92 
93 ////@begin CGeneralIDPanel member function declarations
94 
95  virtual string GetFieldName(const bool subfield = false);
96  virtual bool SetFieldName(const string& field);
97 
98  /// Retrieves bitmap resources
99  wxBitmap GetBitmapResource( const wxString& name );
100 
101  /// Retrieves icon resources
102  wxIcon GetIconResource( const wxString& name );
103 ////@end CGeneralIDPanel member function declarations
104 
105  /// Should we show tooltips?
106  static bool ShowToolTips();
107 
108 ////@begin CGeneralIDPanel member variables
109  wxChoice* m_GenID;
110  wxStaticText* m_Dblabel;
111  wxTextCtrl* m_DbName;
112  /// Control identifiers
113  enum {
116  ID_CGENERALID_TEXT = 6152
117  };
118 ////@end CGeneralIDPanel member variables
119 private:
120  vector<string> x_GetStrings();
121 };
122 
124 
125 #endif
126  // _GENERALID_PANEL_H_
virtual bool SetFieldName(const string &field)
static bool ShowToolTips()
Should we show tooltips?
wxStaticText * m_Dblabel
wxTextCtrl * m_DbName
~CGeneralIDPanel()
Destructor.
void OnGeneralIDChoice(wxCommandEvent &event)
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CGENERALID_CHOICE
CGeneralIDPanel()
Constructors.
void CreateControls()
Creates the controls and sizers.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
bool Create(wxWindow *parent, wxWindowID id=ID_CGENERALIDPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
vector< string > x_GetStrings()
virtual string GetFieldName(const bool subfield=false)
Returns the name of the field as selected in the panel.
void Init()
Initialises member variables.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define SYMBOL_CGENERALIDPANEL_STYLE
#define SYMBOL_CGENERALIDPANEL_SIZE
#define SYMBOL_CGENERALIDPANEL_IDNAME
#define SYMBOL_CGENERALIDPANEL_POSITION
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Wed Sep 04 15:03:56 2024 by modify_doxy.py rev. 669887