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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_EDIT___PUBLISHER_PANEL__HPP
2 #define GUI_WIDGETS_EDIT___PUBLISHER_PANEL__HPP
3 
4 /* $Id: publisher_panel.hpp 25034 2012-01-13 16:30:01Z falkrb $
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: Colleen Bollin
30  */
31 
32 #include <corelib/ncbistd.hpp>
33 
34 #include <objmgr/scope.hpp>
35 
36 #include <wx/panel.h>
37 #include <wx/textctrl.h>
38 
39 /*!
40  * Includes
41  */
42 
43 ////@begin includes
44 ////@end includes
45 
46 /*!
47  * Forward declarations
48  */
49 
50 ////@begin forward declarations
51 class wxFlexGridSizer;
52 ////@end forward declarations
53 
55 
56 class CSerialObject;
57 
58 /*!
59  * Control identifiers
60  */
61 
62 
63 ////@begin control identifiers
64 #define ID_PUBLISHER 10002
65 #define ID_PUBLISHER_NAME 10003
66 #define ID_PUBLISHER_ADDRESS 10005
67 #define ID_PUBLISHER_CITY 10006
68 #define ID_PUBLISHER_STATE 10007
69 #define ID_PUBLISHER_CODE 10008
70 #define ID_PUBLISHER_COUNTRY 10009
71 #define ID_PUBLISHER_PHONE 10059
72 #define ID_PUBLISHER_FAX 10060
73 #define ID_PUBLISHER_EMAIL 10061
74 #define ID_TEXTCTRL2 10021
75 #define ID_TEXTCTRL3 10024
76 #define SYMBOL_CPUBLISHERPANEL_STYLE wxTAB_TRAVERSAL
77 #define SYMBOL_CPUBLISHERPANEL_TITLE _("PablisherPanel")
78 #define SYMBOL_CPUBLISHERPANEL_IDNAME ID_PUBLISHER
79 #define SYMBOL_CPUBLISHERPANEL_SIZE wxSize(400, 300)
80 #define SYMBOL_CPUBLISHERPANEL_POSITION wxDefaultPosition
81 ////@end control identifiers
82 
83 
84 /*!
85  * CPublisherPanel class declaration
86  */
87 
88 class CPublisherPanel: public wxPanel
89 {
90  DECLARE_DYNAMIC_CLASS( CPublisherPanel )
91  DECLARE_EVENT_TABLE()
92 
93 public:
94  /// Constructors
96  CPublisherPanel( wxWindow* parent, CSerialObject& object, bool show_pages = false, wxWindowID id = SYMBOL_CPUBLISHERPANEL_IDNAME, const wxPoint& pos = SYMBOL_CPUBLISHERPANEL_POSITION, const wxSize& size = SYMBOL_CPUBLISHERPANEL_SIZE, long style = SYMBOL_CPUBLISHERPANEL_STYLE );
97 
98  /// Creation
99  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CPUBLISHERPANEL_IDNAME, const wxPoint& pos = SYMBOL_CPUBLISHERPANEL_POSITION, const wxSize& size = SYMBOL_CPUBLISHERPANEL_SIZE, long style = SYMBOL_CPUBLISHERPANEL_STYLE );
100 
101  /// Destructor
103 
104  /// Initialises member variables
105  void Init();
106 
107  /// Creates the controls and sizers
108  void CreateControls();
109 
110  virtual bool TransferDataToWindow();
111  virtual bool TransferDataFromWindow();
112 
113  void PopulatePublisherFields (objects::CImprint& imprint);
114 
115 ////@begin CPublisherPanel event handler declarations
116 
117 ////@end CPublisherPanel event handler declarations
118 
119 ////@begin CPublisherPanel 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 CPublisherPanel member function declarations
127 
128  /// Should we show tooltips?
129  static bool ShowToolTips();
130 
131 ////@begin CPublisherPanel member variables
132  wxFlexGridSizer* m_GridSizer;
133  wxTextCtrl* m_AffilCtrl;
134  wxTextCtrl* m_StreetCtrl;
135  wxTextCtrl* m_CityCtrl;
136  wxTextCtrl* m_SubCtrl;
137  wxTextCtrl* m_ZipCtrl;
138  wxTextCtrl* m_CountryCtrl;
139  wxTextCtrl* m_PhoneCtrl;
140  wxTextCtrl* m_FaxCtrl;
141  wxTextCtrl* m_EmailCtrl;
142  wxTextCtrl* m_PubYearCtrl;
143  wxTextCtrl* m_CpyYearCtrl;
144 ////@end CPublisherPanel member variables
145 private:
148  long m_PubYear;
151 
152 };
153 
155 
156 #endif // GUI_WIDGETS_EDIT___PUBLISHER_PANEL__HPP
wxTextCtrl * m_StreetCtrl
wxTextCtrl * m_CityCtrl
void PopulatePublisherFields(objects::CImprint &imprint)
wxTextCtrl * m_PhoneCtrl
wxTextCtrl * m_CpyYearCtrl
wxTextCtrl * m_AffilCtrl
wxTextCtrl * m_CountryCtrl
wxTextCtrl * m_SubCtrl
wxTextCtrl * m_EmailCtrl
~CPublisherPanel()
Destructor.
CPublisherPanel()
Constructors.
wxTextCtrl * m_ZipCtrl
virtual bool TransferDataFromWindow()
wxTextCtrl * m_PubYearCtrl
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxTextCtrl * m_FaxCtrl
virtual bool TransferDataToWindow()
static bool ShowToolTips()
Should we show tooltips?
bool Create(wxWindow *parent, wxWindowID id=10002, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
wxFlexGridSizer * m_GridSizer
CRef< CSerialObject > m_EditedImprint
void Init()
Initialises member variables.
CSerialObject * m_Object
void CreateControls()
Creates the controls and sizers.
Base class for all serializable objects.
Definition: serialbase.hpp:150
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_CPUBLISHERPANEL_SIZE
#define SYMBOL_CPUBLISHERPANEL_IDNAME
#define SYMBOL_CPUBLISHERPANEL_POSITION
#define SYMBOL_CPUBLISHERPANEL_STYLE
Modified on Sun Mar 03 03:16:40 2024 by modify_doxy.py rev. 669887