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

Go to the SVN repository for this file.

1 #ifndef GUI_PKG_SEQ_EDIT___PUBAUTHOR_PANEL__HPP
2 #define GUI_PKG_SEQ_EDIT___PUBAUTHOR_PANEL__HPP
3 /* $Id: pubauthor_panel.hpp 42811 2019-04-18 10:15:32Z bollin $
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>
32 #include <wx/panel.h>
33 #include <wx/hyperlink.h>
35 
36 class wxScrolledWindow;
37 class wxFlexGridSizer;
38 
39 
41 
42 /*!
43  * Control identifiers
44  */
45 
46 ////@begin control identifiers
47 #define SYMBOL_CPUBAUTHORPANEL_STYLE wxTAB_TRAVERSAL
48 #define SYMBOL_CPUBAUTHORPANEL_TITLE _("Reference Author Panel")
49 #define SYMBOL_CPUBAUTHORPANEL_IDNAME ID_CPUBAUTHORPANEL
50 #define SYMBOL_CPUBAUTHORPANEL_SIZE wxDefaultSize
51 #define SYMBOL_CPUBAUTHORPANEL_POSITION wxDefaultPosition
52 ////@end control identifiers
53 
54 
55 /*!
56  * CPubAuthorPanel class declaration
57  */
58 
59 class CPubAuthorPanel: public wxPanel
60 {
61  DECLARE_DYNAMIC_CLASS( CPubAuthorPanel )
62  DECLARE_EVENT_TABLE()
63 
64 public:
65  /// Constructors
67  CPubAuthorPanel( wxWindow* parent,
68  wxWindowID id = SYMBOL_CPUBAUTHORPANEL_IDNAME,
69  const wxPoint& pos = SYMBOL_CPUBAUTHORPANEL_POSITION,
70  const wxSize& size = SYMBOL_CPUBAUTHORPANEL_SIZE,
71  long style = SYMBOL_CPUBAUTHORPANEL_STYLE );
72 
73  /// Creation
74  bool Create( wxWindow* parent,
75  wxWindowID id = SYMBOL_CPUBAUTHORPANEL_IDNAME,
76  const wxPoint& pos = SYMBOL_CPUBAUTHORPANEL_POSITION,
77  const wxSize& size = SYMBOL_CPUBAUTHORPANEL_SIZE,
78  long style = SYMBOL_CPUBAUTHORPANEL_STYLE );
79 
80  /// Destructor
82 
83  /// Initialises member variables
84  void Init();
85 
86  /// Creates the controls and sizers
87  void CreateControls();
88 
89  virtual bool TransferDataToWindow();
90  virtual bool TransferDataFromWindow();
91 
92  void ApplyCitSub(objects::CCit_sub& sub);
93 
94 
95 ////@begin CPubAuthorPanel event handler declarations
96 
97  /// wxEVT_COMMAND_HYPERLINK event handler for ID_MOLADDCHROMOSOME
98  void OnAddAuthorClicked( wxHyperlinkEvent& event );
99 
100  /// wxEVT_COMMAND_HYPERLINK event handler for ID_MOLDELCHROMOSOME
101  void OnAddConsortiumClicked( wxHyperlinkEvent& event );
102 
103 ////@end CPubAuthorPanel event handler declarations
104 
105 ////@begin CPubAuthorPanel member function declarations
106 
107  /// Retrieves bitmap resources
108  wxBitmap GetBitmapResource( const wxString& name );
109 
110  /// Retrieves icon resources
111  wxIcon GetIconResource( const wxString& name );
112 ////@end CPubAuthorPanel member function declarations
113 
114  /// Should we show tooltips?
115  static bool ShowToolTips();
116 private:
117  void x_AddAuthorRow();
118  void x_AddConsortiumRow();
119  void x_AddRowToWindow(wxWindow* row);
120 
121  size_t m_Rows{ 3 };
122  int m_RowHeight{ 0 };
123 
125 
126 ////@begin CPubAuthorPanel member variables
127  wxScrolledWindow* m_ScrolledWindow;
128  wxFlexGridSizer* m_Sizer;
129 public:
130  /// Control identifiers
131  enum {
135  ID_MOLDELCHROMOSOME = 6648
136  };
137 ////@end CPubAuthorPanel member variables
138 };
139 
141 
142 #endif
143  // GUI_PKG_SEQ_EDIT___PUBAUTHOR_PANEL__HPP
void OnAddAuthorClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_MOLADDCHROMOSOME
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
static bool ShowToolTips()
Should we show tooltips?
CRef< objects::CCit_sub > m_Sub
~CPubAuthorPanel()
Destructor.
void Init()
Initialises member variables.
void x_AddRowToWindow(wxWindow *row)
virtual bool TransferDataToWindow()
CPubAuthorPanel()
Constructors.
void OnAddConsortiumClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_MOLDELCHROMOSOME
void CreateControls()
Creates the controls and sizers.
virtual bool TransferDataFromWindow()
wxScrolledWindow * m_ScrolledWindow
bool Create(wxWindow *parent, wxWindowID id=ID_CPUBAUTHORPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
Creation.
wxFlexGridSizer * m_Sizer
void ApplyCitSub(objects::CCit_sub &sub)
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
const struct ncbi::grid::netcache::search::fields::SIZE size
#define SYMBOL_CPUBAUTHORPANEL_IDNAME
#define SYMBOL_CPUBAUTHORPANEL_STYLE
#define SYMBOL_CPUBAUTHORPANEL_POSITION
#define SYMBOL_CPUBAUTHORPANEL_SIZE
#define row(bind, expected)
Definition: string_bind.c:73
Modified on Wed May 22 11:31:29 2024 by modify_doxy.py rev. 669887