Re: custom DrawingArea and glade



On Thu, Aug 21, 2008 at 9:40 AM, Damon Register <damon w register lmco com> wrote:

DrawingArea in Glade and somehow tie what I get from get_widget
to my instance of the Clock class?


Your new best friend: get_widget_derived [1].

Apologies if those docs are out of date but its exactly what you need.  In glade, just put a DrawingArea where you want it.  In code, derive from DrawingArea, add the constructor form the link talks about, and use get_widget_derived to (essentially) cast the drawingarea in glade to your derived drawing area.

it's extremely powerful.  have fun!
dave

[1] http://www.gtkmm.org/gnomemm2/reference/html/classGnome_1_1Glade_1_1Xml.html#8e9be00bb530ef24ee4a01cfe95d4a37




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]