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

Go to the SVN repository for this file.

1 /* $Id: dbxref_panel.hpp 31212 2014-09-12 12:45:01Z bollin $
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: Colleen Bollin
27  */
28 #ifndef _DBXREF_PANEL_H_
29 #define _DBXREF_PANEL_H_
30 
31 #include <corelib/ncbistd.hpp>
35 
36 /*!
37  * Includes
38  */
39 
40 ////@begin includes
41 ////@end includes
42 
43 #include <wx/panel.h>
44 #include <wx/frame.h>
45 #include <wx/sizer.h>
46 #include <wx/bitmap.h>
47 #include <wx/icon.h>
48 #include <wx/choice.h>
49 #include <wx/textctrl.h>
50 #include <wx/stattext.h>
51 #include <wx/valtext.h>
52 #include <wx/scrolwin.h>
53 
54 /*!
55  * Forward declarations
56  */
57 
58 ////@begin forward declarations
59 class wxBoxSizer;
60 ////@end forward declarations
61 
63 
64 /*!
65  * Control identifiers
66  */
67 
68 ////@begin control identifiers
69 #define SYMBOL_CDBXREFPANEL_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
70 #define SYMBOL_CDBXREFPANEL_TITLE _("DbxrefPanel")
71 #define SYMBOL_CDBXREFPANEL_IDNAME ID_CDBXREFPANEL
72 #define SYMBOL_CDBXREFPANEL_SIZE wxSize(400, 300)
73 #define SYMBOL_CDBXREFPANEL_POSITION wxDefaultPosition
74 ////@end control identifiers
75 
76 
77 /*!
78  * CDbxrefPanel class declaration
79  */
80 
81 class CDbxrefPanel: public wxPanel
82 {
83  DECLARE_DYNAMIC_CLASS( CDbxrefPanel )
84  DECLARE_EVENT_TABLE()
85 
86 public:
87  /// Constructors
88  CDbxrefPanel();
89  CDbxrefPanel( wxWindow* parent, CSerialObject& object,
90  wxWindowID id = SYMBOL_CDBXREFPANEL_IDNAME, const wxString& caption = SYMBOL_CDBXREFPANEL_TITLE, const wxPoint& pos = SYMBOL_CDBXREFPANEL_POSITION, const wxSize& size = SYMBOL_CDBXREFPANEL_SIZE, long style = SYMBOL_CDBXREFPANEL_STYLE );
91 
92  /// Creation
93  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CDBXREFPANEL_IDNAME, const wxString& caption = SYMBOL_CDBXREFPANEL_TITLE, const wxPoint& pos = SYMBOL_CDBXREFPANEL_POSITION, const wxSize& size = SYMBOL_CDBXREFPANEL_SIZE, long style = SYMBOL_CDBXREFPANEL_STYLE );
94 
95  /// Destructor
96  ~CDbxrefPanel();
97 
98  /// Initialises member variables
99  void Init();
100 
101  /// Creates the controls and sizers
102  void CreateControls();
103 
104  virtual bool TransferDataToWindow();
105  virtual bool TransferDataFromWindow();
106 
107  void PopulateDbxrefs(objects::CSeq_feat& seq_feat);
108  void PopulateDbxrefs(objects::COrg_ref& org);
109 
110  void AddLastDbxref (wxWindow* link);
111  void DeleteTaxonRef();
112 
113 ////@begin CDbxrefPanel event handler declarations
114 
115 ////@end CDbxrefPanel event handler declarations
116 
117 ////@begin CDbxrefPanel member function declarations
118 
119  /// Retrieves bitmap resources
120  wxBitmap GetBitmapResource( const wxString& name );
121 
122  /// Retrieves icon resources
123  wxIcon GetIconResource( const wxString& name );
124 ////@end CDbxrefPanel member function declarations
125 
126  /// Should we show tooltips?
127  static bool ShowToolTips();
128 
129 ////@begin CDbxrefPanel member variables
130  wxScrolledWindow* m_ScrolledWindow;
131  wxBoxSizer* m_Sizer;
132  /// Control identifiers
133  enum {
135  ID_SCROLLEDWINDOW2 = 10092
136  };
137 ////@end CDbxrefPanel member variables
138 
139 private:
141 
142  vector< CRef< objects::CDbtag > > m_Xrefs;
143 
149 
150  void x_UpdateXrefs();
152 };
153 
155 
156 #endif
157  // _DBXREF_PANEL_H_
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
static bool ShowToolTips()
Should we show tooltips?
void PopulateDbxrefs(objects::COrg_ref &org)
~CDbxrefPanel()
Destructor.
vector< CRef< objects::CDbtag > > m_Xrefs
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void DeleteTaxonRef()
void AddLastDbxref(wxWindow *link)
virtual bool TransferDataFromWindow()
virtual bool TransferDataToWindow()
void PopulateDbxrefs(objects::CSeq_feat &seq_feat)
wxScrolledWindow * m_ScrolledWindow
CSerialObject * m_Object
void x_UpdateXrefs()
void CreateControls()
Creates the controls and sizers.
CDbxrefPanel()
Constructors.
wxBoxSizer * m_Sizer
void Init()
Initialises member variables.
wxWindow * x_AddRow(CRef< objects::CDbtag > tag)
bool Create(wxWindow *parent, wxWindowID id=ID_CDBXREFPANEL, const wxString &caption=_("DbxrefPanel"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
Base class for all serializable objects.
Definition: serialbase.hpp:150
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define SYMBOL_CDBXREFPANEL_SIZE
#define SYMBOL_CDBXREFPANEL_STYLE
#define SYMBOL_CDBXREFPANEL_POSITION
#define SYMBOL_CDBXREFPANEL_IDNAME
#define SYMBOL_CDBXREFPANEL_TITLE
#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 char * tag
Modified on Mon May 27 04:39:38 2024 by modify_doxy.py rev. 669887