Re: Creating custom GTK+ widget using C++ -- Ctor/Dtor not called
- From: Igor Chetverovod <chetverovod gmail com>
- To: Paul Davis <paul linuxaudiosystems com>
- Cc: Agnel Kurian <agnel kurian gmail com>, gtk-list gnome org
- Subject: Re: Creating custom GTK+ widget using C++ -- Ctor/Dtor not called
- Date: Fri, 10 Feb 2012 10:54:47 +0400
Paul,
GTK+ widget is not a c++ class, it is a C structure. If you want
to create custom widget, you should define it structure for it and
some mandatory functions. Read manuals about this, for example:
http://zetcode.com/tutorials/cairographicstutorial/customgtkwidget/
If you need just to add several data field into the widget you can use
functions g_object_set_data, g_object_get_data.
Best regards,
Igor
2012/2/10, Paul Davis <paul linuxaudiosystems com>:
> On Thu, Feb 9, 2012 at 4:28 PM, Agnel Kurian <agnel kurian gmail com> wrote:
>> Hi,
>>
>> I am trying to create a custom GTK+ widget using GTK+ 2.4.8 called from
>> C++.
>> I find that the constructor and destructor of my widget is never called.
>> So...
>>
>> 1. Is this expected behaviour?
>> 2. What is the usual solution to such a problem (apart from using gtkmm)?
>
> that is the usual solution. you're wasting your time trying to solve
> this in any other way.
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]