Merge commit 'HEAD'; branch 'timelinework' into gui
This commit is contained in:
commit
e12f72abe0
2 changed files with 14 additions and 13 deletions
|
|
@ -42,19 +42,17 @@ TimelineWidget::TimelineWidget() :
|
|||
verticalScroll(verticalAdjustment),
|
||||
ruler("ruler")
|
||||
{
|
||||
TimelineBody *body_ptr = new TimelineBody(this);
|
||||
body = Glib::RefPtr<TimelineBody>(body_ptr);
|
||||
g_assert(body);
|
||||
HeaderContainer *header_container_ptr = new HeaderContainer(this);
|
||||
headerContainer = Glib::RefPtr<HeaderContainer>(header_container_ptr);
|
||||
g_assert(headerContainer);
|
||||
body = new TimelineBody(this);
|
||||
g_assert(body != NULL);
|
||||
headerContainer = new HeaderContainer(this);
|
||||
g_assert(headerContainer != NULL);
|
||||
|
||||
verticalAdjustment.signal_value_changed().connect(
|
||||
sigc::mem_fun(this, &TimelineWidget::on_scroll) );
|
||||
|
||||
attach(*body_ptr, 1, 2, 1, 2, FILL|EXPAND, FILL|EXPAND);
|
||||
attach(*body, 1, 2, 1, 2, FILL|EXPAND, FILL|EXPAND);
|
||||
attach(ruler, 1, 2, 0, 1, FILL|EXPAND, SHRINK);
|
||||
attach(*header_container_ptr, 0, 1, 1, 2, SHRINK, FILL|EXPAND);
|
||||
attach(*headerContainer, 0, 1, 1, 2, SHRINK, FILL|EXPAND);
|
||||
attach(horizontalScroll, 1, 2, 2, 3, FILL|EXPAND, SHRINK);
|
||||
attach(verticalScroll, 2, 3, 1, 2, SHRINK, FILL|EXPAND);
|
||||
|
||||
|
|
@ -66,7 +64,10 @@ TimelineWidget::TimelineWidget() :
|
|||
|
||||
TimelineWidget::~TimelineWidget()
|
||||
{
|
||||
|
||||
g_assert(body != NULL);
|
||||
body->unreference();
|
||||
g_assert(headerContainer != NULL);
|
||||
headerContainer->unreference();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -86,7 +87,7 @@ TimelineWidget::on_size_allocate(Allocation& allocation)
|
|||
void
|
||||
TimelineWidget::update_tracks()
|
||||
{
|
||||
g_assert(headerContainer);
|
||||
g_assert(headerContainer != NULL);
|
||||
headerContainer->update_headers();
|
||||
|
||||
// Recalculate the total height of the timeline scrolled area
|
||||
|
|
@ -103,7 +104,7 @@ TimelineWidget::update_tracks()
|
|||
void
|
||||
TimelineWidget::update_scroll()
|
||||
{
|
||||
g_assert(body);
|
||||
g_assert(body != NULL);
|
||||
const Allocation body_allocation = body->get_allocation();
|
||||
|
||||
// Calculate the length that can be scrolled:
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ class TimelineWidget : public Gtk::Table
|
|||
timeline::VideoTrack video2;
|
||||
std::vector<timeline::Track*> tracks;
|
||||
|
||||
Glib::RefPtr<timeline::TimelineBody> body;
|
||||
Glib::RefPtr<timeline::HeaderContainer> headerContainer;
|
||||
timeline::TimelineBody *body;
|
||||
timeline::HeaderContainer *headerContainer;
|
||||
Gtk::Label ruler;
|
||||
|
||||
Gtk::Adjustment horizontalAdjustment, verticalAdjustment;
|
||||
|
|
|
|||
Loading…
Reference in a new issue