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

Go to the SVN repository for this file.

1 #ifndef PKG_SEQUENCE___FASTA_EXPORT_PAGE__HPP
2 #define PKG_SEQUENCE___FASTA_EXPORT_PAGE__HPP
3 
4 /* $Id: fasta_export_page.hpp 39318 2017-09-12 16:00:18Z evgeniev $
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: Roman Katargin
30  */
31 
32 #include <corelib/ncbistd.hpp>
33 
34 /*!
35  * Includes
36  */
37 
38 #include <wx/panel.h>
41 
42 /*!
43  * Forward declarations
44  */
45 
46 /*!
47  * Control identifiers
48  */
49 
50 ////@begin control identifiers
51 #define SYMBOL_CFASTAEXPORTPAGE_STYLE wxTAB_TRAVERSAL
52 #define SYMBOL_CFASTAEXPORTPAGE_TITLE _("FASTA Export Page")
53 #define SYMBOL_CFASTAEXPORTPAGE_IDNAME ID_FASTA_EXPORT_PAGE
54 #define SYMBOL_CFASTAEXPORTPAGE_SIZE wxSize(400, 300)
55 #define SYMBOL_CFASTAEXPORTPAGE_POSITION wxDefaultPosition
56 ////@end control identifiers
57 
59 
61 
62 /*!
63  * CFastaExportPage class declaration
64  */
65 
66 class CFastaExportPage: public wxPanel
67  , public IRegSettings
68 {
69  DECLARE_DYNAMIC_CLASS( CFastaExportPage )
70  DECLARE_EVENT_TABLE()
71 
72 public:
73  /// Constructors
75  CFastaExportPage( wxWindow* parent, wxWindowID id = SYMBOL_CFASTAEXPORTPAGE_IDNAME, const wxString& caption = SYMBOL_CFASTAEXPORTPAGE_TITLE, const wxPoint& pos = SYMBOL_CFASTAEXPORTPAGE_POSITION, const wxSize& size = SYMBOL_CFASTAEXPORTPAGE_SIZE, long style = SYMBOL_CFASTAEXPORTPAGE_STYLE );
76 
77  /// Creation
78  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CFASTAEXPORTPAGE_IDNAME, const wxString& caption = SYMBOL_CFASTAEXPORTPAGE_TITLE, const wxPoint& pos = SYMBOL_CFASTAEXPORTPAGE_POSITION, const wxSize& size = SYMBOL_CFASTAEXPORTPAGE_SIZE, long style = SYMBOL_CFASTAEXPORTPAGE_STYLE );
79 
80  /// Destructor
82 
83  /// Initialises member variables
84  void Init();
85 
86  /// IRegSettings
87  virtual void SetRegistryPath(const string& path);
88  virtual void SaveSettings() const;
89  virtual void LoadSettings();
90 
91  /// Creates the controls and sizers
92  void CreateControls();
93 
94  virtual bool TransferDataFromWindow();
95 
96 ////@begin CFastaExportPage event handler declarations
97 
98  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BITMAPBUTTON3
99  void OnSelectFileClick( wxCommandEvent& event );
100 
101 ////@end CFastaExportPage event handler declarations
102 
103 ////@begin CFastaExportPage member function declarations
104 
105  /// Data access
107  const CFastaExportParams& GetData() const { return m_data; }
109 
110  /// Retrieves bitmap resources
111  wxBitmap GetBitmapResource( const wxString& name );
112 
113  /// Retrieves icon resources
114  wxIcon GetIconResource( const wxString& name );
115 ////@end CFastaExportPage member function declarations
116 
118 
119  /// Should we show tooltips?
120  static bool ShowToolTips();
121 
122 ////@begin CFastaExportPage member variables
124  /// The data edited by this window
126  /// Control identifiers
127  enum {
129  ID_PANEL = 10059,
130  ID_CHECKBOX = 10060,
131  ID_RADIOBOX = 10001,
132  ID_TEXTCTRL = 10061,
133  ID_BITMAPBUTTON3 = 10016
134  };
135 ////@end CFastaExportPage member variables
136 
137 private:
138  string m_RegPath;
139  std::unique_ptr<CSaveFileHelper> m_SaveFile;
140 };
141 
143 
144 #endif // PKG_SEQUENCE___FASTA_EXPORT_PAGE__HPP
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
const CFastaExportParams & GetData() const
virtual void SetRegistryPath(const string &path)
IRegSettings.
CObjectListWidgetSel * m_LocationSel
void OnSelectFileClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BITMAPBUTTON3
bool Create(wxWindow *parent, wxWindowID id=ID_FASTA_EXPORT_PAGE, const wxString &caption=_("FASTA Export Page"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
virtual bool TransferDataFromWindow()
~CFastaExportPage()
Destructor.
CFastaExportParams m_data
The data edited by this window.
void SetData(const CFastaExportParams &data)
CFastaExportParams & GetData()
Data access.
std::unique_ptr< CSaveFileHelper > m_SaveFile
CFastaExportPage()
Constructors.
void SetObjects(map< string, TConstScopedObjects > *objects)
virtual void LoadSettings()
void Init()
Initialises member variables.
virtual void SaveSettings() const
static bool ShowToolTips()
Should we show tooltips?
void CreateControls()
Creates the controls and sizers.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
IRegSettings An interface for objects that save / restore settings using CGuiRegistry.
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define SYMBOL_CFASTAEXPORTPAGE_IDNAME
#define SYMBOL_CFASTAEXPORTPAGE_POSITION
#define SYMBOL_CFASTAEXPORTPAGE_STYLE
#define SYMBOL_CFASTAEXPORTPAGE_SIZE
#define SYMBOL_CFASTAEXPORTPAGE_TITLE
char data[12]
Definition: iconv.c:80
#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
Modified on Wed May 22 11:32:09 2024 by modify_doxy.py rev. 669887