In progress: scrolling added.
This commit is contained in:
parent
5597e2e752
commit
cf9ec1dc04
|
@ -130,6 +130,12 @@ namespace Gtk.CairoChart {
|
|||
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_height = 0.0;
|
||||
|
||||
|
|
|
@ -353,6 +353,18 @@ int main (string[] args) {
|
|||
// user's post motion_notify_event operations here...
|
||||
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);
|
||||
vbox2.pack_start(button1, false, false, 0);
|
||||
|
|
Loading…
Reference in New Issue