Tuesday, December 11, 2012

Getting to grips with Ganv

So you want to create a "Graph" based program? Use Ganv! It looks awesome, and David Robillard has already done the hard parts :)

Starting Out:

We're just doing a single file, proof of concept right now. Nothing fancy yet.
So you'll need to install:
ganv
gtkmm

Easiest way to do this is just checkout Drobilla's svn:
svn co http://svn.drobilla.net/lad/trunk drobillad

./waf configure --prefix=/usr
./waf
./waf install

What next:

Install ganv system wide. Download this tutorial's code from here: https://github.com/harryhaaren/openAudioProgrammingTutorials/blob/master/flowCanvas/flowcanvas.cpp

Read the code, its pretty self explanatory.

Then what?

Its a good idea to get to grips with how all this works together:

Ganv: is the way you interface with the whole
FlowCanvas: is the canvas itself, behind the scenes.
GTKmm: is your window, and you do what you like with it.

So the final structure is somewhat like this:
Gtk window
     Ganv Canvas
            Ganv Module
                  Ganv Port
                          Ganv Edge (connects ports)



That's all for now, hope I saved you a bit of time and effort! -Harry