Re: Need 2D data display widget
- From: jcupitt gmail com
- To: "Dan H" <dunno stoptrick com>
- Cc: gtk-app-list <gtk-app-devel-list gnome org>
- Subject: Re: Need 2D data display widget
- Date: Fri, 23 Nov 2007 13:07:35 +0000
On Nov 23, 2007 12:54 PM, Dan H <dunno stoptrick com> wrote:
I've found the GtkPlot stuff from GtkExtra. The possibilities seem to be awesome and go way beyond my
needs; however, I couldn't find any systematic API documentation. I've tried dissecting the example
programs, but they are overfreighted with features and I'm completely stumped trying to do the most basic
data display. Essentially everything just keeps segfaulting all over the place without useful diagnostics.
It took me ages to get gtkplot working nicely in my app. You're
welcome to steal this if you like:
http://vips.svn.sourceforge.net/viewvc/vips/nip2/trunk/src/plotpresent.c?view=markup
search down for plotpresent_build_plot(), plotpresent_build_data() and
plotpresent_refresh_plot().
You can see the sort of plot it makes here:
http://www.vips.ecs.soton.ac.uk/images/Screenshot-nip2-7.12.2.png
(the floating window on the right, obviously)
I had to fix a few bugs in gtkplot as well. Again, you're welcome to
steal a copy of my modified gtkplot. Changes I made:
- gtkplotcanvas.c only swallows motion/buttonpress events it handles
- gtkplotcanvas.c no longer tries to do focus handling (was broken)
- gtk_plot_canvas_destroy() was not unreffing the pixmap (thanks Simon)
- gtkplotcanvas.c has new cursor handling stuff to help nip do cursor changes
for middle-drag scrolling
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]