digitalmars.D.learn - Canvas in Gtk connected to D?
- Mike McKee (15/15) Sep 14 2015 Is there a way to do a canvas in GTK3 so that I can use chart.js,
- Alexander Hausmann (5/21) Sep 14 2015 I'm guessing the port was so easy because the QQuickWidgets have access
- Justin Whear (6/7) Sep 14 2015 Mike, as this is really a GTK3 question and not specific to D (if GTK
- Mike McKee (6/12) Sep 14 2015 Unfortunately derelict-cef is still alpha and not documented well
- Mike McKee (3/5) Sep 14 2015 BTW, the gtkforums.com site doesn't just let anyone in. I'm still
Is there a way to do a canvas in GTK3 so that I can use chart.js, and connect this to D? See, in something similar, a guy named Julien Wintz figured out that Qt's QQuickWidget acts much like the webkit Canvas object, and thus was able to port chart.js to that widget. This allows one to use Qt + QQuickWidget + D (or any Qt-supported language for that matter) to draw charts using Javascript, using the chart.js documentation. What's also fascinating about this is that it's fairly lightweight -- Julien's solution doesn't use Chromium (or other webkit implementation) to make it work. (It should be noted, however, that QQuickWidget uses OpenGL, however.) Likewise, it would be great if I could do something similar in GTK3. See, I like D, and I'm getting somewhere with it with GTK3, but doing static charts like I see with chart.js is important for my use of this language.
Sep 14 2015
Am 14.09.2015 um 19:05 schrieb Mike McKee:Is there a way to do a canvas in GTK3 so that I can use chart.js, and connect this to D? See, in something similar, a guy named Julien Wintz figured out that Qt's QQuickWidget acts much like the webkit Canvas object, and thus was able to port chart.js to that widget. This allows one to use Qt + QQuickWidget + D (or any Qt-supported language for that matter) to draw charts using Javascript, using the chart.js documentation. What's also fascinating about this is that it's fairly lightweight -- Julien's solution doesn't use Chromium (or other webkit implementation) to make it work. (It should be noted, however, that QQuickWidget uses OpenGL, however.) Likewise, it would be great if I could do something similar in GTK3. See, I like D, and I'm getting somewhere with it with GTK3, but doing static charts like I see with chart.js is important for my use of this language.I'm guessing the port was so easy because the QQuickWidgets have access to the V8 javascript engine (from Chromium ) that is included with Qt. As GTK doesn't have a javascript engine integrated a straightforward port of chartjs won't work.
Sep 14 2015
On Mon, 14 Sep 2015 17:05:16 +0000, Mike McKee wrote:Is there a way to do a canvas in GTK3 so that I can use chart.js,Mike, as this is really a GTK3 question and not specific to D (if GTK will let you do it in C, you can do it in D), you might have better success asking the GTK forum (gtkforums.com). Another avenue of research would be to look at CEF (D bindings here: http://code.dlang.org/packages/ derelict-cef) and see if that will integrate with your toolkit.
Sep 14 2015
On Monday, 14 September 2015 at 19:56:57 UTC, Justin Whear wrote:Mike, as this is really a GTK3 question and not specific to D (if GTK will let you do it in C, you can do it in D), you might have better success asking the GTK forum (gtkforums.com). Another avenue of research would be to look at CEF (D bindings here: http://code.dlang.org/packages/ derelict-cef) and see if that will integrate with your toolkit.Unfortunately derelict-cef is still alpha and not documented well yet. The developer is working on a book on another project, I hear. I'll ask in the GTK Forums what they recommend as the most recently recommended approach for doing static charts in GTK3.
Sep 14 2015
On Monday, 14 September 2015 at 21:57:23 UTC, Mike McKee wrote:I'll ask in the GTK Forums what they recommend as the most recently recommended approach for doing static charts in GTK3.BTW, the gtkforums.com site doesn't just let anyone in. I'm still waiting on an admin to approve me. :(
Sep 14 2015