- Bind (wxEVT_PAINT, boost::bind (&Timeline::paint, this));
- Bind (wxEVT_LEFT_DOWN, boost::bind (&Timeline::left_down, this, _1));
- Bind (wxEVT_LEFT_UP, boost::bind (&Timeline::left_up, this, _1));
- Bind (wxEVT_RIGHT_DOWN, boost::bind (&Timeline::right_down, this, _1));
- Bind (wxEVT_MOTION, boost::bind (&Timeline::mouse_moved, this, _1));
- Bind (wxEVT_SIZE, boost::bind (&Timeline::resized, this));
+ wxSizer* sizer = new wxBoxSizer (wxHORIZONTAL);
+ sizer->Add (_labels_canvas, 0, wxEXPAND);
+ _labels_canvas->SetMinSize (wxSize (_labels_view->bbox().width, -1));
+ sizer->Add (_main_canvas, 1, wxEXPAND);
+ SetSizer (sizer);
+
+ _labels_canvas->Bind (wxEVT_PAINT, boost::bind (&Timeline::paint_labels, this));
+ _main_canvas->Bind (wxEVT_PAINT, boost::bind (&Timeline::paint_main, this));
+ _main_canvas->Bind (wxEVT_LEFT_DOWN, boost::bind (&Timeline::left_down, this, _1));
+ _main_canvas->Bind (wxEVT_LEFT_UP, boost::bind (&Timeline::left_up, this, _1));
+ _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));