Stimfit @PACKAGE_VERSION@
Loading...
Searching...
No Matches
view.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 _VIEW_H
22#define _VIEW_H
23
27
28#include <wx/docview.h>
29class wxStfDoc;
30class wxStfGraph;
31
33
38class wxStfView : public wxView
39{
40public:
45
47
52 virtual bool OnCreate(wxDocument *doc, long flags);
53
55
58 virtual void OnDraw(wxDC *dc);
59
61
65 virtual void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
66
68
71 virtual bool OnClose(bool deleteWindow = true);
72
74
76 wxStfGraph* GetGraph() { return graph; }
77
79
82
84
86 wxStfDoc* DocC() const;
87
88protected:
90
94 virtual void OnActivateView(bool activate, wxView *activeView, wxView *deactiveView);
95
96private:
97 DECLARE_DYNAMIC_CLASS(wxStfView)
98 DECLARE_EVENT_TABLE()
99
100 wxStfGraph *graph;
101 wxStfChildFrame *childFrame;
102
103};
104
106
107#endif
108
See http://www.wxwidgets.org/manuals/stable/wx_wxdocument.html (wxWidgets documentation)
Provides the child frame for displaying documents on separate windows.
Definition childframe.h:63
The document class, derived from both wxDocument and Recording.
Definition doc.h:35
Handles drawing of traces and keyboard or mouse input.
Definition graph.h:49
See http://www.wxwidgets.org/manuals/stable/wx_wxview.html (wxWidgets documentation)
wxStfDoc * DocC() const
Retrieve the attached document.
virtual void OnUpdate(wxView *sender, wxObject *hint=(wxObject *) NULL)
Override default updating behaviour.
wxStfDoc * Doc()
Retrieve the attached document.
virtual bool OnCreate(wxDocument *doc, long flags)
Override default view creation.
wxStfGraph * GetGraph()
Retrieve the attached graph.
Definition view.h:76
~wxStfView()
Destructor.
Definition view.h:44
wxStfView()
Constructor.
virtual bool OnClose(bool deleteWindow=true)
Override default file closing behaviour.
virtual void OnActivateView(bool activate, wxView *activeView, wxView *deactiveView)
Called when the view is activated; dialogs and menus are then updated.
virtual void OnDraw(wxDC *dc)
The drawing function (note that actual drawing happens in wxStfGraph::OnDraw())