summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-04 10:58:01 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-04 10:58:01 +0100
commit792ffde2a810284504a241df70ac3e407a5e05c6 (patch)
treec8a1975f7364ed9f55a44164af03458d735a67a8 /src
parent6096f01d206f1a5da22c4e1478503d95feb3290b (diff)
Toolbar and scrolling tweaks.
Diffstat (limited to 'src')
-rw-r--r--src/wx/timeline.cc8
-rw-r--r--src/wx/timeline_dialog.cc6
2 files changed, 10 insertions, 4 deletions
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index 8524db603..017d27dfb 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -96,7 +96,13 @@ Timeline::Timeline (wxWindow* parent, ContentPanel* cp, shared_ptr<Film> film)
_main_canvas->Bind (wxEVT_RIGHT_DOWN, boost::bind (&Timeline::right_down, this, _1));
_main_canvas->Bind (wxEVT_MOTION, boost::bind (&Timeline::mouse_moved, this, _1));
_main_canvas->Bind (wxEVT_SIZE, boost::bind (&Timeline::resized, this));
- _main_canvas->Bind (wxEVT_SCROLLWIN_THUMBTRACK, boost::bind (&Timeline::scrolled, this, _1));
+ _main_canvas->Bind (wxEVT_SCROLLWIN_TOP, boost::bind (&Timeline::scrolled, this, _1));
+ _main_canvas->Bind (wxEVT_SCROLLWIN_BOTTOM, boost::bind (&Timeline::scrolled, this, _1));
+ _main_canvas->Bind (wxEVT_SCROLLWIN_LINEUP, boost::bind (&Timeline::scrolled, this, _1));
+ _main_canvas->Bind (wxEVT_SCROLLWIN_LINEDOWN, boost::bind (&Timeline::scrolled, this, _1));
+ _main_canvas->Bind (wxEVT_SCROLLWIN_PAGEUP, boost::bind (&Timeline::scrolled, this, _1));
+ _main_canvas->Bind (wxEVT_SCROLLWIN_PAGEDOWN, boost::bind (&Timeline::scrolled, this, _1));
+ _main_canvas->Bind (wxEVT_SCROLLWIN_THUMBTRACK, boost::bind (&Timeline::scrolled, this, _1));
film_changed (Film::CONTENT);
diff --git a/src/wx/timeline_dialog.cc b/src/wx/timeline_dialog.cc
index b487bdb81..6f3fbae37 100644
--- a/src/wx/timeline_dialog.cc
+++ b/src/wx/timeline_dialog.cc
@@ -61,14 +61,14 @@ TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr<Film> film)
wxBitmap snap (bitmap_path("snap"), wxBITMAP_TYPE_PNG);
wxBitmap sequence (bitmap_path("sequence"), wxBITMAP_TYPE_PNG);
- cout << "select OK: " << select.IsOk() << "\n";
-
- _toolbar = new wxToolBar (this, wxID_ANY);
+ _toolbar = new wxToolBar (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL | wxTB_TEXT);
+ _toolbar->SetMargins (4, 4);
_toolbar->AddRadioTool ((int) Timeline::SELECT, _("Select"), select, wxNullBitmap, _("Select and move content"));
_toolbar->AddRadioTool ((int) Timeline::ZOOM, _("Zoom"), zoom, wxNullBitmap, _("Zoom in / out"));
_toolbar->AddTool ((int) Timeline::ZOOM_ALL, _("Zoom all"), zoom_all, _("Zoom out to whole film"));
_toolbar->AddCheckTool ((int) Timeline::SNAP, _("Snap"), snap, wxNullBitmap, _("Snap"));
_toolbar->AddCheckTool ((int) Timeline::SEQUENCE, _("Sequence"), sequence, wxNullBitmap, _("Keep video and subtitles in sequence"));
+ _toolbar->Realize ();
_toolbar->Bind (wxEVT_TOOL, bind (&TimelineDialog::tool_clicked, this, _1));