custom widgets - advice on where to start?

2010-07-07 Thread James Morris
Hi, I need to create some complex widgets for my program. The first of which is the main widget which will show static rectangles within which other rectangles appear and disappear at musical rates (think fast electronic dance music rates). The static rectangles may overlap each other, but the

Re: custom widgets - advice on where to start?

2010-07-07 Thread Staffan Gimåker
Is there a particular reason that you need a custom widget? Can you not just use a GtkDrawingArea and use Cairo to draw things in it? The official Cairo documentation (the tutorial is here: http://cairographics.org/tutorial/) and the Gtk documentation are probably good places to start. /Staffan

Re: custom widgets - advice on where to start?

2010-07-07 Thread James Morris
On 7 July 2010 17:34, Staffan Gimåker staf...@gimaker.se wrote: Is there a particular reason that you need a custom widget? Can you not just use a GtkDrawingArea and use Cairo to draw things in it? That's the thing I'm unsure of, when to use a GtkDrawingArea and when to use a custom widget.

Re: custom widgets - advice on where to start?

2010-07-07 Thread Staffan Gimåker
On Wed, 2010-07-07 at 22:36 +0100, James Morris wrote: On 7 July 2010 17:34, Staffan Gimåker staf...@gimaker.se wrote: Is there a particular reason that you need a custom widget? Can you not just use a GtkDrawingArea and use Cairo to draw things in it? That's the thing I'm unsure of, when

Re: custom widgets - advice on where to start?

2010-07-07 Thread Tadej Borovšak
Hello. I usually encapsulate my code into custom widgets when: - I need my widget in lots of places - I need my construct to emit signals As long as code is small and relatively clean, I simply use GtkDrawingArea and draw onto it from ::expose-event handler. Tadej -- Tadej Borovšak