summaryrefslogtreecommitdiff
path: root/src/wx/timeline.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-05-09 22:54:07 +0100
committerCarl Hetherington <cth@carlh.net>2013-05-09 22:54:07 +0100
commitbdbddbe89d4996a39dc6e695f23a6457c03774ae (patch)
tree2434303ff9c2f47a258dadb9e499eb4e7b73ef67 /src/wx/timeline.h
parentf08d36982bf940dbd59caf6f24a90c1429fca5f8 (diff)
Basic retained-mode-style canvas for timeline; allow selection.
Diffstat (limited to 'src/wx/timeline.h')
-rw-r--r--src/wx/timeline.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/wx/timeline.h b/src/wx/timeline.h
index 1993eb9c2..59800e7ad 100644
--- a/src/wx/timeline.h
+++ b/src/wx/timeline.h
@@ -20,19 +20,47 @@
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <wx/wx.h>
+#include "util.h"
class Playlist;
+class View;
class Timeline : public wxPanel
{
public:
Timeline (wxWindow *, boost::shared_ptr<Playlist>);
+ void force_redraw (Rect const &);
+
+ int x_offset () const {
+ return 8;
+ }
+
+ int width () const {
+ return GetSize().GetWidth ();
+ }
+
+ int track_height () const {
+ return 64;
+ }
+
+ double pixels_per_second () const {
+ return _pixels_per_second;
+ }
+
+ Position tracks_position () const {
+ return Position (8, 8);
+ }
+
+ int tracks () const;
+
private:
void paint (wxPaintEvent &);
+ void left_down (wxMouseEvent &);
void playlist_changed ();
+ void setup_pixels_per_second ();
- static int const _track_height;
-
boost::weak_ptr<Playlist> _playlist;
+ std::list<boost::shared_ptr<View> > _views;
+ double _pixels_per_second;
};