In progress: scrolling added.

This commit is contained in:
Kolan Sh 2017-08-22 12:07:32 +03:00
parent 5597e2e752
commit cf9ec1dc04
2 changed files with 18 additions and 0 deletions

View File

@ -130,6 +130,12 @@ namespace Gtk.CairoChart {
return true; return true;
} }
// TODO:
public virtual bool scroll_notify_event (Gdk.EventScroll event) {
//stdout.puts ("scroll_notify_event\n");
return true;
}
protected double title_width = 0.0; protected double title_width = 0.0;
protected double title_height = 0.0; protected double title_height = 0.0;

View File

@ -353,6 +353,18 @@ int main (string[] args) {
// user's post motion_notify_event operations here... // user's post motion_notify_event operations here...
return ret; return ret;
}); });
da.add_events(Gdk.EventMask.SCROLL_MASK);
da.scroll_event.connect((event) => {
// user's pre scroll_notify_event operations here...
stdout.puts("pre_scroll\n");
var ret = chart.scroll_notify_event(event);
// user's post scroll_notify_event operations here...
stdout.puts("post_scroll\n");
return ret;
});
var vbox2 = new Box(Orientation.VERTICAL, 0); var vbox2 = new Box(Orientation.VERTICAL, 0);
vbox2.pack_start(button1, false, false, 0); vbox2.pack_start(button1, false, false, 0);