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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_EDIT___BIOSOURCE_PANEL__HPP
2 #define GUI_WIDGETS_EDIT___BIOSOURCE_PANEL__HPP
3 
4 /* $Id: biosourcepanel.hpp 42407 2019-02-19 19:35:34Z asztalos $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Vasuki Palanigobu
30  */
31 
32 
34 #include "srcmod_list_panel.hpp"
35 #include <wx/checkbox.h>
36 
37 /*!
38  * Includes
39  */
40 
41 ////@begin includes
42 ////@end includes
43 
44 /*!
45  * Forward declarations
46  */
47 
48 class wxListBox;
49 class wxCheckListBox;
50 class wxTreebook;
51 
53 
54 ////@begin forward declarations
56 class IDescEditorPanel;
57 ////@end forward declarations
58 
59 /*!
60  * Control identifiers
61  */
62 
63 ////@begin control identifiers
64 #define SYMBOL_CBIOSOURCEPANEL_STYLE wxTAB_TRAVERSAL
65 #define SYMBOL_CBIOSOURCEPANEL_TITLE _("Organism Name")
66 #define SYMBOL_CBIOSOURCEPANEL_IDNAME ID_ORGANISMNAMEPANEL
67 #define SYMBOL_CBIOSOURCEPANEL_SIZE wxSize(400, 300)
68 #define SYMBOL_CBIOSOURCEPANEL_POSITION wxDefaultPosition
69 ////@end control identifiers
70 
71 
72 /*!
73  * CBioSourcePanel class declaration
74  */
75 
76 class CBioSourcePanel: public wxPanel
77 {
78  DECLARE_DYNAMIC_CLASS( CBioSourcePanel )
79  DECLARE_EVENT_TABLE()
80 
81 public:
82  /// Constructors
84  CBioSourcePanel( wxWindow* parent, objects::CBioSource& source,
85  IDescEditorPanel* desc_editor = nullptr,
86  wxWindowID id = SYMBOL_CBIOSOURCEPANEL_IDNAME,
87  const wxPoint& pos = SYMBOL_CBIOSOURCEPANEL_POSITION,
88  const wxSize& size = SYMBOL_CBIOSOURCEPANEL_SIZE,
89  long style = SYMBOL_CBIOSOURCEPANEL_STYLE );
90 
91  /// Creation
92  bool Create( wxWindow* parent,
93  wxWindowID id = SYMBOL_CBIOSOURCEPANEL_IDNAME,
94  const wxPoint& pos = SYMBOL_CBIOSOURCEPANEL_POSITION,
95  const wxSize& size = SYMBOL_CBIOSOURCEPANEL_SIZE,
96  long style = SYMBOL_CBIOSOURCEPANEL_STYLE );
97 
98  /// Destructor
100 
101  /// Initialises member variables
102  void Init();
103 
104  /// Creates the controls and sizers
105  void CreateControls();
106  virtual bool TransferDataToWindow();
107  virtual bool TransferDataFromWindow();
108  void PopulateBioSource(objects::CBioSource& source);
109 
110 ////@begin CBioSourcePanel event handler declarations
111 
112  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ORGPANEL_BTN
113  void OnTaxonomyLookup( wxCommandEvent& event );
114 
115 ////@end CBioSourcePanel event handler declarations
116  void OnUpdatedTaxname(wxMouseEvent& event);
117  void OnEvtText(wxCommandEvent& event);
118 
119 ////@begin CBioSourcePanel member function declarations
120 
121  /// Retrieves bitmap resources
122  wxBitmap GetBitmapResource( const wxString& name );
123 
124  /// Retrieves icon resources
125  wxIcon GetIconResource( const wxString& name );
126 ////@end CBioSourcePanel member function declarations
127 
128  /// Should we show tooltips?
129  static bool ShowToolTips();
130 
131 ////@begin CBioSourcePanel member variables
134  /// Control identifiers
135  enum {
140  ID_ORGPANEL_SIZER = 10504
141  };
142 ////@end CBioSourcePanel member variables
143 
144 private:
146  objects::CBioSource& m_Source;
148  wxTreebook* m_ParentTreebook{ nullptr };
149 
150  wxTreebook* x_GetTree();
151  void x_GetOrganismInfo();
152  void x_SetOrganismInfo();
153 };
154 
156 
157 #endif
158  // GUI_WIDGETS_EDIT___BIOSOURCE_PANEL__HPP
#define SYMBOL_CBIOSOURCEPANEL_POSITION
#define SYMBOL_CBIOSOURCEPANEL_IDNAME
#define SYMBOL_CBIOSOURCEPANEL_SIZE
#define SYMBOL_CBIOSOURCEPANEL_STYLE
CAutoCompleteComboBox.
CSrcModListPanel * m_SrcModList
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
IDescEditorPanel * m_ParentPanel
void OnUpdatedTaxname(wxMouseEvent &event)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void CreateControls()
Creates the controls and sizers.
CAutoCompleteTextCtrl * m_ScientificNameCtrl
static bool ShowToolTips()
Should we show tooltips?
void PopulateBioSource(objects::CBioSource &source)
void OnEvtText(wxCommandEvent &event)
void OnTaxonomyLookup(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ORGPANEL_BTN
void Init()
Initialises member variables.
wxTreebook * x_GetTree()
wxCheckBox * m_DisableStrainForwardingBtn
wxTreebook * m_ParentTreebook
bool Create(wxWindow *parent, wxWindowID id=ID_ORGANISMNAMEPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
virtual bool TransferDataFromWindow()
objects::CBioSource & m_Source
virtual bool TransferDataToWindow()
~CBioSourcePanel()
Destructor.
CBioSourcePanel()
Constructors.
#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
const CharType(& source)[N]
Definition: pointer.h:1149
Modified on Tue May 28 05:52:28 2024 by modify_doxy.py rev. 669887