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

Go to the SVN repository for this file.

1 #ifndef GUI_PKG_SEQ_EDIT___ORGINFO_PANEL__HPP
2 #define GUI_PKG_SEQ_EDIT___ORGINFO_PANEL__HPP
3 /* $Id: orginfo_panel.hpp 46622 2021-08-06 20:19:47Z 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: Andrea Asztalos
29  */
30 
31 #include <corelib/ncbistd.hpp>
35 
36 
37 #include <wx/event.h>
38 #include <wx/panel.h>
39 #include <wx/bookctrl.h>
40 
41 class wxListbook;
42 
44 
45 class COrgGeneralPanel;
46 class COrgAdvancedPanel;
47 
48 /*!
49  * Control identifiers
50  */
51 
52 ////@begin control identifiers
53 #define SYMBOL_CORGANISMINFOPANEL_STYLE wxTAB_TRAVERSAL
54 #define SYMBOL_CORGANISMINFOPANEL_TITLE _("Organism Info Panel")
55 #define SYMBOL_CORGANISMINFOPANEL_IDNAME ID_CORGANISMINFOPANEL
56 #define SYMBOL_CORGANISMINFOPANEL_SIZE wxSize(400, 300)
57 #define SYMBOL_CORGANISMINFOPANEL_POSITION wxDefaultPosition
58 ////@end control identifiers
59 
60 
61 /*!
62  * COrganismInfoPanel class declaration
63  */
64 
65 class COrganismInfoPanel: public wxPanel, public ISubmissionPage
66 {
67  DECLARE_DYNAMIC_CLASS( COrganismInfoPanel )
68  DECLARE_EVENT_TABLE()
69 
70 public:
71  /// Constructors
73  COrganismInfoPanel( wxWindow* parent,
74  IWorkbench* wb,
75  ICommandProccessor* cmdproc,
76  objects::CSeq_entry_Handle seh,
77  const wxString &dir,
78  wxWindowID id = SYMBOL_CORGANISMINFOPANEL_IDNAME,
79  const wxPoint& pos = SYMBOL_CORGANISMINFOPANEL_POSITION,
80  const wxSize& size = SYMBOL_CORGANISMINFOPANEL_SIZE,
81  long style = SYMBOL_CORGANISMINFOPANEL_STYLE );
82 
83  /// Creation
84  bool Create( wxWindow* parent,
85  wxWindowID id = SYMBOL_CORGANISMINFOPANEL_IDNAME,
86  const wxPoint& pos = SYMBOL_CORGANISMINFOPANEL_POSITION,
87  const wxSize& size = SYMBOL_CORGANISMINFOPANEL_SIZE,
88  long style = SYMBOL_CORGANISMINFOPANEL_STYLE );
89 
90  /// Destructor
92 
93  /// Initialises member variables
94  void Init();
95 
96  /// Creates the controls and sizers
97  void CreateControls();
98  virtual bool TransferDataToWindow();
99 
100 ////@begin COrganismInfoPanel event handler declarations
101  void OnPageChanged(wxBookCtrlEvent& event);
102  void OnPageChanging(wxBookCtrlEvent& event);
103  void OnImportSrcTable(wxCommandEvent& event);
104 ////@end COrganismInfoPanel event handler declarations
105 
106 ////@begin COrganismInfoPanel member function declarations
107  virtual bool StepForward();
108  virtual bool StepBackward();
109 
110  virtual bool TransferDataFromWindow();
111  virtual void ApplyCommand();
112  virtual void ReportMissingFields(string &text);
113  virtual wxString GetAnchor();
114  virtual wxString GetName() const;
115 
116  /// Retrieves bitmap resources
117  wxBitmap GetBitmapResource( const wxString& name );
118 
119  /// Retrieves icon resources
120  wxIcon GetIconResource( const wxString& name );
121 ////@end COrganismInfoPanel member function declarations
122 
123  /// Should we show tooltips?
124  static bool ShowToolTips();
125 
126  virtual void ApplyDescriptor(objects::CSeqdesc& desc);
127  virtual void SetSeqEntryHandle(objects::CSeq_entry_Handle seh);
128 
129 private:
131 
134  objects::CSeq_entry_Handle m_Seh;
135  wxString m_WorkDir;
136 
137 ////@begin COrganismInfoPanel member variables
138  wxListbook* m_Listbook;
141 public:
142  /// Control identifiers
143  enum {
146  ID_ORGINFONTBK = 6572
147  };
148 ////@end COrganismInfoPanel member variables
149 };
150 
152 
153 #endif
154  // GUI_PKG_SEQ_EDIT___ORGINFO_PANEL__HPP
COrgGeneralPanel * m_GeneralPanel
virtual wxString GetName() const
bool Create(wxWindow *parent, wxWindowID id=ID_CORGANISMINFOPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
void OnPageChanging(wxBookCtrlEvent &event)
~COrganismInfoPanel()
Destructor.
IWorkbench * m_Workbench
ICommandProccessor * m_CmdProcessor
virtual void ReportMissingFields(string &text)
virtual bool StepForward()
objects::CSeq_entry_Handle m_Seh
virtual void ApplyDescriptor(objects::CSeqdesc &desc)
virtual wxString GetAnchor()
void OnPageChanged(wxBookCtrlEvent &event)
COrgAdvancedPanel * m_AdvancedPanel
virtual void ApplyCommand()
static bool ShowToolTips()
Should we show tooltips?
void Init()
Initialises member variables.
virtual void SetSeqEntryHandle(objects::CSeq_entry_Handle seh)
wxListbook * m_Listbook
virtual bool TransferDataFromWindow()
COrganismInfoPanel()
Constructors.
virtual bool TransferDataToWindow()
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void CreateControls()
Creates the controls and sizers.
void OnImportSrcTable(wxCommandEvent &event)
virtual bool StepBackward()
ISubmissionPage * x_GetCurrentPage() const
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
Undo/Redo interface for editing operations.
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static void text(MDB_val *v)
Definition: mdb_dump.c:62
const struct ncbi::grid::netcache::search::fields::SIZE size
#define SYMBOL_CORGANISMINFOPANEL_STYLE
#define SYMBOL_CORGANISMINFOPANEL_POSITION
#define SYMBOL_CORGANISMINFOPANEL_SIZE
#define SYMBOL_CORGANISMINFOPANEL_IDNAME
Modified on Mon Apr 22 04:06:05 2024 by modify_doxy.py rev. 669887