Added a dragging cursor

This commit is contained in:
Joel Holdsworth 2009-01-21 18:40:13 +00:00
parent cb13f5f74c
commit 355da88630
2 changed files with 21 additions and 6 deletions

View file

@ -179,12 +179,7 @@ bool TimelineHeaderContainer::on_button_press_event (
bool TimelineHeaderContainer::on_button_release_event ( bool TimelineHeaderContainer::on_button_release_event (
GdkEventButton* event) GdkEventButton* event)
{ {
TimelineLayoutHelper &layout = timelineWidget.layoutHelper; end_drag();
// Has the user been dragging?
if(layout.get_dragging_track())
layout.end_dragging_track();
return Container::on_button_release_event(event); return Container::on_button_release_event(event);
} }
@ -409,6 +404,24 @@ TimelineHeaderContainer::begin_drag()
// Raise all the header widgets so they float above the widgets not // Raise all the header widgets so they float above the widgets not
// being dragged // being dragged
raise_recursive(layout.get_dragging_track_iter()); raise_recursive(layout.get_dragging_track_iter());
// Set the cursor to a hand
REQUIRE(gdkWindow);
gdkWindow->set_cursor(Gdk::Cursor(Gdk::HAND1));
}
void
TimelineHeaderContainer::end_drag()
{
TimelineLayoutHelper &layout = timelineWidget.layoutHelper;
// Has the user been dragging?
if(layout.get_dragging_track())
layout.end_dragging_track();
// Reset the arrow as a cursor
REQUIRE(gdkWindow);
gdkWindow->set_cursor(Gdk::Cursor(Gdk::ARROW));
} }
void void

View file

@ -185,6 +185,8 @@ private:
void begin_drag(); void begin_drag();
void end_drag();
/** /**
* Recusively raises all the header widget windows in a branch to the * Recusively raises all the header widget windows in a branch to the
* top of the Z-order. * top of the Z-order.