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

Go to the SVN repository for this file.

1 #ifndef GUI_PKG_SEQ_EDIT___REFERENCE_PANEL__HPP
2 #define GUI_PKG_SEQ_EDIT___REFERENCE_PANEL__HPP
3 
4 /* $Id: reference_panel.hpp 46622 2021-08-06 20:19:47Z 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: Andrea Asztalos
30  */
31 
32 #include <corelib/ncbiobj.hpp>
33 #include <gui/gui_export.h>
35 #include <objects/biblio/Affil.hpp>
39 
40 #include <wx/panel.h>
41 #include <wx/bookctrl.h>
42 
43 class wxListbook;
44 
46 
47 class CPubAuthorPanel;
48 class CAuthorNamesPanel;
49 class CPubStatusPanel;
50 
51 /*!
52  * Control identifiers
53  */
54 
55 ////@begin control identifiers
56 #define SYMBOL_CREFERENCEPANEL_STYLE wxTAB_TRAVERSAL
57 #define SYMBOL_CREFERENCEPANEL_TITLE _("Reference Info Panel")
58 #define SYMBOL_CREFERENCEPANEL_IDNAME ID_CREFERENCEPANEL
59 #define SYMBOL_CREFERENCEPANEL_SIZE wxSize(400, 300)
60 #define SYMBOL_CREFERENCEPANEL_POSITION wxDefaultPosition
61 ////@end control identifiers
62 
63 
64 /*!
65  * CReferencePanel class declaration
66  */
67 
69 {
70  DECLARE_DYNAMIC_CLASS( CReferencePanel )
71  DECLARE_EVENT_TABLE()
72 
73 public:
74  /// Constructors
76  CReferencePanel( wxWindow* parent,
77  ICommandProccessor* cmdproc,
78  objects::CSeq_entry_Handle seh,
79  wxWindowID id = SYMBOL_CREFERENCEPANEL_IDNAME,
80  const wxPoint& pos = SYMBOL_CREFERENCEPANEL_POSITION,
81  const wxSize& size = SYMBOL_CREFERENCEPANEL_SIZE,
82  long style = SYMBOL_CREFERENCEPANEL_STYLE );
83 
84  /// Creation
85  bool Create( wxWindow* parent,
86  wxWindowID id = SYMBOL_CREFERENCEPANEL_IDNAME,
87  const wxPoint& pos = SYMBOL_CREFERENCEPANEL_POSITION,
88  const wxSize& size = SYMBOL_CREFERENCEPANEL_SIZE,
89  long style = SYMBOL_CREFERENCEPANEL_STYLE );
90 
91  /// Destructor
92  ~CReferencePanel();
93 
94  /// Initialises member variables
95  void Init();
96 
97  /// Creates the controls and sizers
98  void CreateControls();
99 
100 ////@begin CReferencePanel event handler declarations
101  void OnPageChanged(wxBookCtrlEvent& event);
102  void OnPageChanging(wxBookCtrlEvent& event);
103 ////@end CReferencePanel event handler declarations
104 
105 ////@begin CReferencePanel member function declarations
106  virtual bool StepForward();
107  virtual bool StepBackward();
108 
109  /// Retrieves bitmap resources
110  wxBitmap GetBitmapResource( const wxString& name );
111 
112  /// Retrieves icon resources
113  wxIcon GetIconResource( const wxString& name );
114 ////@end CReferencePanel member function declarations
115 
116  /// Should we show tooltips?
117  static bool ShowToolTips();
118 
119  virtual void ApplySubmitBlock(objects::CSubmit_block& block);
120  virtual void ApplyDescriptor(objects::CSeqdesc& desc);
121 
122  virtual bool TransferDataFromWindow();
123  virtual bool TransferDataToWindow();
124 
125  bool MatchesCitSubAuthors(const objects::CAuth_list& authlist);
126  bool CopyAuthors(objects::CAuth_list& authlist);
127  void CopyAffil(objects::CAuth_list &auth_list);
128 
129  virtual void SetSeqEntryHandle(objects::CSeq_entry_Handle seh);
130  virtual void ApplyCommand();
131  virtual void ReportMissingFields(string &text);
132  virtual wxString GetAnchor();
133  virtual wxString GetName() const;
134 
135 private:
136  ISubmissionPage* x_GetCurrentPage() const;
137 
139  objects::CSeq_entry_Handle m_Seh;
142 
143 ////@begin CReferencePanel member variables
144  wxListbook* m_Listbook;
145 // CPubAuthorPanel* m_AuthorPanel;
148 public:
149  /// Control identifiers
150  enum {
151  ID_CREFERENCEPANEL = 6640,
152  ID_REFERENCELISTBOOK = 6641
153  };
154 ////@end CReferencePanel member variables
155 };
156 
158 
159 #endif
160  // GUI_PKG_SEQ_EDIT___REFERENCE_PANEL__HPP
CPubStatusPanel * m_StatusPanel
CRef< objects::CSeqdesc > m_Pub
CAuthorNamesPanel * m_AuthorsPanel
objects::CSeq_entry_Handle m_Seh
CRef< objects::CSubmit_block > m_SubmitBlock
ICommandProccessor * m_CmdProcessor
wxListbook * m_Listbook
Undo/Redo interface for editing operations.
virtual void ReportMissingFields(string &text)
virtual void ApplyDescriptor(objects::CSeqdesc &desc)
virtual void SetSeqEntryHandle(objects::CSeq_entry_Handle seh)
virtual wxString GetName() const
virtual void ApplySubmitBlock(objects::CSubmit_block &block)
virtual wxString GetAnchor()
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 NCBI_GUIWIDGETS_EDIT_EXPORT
Definition: gui_export.h:526
Defines to provide correct exporting from DLLs in Windows.
static void text(MDB_val *v)
Definition: mdb_dump.c:62
const struct ncbi::grid::netcache::search::fields::SIZE size
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
#define SYMBOL_CREFERENCEPANEL_IDNAME
#define SYMBOL_CREFERENCEPANEL_STYLE
#define SYMBOL_CREFERENCEPANEL_POSITION
#define SYMBOL_CREFERENCEPANEL_SIZE
Modified on Wed May 22 11:35:27 2024 by modify_doxy.py rev. 669887