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

Go to the SVN repository for this file.

1 /* $Id: subprepintropanel.hpp 27517 2013-02-28 13:25:54Z 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 _SUBPREPINTROPANEL_H_
29 #define _SUBPREPINTROPANEL_H_
30 
31 #include <corelib/ncbistd.hpp>
34 
35 /*!
36  * Includes
37  */
39 
40 ////@begin includes
41 #include "wx/hyperlink.h"
42 ////@end includes
43 #include <wx/hyperlink.h>
44 #include <wx/textctrl.h>
45 #include <wx/stattext.h>
46 #include <wx/choice.h>
47 #include <wx/listbox.h>
48 
49 /*!
50  * Forward declarations
51  */
52 
53 ////@begin forward declarations
54 ////@end forward declarations
55 
57 
58 class CSubPrep_panel;
59 
60 /*!
61  * Control identifiers
62  */
63 
64 ////@begin control identifiers
65 #define ID_CSUBPREPINTROPANEL 10090
66 #define ID_HYPERLINKCTRL5 10000
67 #define ID_SUBMISSION_TYPE 10003
68 #define ID_INTRO_TEXT 10091
69 #define SYMBOL_CSUBPREPINTROPANEL_STYLE wxTAB_TRAVERSAL
70 #define SYMBOL_CSUBPREPINTROPANEL_TITLE _("SubmissionPrepIntroPanel")
71 #define SYMBOL_CSUBPREPINTROPANEL_IDNAME ID_CSUBPREPINTROPANEL
72 #define SYMBOL_CSUBPREPINTROPANEL_SIZE wxSize(400, 300)
73 #define SYMBOL_CSUBPREPINTROPANEL_POSITION wxDefaultPosition
74 ////@end control identifiers
75 
76 
77 /*!
78  * CSubPrepIntroPanel class declaration
79  */
80 
81 class CSubPrepIntroPanel: public wxPanel
82 {
83  DECLARE_DYNAMIC_CLASS( CSubPrepIntroPanel )
84  DECLARE_EVENT_TABLE()
85 
86 public:
87  /// Constructors
89  CSubPrepIntroPanel( wxWindow* parent, IWorkbench* workbench, wxWindowID id = SYMBOL_CSUBPREPINTROPANEL_IDNAME, const wxPoint& pos = SYMBOL_CSUBPREPINTROPANEL_POSITION, const wxSize& size = SYMBOL_CSUBPREPINTROPANEL_SIZE, long style = SYMBOL_CSUBPREPINTROPANEL_STYLE );
90 
91  /// Creation
92  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CSUBPREPINTROPANEL_IDNAME, const wxPoint& pos = SYMBOL_CSUBPREPINTROPANEL_POSITION, const wxSize& size = SYMBOL_CSUBPREPINTROPANEL_SIZE, long style = SYMBOL_CSUBPREPINTROPANEL_STYLE );
93 
94  /// Destructor
96 
97  /// Initialises member variables
98  void Init();
99 
100  /// Creates the controls and sizers
101  void CreateControls();
102 
103 ////@begin CSubPrepIntroPanel event handler declarations
104 
105  /// wxEVT_LEFT_DOWN event handler for wxID_STATIC
106  void OnClickSubmitterSummary( wxMouseEvent& event );
107 
108  /// wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL5
109  void OnEditSubmitterInfoClicked( wxHyperlinkEvent& event );
110 
111  /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_SUBMISSION_TYPE
112  void OnSubmissionTypeSelected( wxCommandEvent& event );
113 
114  /// wxEVT_COMMAND_TEXT_URL event handler for ID_INTRO_TEXT
115  void OnIntroTextClickUrl( wxTextUrlEvent& event );
116 
117 ////@end CSubPrepIntroPanel event handler declarations
118 
119 ////@begin CSubPrepIntroPanel 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 CSubPrepIntroPanel member function declarations
127 
128  /// Should we show tooltips?
129  static bool ShowToolTips();
130 
131 ////@begin CSubPrepIntroPanel member variables
132  wxStaticText* m_StarSubmitter;
133  wxTextCtrl* m_SubmitterLabel;
134  wxStaticText* m_StarType;
135  wxListBox* m_SubmissionType;
136  wxTextCtrl* m_IntroText;
137 ////@end CSubPrepIntroPanel member variables
138 
139  // for communicating with parent
142  void SetWizardTypeCtrl();
143  bool IsComplete();
144 
145 private:
147 
148  void x_LaunchSubmitEditor();
150 
151  // for communicating with parent
153  void x_SetSubmissionNotReady(string error);
154  void x_UpdateSubmitBlock(CRef<objects::CSubmit_block> new_block, CRef<objects::CCit_gen> new_gen, string alt_email);
156 
157 };
158 
160 
161 #endif
162  // _SUBPREPINTROPANEL_H_
User-defined methods of the data storage class.
void OnEditSubmitterInfoClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL5
void x_UpdateSubmitBlock(CRef< objects::CSubmit_block > new_block, CRef< objects::CCit_gen > new_gen, string alt_email)
void Init()
Initialises member variables.
void x_SetSubmissionNotReady(string error)
void OnClickSubmitterSummary(wxMouseEvent &event)
wxEVT_LEFT_DOWN event handler for wxID_STATIC
CSubPrep_panel * x_GetParent()
bool Create(wxWindow *parent, wxWindowID id=10090, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
wxStaticText * m_StarSubmitter
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void CreateControls()
Creates the controls and sizers.
void x_SetIntroText(CSourceRequirements::EWizardType wizard_type)
wxStaticText * m_StarType
CSubPrepIntroPanel()
Constructors.
~CSubPrepIntroPanel()
Destructor.
void OnIntroTextClickUrl(wxTextUrlEvent &event)
wxEVT_COMMAND_TEXT_URL event handler for ID_INTRO_TEXT
CSourceRequirements::EWizardType x_GetWizardTypeFromSelection(int sel)
CSourceRequirements::EWizardType GetWizardTypeFromCtrl()
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnSubmissionTypeSelected(wxCommandEvent &event)
wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_SUBMISSION_TYPE
static bool ShowToolTips()
Should we show tooltips?
wxTextCtrl * m_SubmitterLabel
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_CSUBPREPINTROPANEL_SIZE
#define SYMBOL_CSUBPREPINTROPANEL_IDNAME
#define SYMBOL_CSUBPREPINTROPANEL_POSITION
#define SYMBOL_CSUBPREPINTROPANEL_STYLE
Modified on Fri May 24 14:55:36 2024 by modify_doxy.py rev. 669887