On 22 January 2017 at 14:17, Bill William <wm2015em...@gmail.com> wrote:

>
> (Afterthoughts: I was wondering if C++ has a way to implicitly convert
> from one class type, example a composite widget type, to another class,
> example Gtk:Widget&, simply by placing the class object in the context of
> needing a different class type, example Gtk::Widgets?  I was doing this
> above using functor operator.  So far I can only find examples of doing
> this with built in variable types like int or char*.)
>
>
Of course. Use a conversion operator.


operator Gtk::Widget&()
{
   return m_whatever_widget;
}
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to