Stimfit @PACKAGE_VERSION@
Loading...
Searching...
No Matches
parentframe.h
Go to the documentation of this file.
1// This program is free software; you can redistribute it and/or
2// modify it under the terms of the GNU General Public License
3// as published by the Free Software Foundation; either version 2
4// of the License, or (at your option) any later version.
5
6// This program is distributed in the hope that it will be useful,
7// but WITHOUT ANY WARRANTY; without even the implied warranty of
8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9// GNU General Public License for more details.
10
11// You should have received a copy of the GNU General Public License
12// along with this program; if not, write to the Free Software
13// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14
20
21#ifndef _PARENTFRAME_H
22#define _PARENTFRAME_H
23
27
28#include <wx/aui/aui.h>
29#include <wx/grid.h>
30#include <wx/dnd.h>
31
32#include "./../stf.h"
33
34class wxStfGraph;
35class wxStfTable;
36class wxStfGrid;
37class wxStfFileDrop;
38class wxProgressDialog;
39
40typedef wxAuiToolBar wxStfToolBar;
41
42#ifdef WITH_PYTHON
44 new_wxwindow(wxWindow* cppW=NULL, PyObject* pyW=NULL) :
45 cppWindow(cppW), pyWindow(pyW)
46 {}
48 PyObject* pyWindow;
49};
50#else
51struct new_wxwindow {
52 new_wxwindow(wxWindow* cppW=NULL, void* pyW=NULL) :
53 cppWindow(cppW), pyWindow(pyW)
54 {}
55 wxWindow* cppWindow;
56 void* pyWindow;
57};
58#endif
59
61
65 DECLARE_CLASS(wxStfParentFrame)
66public:
68
76 wxStfParentFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size,
77 long style);
78
81
83
85 void OnAbout(wxCommandEvent& event);
86
88
94
96
99
101
104
106
108 void SetSelectedButton(bool selected);
109
111
114
116
119
121
123 void SetSingleChannel(bool value);
124
126
128 wxPrintData* GetPrintData() { return m_printData.get(); }
129
131
133 wxPageSetupDialogData* GetPageSetup() { return m_pageSetupData.get(); }
134
136
138 wxAuiManager& GetMgr() { return m_mgr; }
139
141
143 void CheckUpdate( wxProgressDialog* progDlg=NULL ) const;
144
145 new_wxwindow MakePythonWindow(const std::string& windowFunc, const std::string& mgr_name="pythonShell",
146 const std::string& caption="Python Shell",
147 bool show=true, bool full=false, bool isfloat=true,
148 int width=-1, int height=-1,
149 double mpl_width=8.0, double mpl_height=6.0);
150
151 int GetMplFigNo() {return mpl_figno++;}
152private:
153 wxAuiManager m_mgr;
154 wxStfToolBar *m_cursorToolBar, *m_scaleToolBar;
155 wxStfFileDrop* m_drop;
156#ifdef WITH_PYTHON
157 wxString python_code2; // python import code
158 void RedirectStdio();
159#endif
160
161#if (__cplusplus < 201103)
162 // print data, to remember settings during the session
163 boost::shared_ptr<wxPrintData> m_printData;
164
165 // page setup data
166 boost::shared_ptr<wxPageSetupDialogData> m_pageSetupData;
167#else
168 // print data, to remember settings during the session
169 std::shared_ptr<wxPrintData> m_printData;
170
171 // page setup data
172 std::shared_ptr<wxPageSetupDialogData> m_pageSetupData;
173#endif
174
175 bool firstResize;
176
177 int mpl_figno;
178 wxStfToolBar* CreateStdTb();
179 wxStfToolBar* CreateScaleTb();
180 wxStfToolBar* CreateEditTb();
181 wxStfToolBar* CreateCursorTb();
182
183 void OnHelp(wxCommandEvent& event);
184 void OnCheckUpdate(wxCommandEvent& event);
185
186 void OnToggleSelect(wxCommandEvent& event);
187 void OnToolFirst(wxCommandEvent& event);
188 void OnToolNext(wxCommandEvent& event);
189 void OnToolPrevious(wxCommandEvent& event);
190 void OnToolLast(wxCommandEvent& event);
191 void OnToolXenl(wxCommandEvent& event);
192 void OnToolXshrink(wxCommandEvent& event);
193 void OnToolYenl(wxCommandEvent& event);
194 void OnToolYshrink(wxCommandEvent& event);
195 void OnToolUp(wxCommandEvent& event);
196 void OnToolDown(wxCommandEvent& event);
197 void OnToolFit(wxCommandEvent& event);
198 void OnToolLeft(wxCommandEvent& event);
199 void OnToolRight(wxCommandEvent& event);
200 void OnToolCh1(wxCommandEvent& event);
201 void OnToolCh2(wxCommandEvent& event);
202
203 void OnToolSnapshotwmf(wxCommandEvent& event);
204
205 void OnToolMeasure(wxCommandEvent& event);
206 void OnToolPeak(wxCommandEvent& event);
207 void OnToolBase(wxCommandEvent& event);
208 void OnToolDecay(wxCommandEvent& event);
209 void OnToolLatency(wxCommandEvent& event);
210 void OnToolZoom(wxCommandEvent& event);
211 void OnToolEvent(wxCommandEvent& event);
212 void OnToolAnnotation(wxCommandEvent& event);
213 void OnToolFitdecay(wxCommandEvent& event);
214
215#ifdef WITH_PSLOPE
216 void OnToolPSlope(wxCommandEvent& event);
217#endif
218
219// void OnSwapChannels(wxCommandEvent& event);
220 void OnCh2base(wxCommandEvent& event);
221 void OnCh2pos(wxCommandEvent& event);
222 void OnCh2zoom(wxCommandEvent& event);
223 void OnCh2basezoom(wxCommandEvent& event);
224 void OnAverage(wxCommandEvent& event);
225 void OnAlignedAverage(wxCommandEvent& event);
226 void OnExportfile(wxCommandEvent& event);
227 void OnExportatf(wxCommandEvent& event);
228 void OnExportigor(wxCommandEvent& event);
229 void OnExporthdf5(wxCommandEvent& event);
230 void OnConvert(wxCommandEvent& event);
231
232 void OnPrint(wxCommandEvent& event);
233
234 void OnScale(wxCommandEvent& event);
235 void OnMpl(wxCommandEvent& event);
236 void OnMplSpectrum(wxCommandEvent& event);
237 void OnPageSetup(wxCommandEvent& event);
238 void OnViewResults(wxCommandEvent& event);
239 void OnSaveperspective(wxCommandEvent& event);
240 void OnLoadperspective(wxCommandEvent& event);
241 void OnRestoreperspective(wxCommandEvent& event);
242#ifdef WITH_PYTHON
243 void OnViewshell(wxCommandEvent& event);
244 void OnUserdef(wxCommandEvent& event);
245#endif
246 void OnLStartMaxslope(wxCommandEvent& event);
247 void OnLStartHalfrise(wxCommandEvent& event);
248 void OnLStartPeak(wxCommandEvent& event);
249 void OnLStartManual(wxCommandEvent& event);
250 void OnLEndFoot(wxCommandEvent& event);
251 void OnLEndMaxslope(wxCommandEvent& event);
252 void OnLEndHalfrise(wxCommandEvent& event);
253 void OnLEndPeak(wxCommandEvent& event);
254 void OnLEndManual(wxCommandEvent& event);
255 void OnLWindow(wxCommandEvent& event);
256 DECLARE_EVENT_TABLE()
257};
258
259
260#endif
261
WORD TSTime TpMarker WORD size
Definition Son.h:337
See http://www.wxwidgets.org/manuals/stable/wx_wxcommandevent.html (wxWidgets documentation)
See http://www.wxwidgets.org/manuals/stable/wx_wxpoint.html (wxWidgets documentation)
See http://www.wxwidgets.org/manuals/stable/wx_wxsize.html (wxWidgets documentation)
Provides the child frame for displaying documents on separate windows.
Definition childframe.h:63
Handles drawing of traces and keyboard or mouse input.
Definition graph.h:49
Derived from wxGrid. Allows to copy cells to the clipboard.
Definition copygrid.h:29
Adapts stfnum::Table to be used by wxStfGrid.
Definition table.h:31
See http://www.wxwidgets.org/manuals/stable/wx_wxstring.html (wxWidgets documentation)
See http://www.wxwidgets.org/manuals/stable/wx_wxview.html (wxWidgets documentation)
See http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html (wxWidgets documentation)
zoom_channels
Determines which channels to scale.
Definition stf.h:380
cursor_type
Mouse cursor types.
Definition stf.h:364
wxAuiManager & GetMgr()
Retrieve the wxAuiManager.
stf::zoom_channels GetZoomQual() const
Retrieve which channels will be affected by scaling operations.
PyObject * pyWindow
Definition parentframe.h:48
wxAuiToolBar wxStfToolBar
Definition parentframe.h:40
void SetSingleChannel(bool value)
Set the zoom buttons to single- or multi-channel mode.
void SetMouseQual(stf::cursor_type value)
Sets the current mouse cursor mode.
void CheckUpdate(wxProgressDialog *progDlg=NULL) const
Checks for updates.
void SetSelectedButton(bool selected)
Sets status of the toolbar's selection button.
wxWindow * cppWindow
Definition parentframe.h:47
wxStfParentFrame(wxDocManager *manager, wxFrame *frame, const wxString &title, const wxPoint &pos, const wxSize &size, long style)
Constructor.
wxPrintData * GetPrintData()
Retrieves the print data.
wxPageSetupDialogData * GetPageSetup()
Retrieves the page setup.
wxStfGraph * CreateGraph(wxView *view, wxStfChildFrame *parent)
Creates a new graph.
stf::cursor_type GetMouseQual() const
Retrieve the current mouse mode.
void SetZoomQual(stf::zoom_channels value)
Set the channels that will be affected by scaling operations.
void OnAbout(wxCommandEvent &event)
Shows the "About" dialog.
new_wxwindow MakePythonWindow(const std::string &windowFunc, const std::string &mgr_name="pythonShell", const std::string &caption="Python Shell", bool show=true, bool full=false, bool isfloat=true, int width=-1, int height=-1, double mpl_width=8.0, double mpl_height=6.0)
~wxStfParentFrame()
Destructor.
new_wxwindow(wxWindow *cppW=NULL, PyObject *pyW=NULL)
Definition parentframe.h:44
wxDocMDIParentFrame wxStfParentType
parent frame type; depends on whether aui is used for the doc/view interface
Definition stf.h:86
#define StfDll
Defines dll export or import functions for Windows.
Definition stf.h:55