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

Go to the SVN repository for this file.

1 /* $Id: submitblockdlg.hpp 27516 2013-02-28 12:38:52Z 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 _SUBMITBLOCKDLG_H_
29 #define _SUBMITBLOCKDLG_H_
30 
31 #include <corelib/ncbistd.hpp>
44 
45 #include <wx/dialog.h>
46 #include <wx/checkbox.h>
47 #include <wx/textctrl.h>
48 #include <wx/button.h>
49 
50 /*!
51  * Includes
52  */
53 
54 ////@begin includes
55 #include "wx/notebook.h"
56 ////@end includes
57 
58 /*!
59  * Forward declarations
60  */
61 
62 ////@begin forward declarations
63 class wxBoxSizer;
64 class wxNotebook;
65 ////@end forward declarations
66 
68 
69 /*!
70  * Control identifiers
71  */
72 
73 ////@begin control identifiers
74 #define ID_SUBMITBLOCKDLG 10015
75 #define ID_SUBMITBLOCKDLGLISTBOOK 10016
76 #define ID_CLEAR_BTN 10107
77 #define ID_BUTTON15 10066
78 #define ID_BUTTON14 10065
79 #define ID_IMPORT_BTN 10099
80 #define ID_EXPORT_BTN 10100
81 #define SYMBOL_CSUBMITBLOCKDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
82 #define SYMBOL_CSUBMITBLOCKDLG_TITLE _("Submission Information")
83 #define SYMBOL_CSUBMITBLOCKDLG_IDNAME ID_SUBMITBLOCKDLG
84 #define SYMBOL_CSUBMITBLOCKDLG_SIZE wxSize(400, 300)
85 #define SYMBOL_CSUBMITBLOCKDLG_POSITION wxDefaultPosition
86 ////@end control identifiers
87 
88 #define ID_SUBMITBLOCKDLG_SAME_AUTHORS 10017
89 #define ID_SUBMITBLOCKDLG_SAME_AFFILS 10018
90 #define ID_COPY_SEQ_AUTH_TO_MAN_AUTH 10019
91 
92 /*!
93  * CSubmitBlockDlg class declaration
94  */
95 
96 class CSubmitBlockDlg: public wxDialog
97 {
98  DECLARE_DYNAMIC_CLASS( CSubmitBlockDlg )
99  DECLARE_EVENT_TABLE()
100 
101 public:
102  /// Constructors
103  CSubmitBlockDlg();
105  IWorkbench* workbench,
106  wxWindowID id = SYMBOL_CSUBMITBLOCKDLG_IDNAME, const wxString& caption = SYMBOL_CSUBMITBLOCKDLG_TITLE, const wxPoint& pos = SYMBOL_CSUBMITBLOCKDLG_POSITION, const wxSize& size = SYMBOL_CSUBMITBLOCKDLG_SIZE, long style = SYMBOL_CSUBMITBLOCKDLG_STYLE );
107 
108  /// Creation
109  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CSUBMITBLOCKDLG_IDNAME, const wxString& caption = SYMBOL_CSUBMITBLOCKDLG_TITLE, const wxPoint& pos = SYMBOL_CSUBMITBLOCKDLG_POSITION, const wxSize& size = SYMBOL_CSUBMITBLOCKDLG_SIZE, long style = SYMBOL_CSUBMITBLOCKDLG_STYLE );
110 
111  /// Destructor
113 
114  /// Initialises member variables
115  void Init();
116 
117  /// Creates the controls and sizers
118  void CreateControls();
119 
120 ////@begin CSubmitBlockDlg event handler declarations
121 
122  /// wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED event handler for ID_SUBMITBLOCKDLGLISTBOOK
123  void OnSubmitblockdlgPageChanged( wxNotebookEvent& event );
124 
125  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CLEAR_BTN
126  void OnClearBtnClick( wxCommandEvent& event );
127 
128  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON15
129  void OnBackBtnClick( wxCommandEvent& event );
130 
131  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON14
132  void OnNextBtnClick( wxCommandEvent& event );
133 
134  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_BTN
135  void OnImportBtnClick( wxCommandEvent& event );
136 
137  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_EXPORT_BTN
138  void OnExportBtnClick( wxCommandEvent& event );
139 
140 ////@end CSubmitBlockDlg event handler declarations
141  void OnSeparateAuthorsClick( wxCommandEvent& event );
142  void OnCopySeqAuthToManAuthClick( wxCommandEvent& event );
143 
144 ////@begin CSubmitBlockDlg member function declarations
145 
146  /// Retrieves bitmap resources
147  wxBitmap GetBitmapResource( const wxString& name );
148 
149  /// Retrieves icon resources
150  wxIcon GetIconResource( const wxString& name );
151 ////@end CSubmitBlockDlg member function declarations
152 
153  /// Should we show tooltips?
154  static bool ShowToolTips();
155 
156 ////@begin CSubmitBlockDlg member variables
157  wxBoxSizer* m_Updatable;
158  wxNotebook* m_Book;
159  wxBoxSizer* m_SameAuthSizer;
160  wxButton* m_BackBtn;
161  wxButton* m_NextBtn;
162 ////@end CSubmitBlockDlg member variable
163 
164  void SetAlternateEmailAddress(string alt_email);
165 
168  string GetAlternateEmailAddress();
169  string GetErrors();
170  static string GetBlockProblems(CRef<objects::CSubmit_block> block);
172  void SetPageForError(string errors);
174 
175 private:
178 
185  wxTextCtrl* m_AlternateEmail;
186 
187  wxCheckBox* m_AuthorsSame;
188  wxCheckBox* m_AffilsSame;
190 
191  bool x_CopyAuthors();
192  void x_BuildPages();
195 
197  wxString m_SaveFileDir;
198  wxString m_SaveFileName;
199 };
200 
202 
203 #endif
204  // _SUBMITBLOCKDLG_H_
User-defined methods of the data storage class.
wxNotebook * m_Book
static string GetCitGenProblems(CRef< objects::CCit_gen > gen)
wxCheckBox * m_AuthorsSame
CRef< objects::CCit_gen > x_CreateCitGen()
string GetAlternateEmailAddress()
CUnpublishedPanel * m_UnpublishedPanel
CAuthorAffiliationPanel * m_AffilPanel
CRef< objects::CSubmit_block > GetSubmitBlock()
void OnNextBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON14
static string GetBlockProblems(CRef< objects::CSubmit_block > block)
IWorkbench * m_Workbench
bool Create(wxWindow *parent, wxWindowID id=10015, const wxString &caption=_("Submission Information"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void OnSeparateAuthorsClick(wxCommandEvent &event)
wxCheckBox * m_AffilsSame
CRef< objects::CSubmit_block > m_SubmitBlock
CRef< objects::CCit_gen > m_Gen
wxBoxSizer * m_SameAuthSizer
~CSubmitBlockDlg()
Destructor.
wxButton * m_BackBtn
CRef< objects::CCit_gen > GetCitGen()
void OnCopySeqAuthToManAuthClick(wxCommandEvent &event)
CReleaseDatePanel * m_ReleaseDatePanel
void Init()
Initialises member variables.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxButton * m_NextBtn
wxTextCtrl * m_AlternateEmail
void SetAlternateEmailAddress(string alt_email)
CAuthorNamesPanel * m_SequenceAuthorsPanel
void OnClearBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CLEAR_BTN
CSubmitBlockDlg()
Constructors.
void OnBackBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON15
wxButton * m_CopySeqAuthToManAuth
void OnExportBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_EXPORT_BTN
void SetPageForError(string errors)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
CAuthorNamesPanel * m_ManAuthorsPanel
void UnselectReleaseDateChoice()
void CreateControls()
Creates the controls and sizers.
CContactPanel * m_ContactPanel
wxBoxSizer * m_Updatable
void OnSubmitblockdlgPageChanged(wxNotebookEvent &event)
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED event handler for ID_SUBMITBLOCKDLGLISTBOOK
static bool ShowToolTips()
Should we show tooltips?
void OnImportBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_BTN
CRef< objects::CSubmit_block > x_CreateBlock()
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
const struct ncbi::grid::netcache::search::fields::SIZE size
#define SYMBOL_CSUBMITBLOCKDLG_TITLE
#define SYMBOL_CSUBMITBLOCKDLG_SIZE
#define SYMBOL_CSUBMITBLOCKDLG_STYLE
#define SYMBOL_CSUBMITBLOCKDLG_IDNAME
#define SYMBOL_CSUBMITBLOCKDLG_POSITION
Modified on Fri Sep 20 14:58:09 2024 by modify_doxy.py rev. 669887