[maemo-developers] Gtkmm's DrawingArea problem
From: Dinh Khac Thanh thanhdk at gmail.comDate: Mon Jun 2 05:21:23 EEST 2008
- Previous message: openafs-1.4.7-2 package uploaded to extras two weeks ago, but not on the web
- Next message: [gtkmm] Gdk::Pixbuf::create_from_file() segmentation fault in maemo
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, Thank you for your advice. Everything works fine now. Regards On Sat, May 31, 2008 at 4:03 PM, Murray Cumming <murrayc at murrayc.com> wrote: > On Fri, 2008-05-30 at 14:19 +0800, Dinh Khac Thanh wrote: > > Hi all, > > > > I wrote a simple program using gtkmm's DrawingArea widget. It turns > > out fine (no error) but does not show up in Xephys window. After > > searching Google I got this: > [snip] > > > > Yes, the version of gtkmm that is in the maemo repository uses some > > > > > > special optimizations. The most obvious change is that there are no > > > > default signal handlers, so you must connect a signal handler instead > of > > > > just overriding the default one. > > which I think is my problem (I check on_expose_event and it is not > > called). But I couldn't find the solution from that link. > > Could anyone tell me how to solve this? Thnx in advance. > > You just need to add this code in your constructor: > > #ifndef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED > //Connect the signal handler if it isn't already a virtual method > override: > signal_expose_event().connect(sigc::mem_fun(*this, > &Clock::on_expose_event), false); > #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED > > I am adding that to the clock example in the gtkmm book (in the > gtkmm-documentation module): > > http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-drawing-clock-example.html > > > Btw, anyone has experiences on using Gnome Canvas in maemo? I am > > thinking of switching to Gnome Canvas since using Drawing Area/Gdk's > > Pixmap is a pain to me. > > I recommend that you use goocanvas. libgnomecanvas is not really > maintained now, and people generally avoid using it. goocanvamm exists, > though I haven't yet used it on Maemo. > > > Do try to use the gtkmm-list mailing list for questions about gtkmm. You > were lucky that I saw your message on maemo-developers. > > -- > Murray Cumming > murrayc at murrayc.com > www.murrayc.com > www.openismus.com > > -- Dinh Khac Thanh Computer Engineering student National University of Singapore -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20080602/39ef272c/attachment.htm
- Previous message: openafs-1.4.7-2 package uploaded to extras two weeks ago, but not on the web
- Next message: [gtkmm] Gdk::Pixbuf::create_from_file() segmentation fault in maemo
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]