_labels_canvas->Scroll (0, 0);
Refresh ();
}
+
+
+void
+Timeline::keypress(wxKeyEvent const& event)
+{
+ if (event.GetKeyCode() == WXK_DELETE) {
+ auto film = _film.lock();
+ film->remove_content(selected_content());
+ }
+}
+
int tracks_y_offset () const;
+ void keypress(wxKeyEvent const &);
+
private:
void paint_labels ();
void paint_main ();
sizer->Layout ();
sizer->SetSizeHints (this);
+ Bind(wxEVT_CHAR_HOOK, boost::bind(&TimelineDialog::keypress, this, _1));
+
_toolbar->ToggleTool ((int) Timeline::SNAP, _timeline.snap ());
film_change (ChangeType::DONE, Film::Property::SEQUENCE);
}
}
}
+
+
+void
+TimelineDialog::keypress(wxKeyEvent const& event)
+{
+ _timeline.keypress(event);
+}
private:
void film_change (ChangeType type, Film::Property);
void tool_clicked (wxCommandEvent& id);
+ void keypress(wxKeyEvent const& event);
std::weak_ptr<Film> _film;
Timeline _timeline;