1

I simply tried this.

GtkWidget* oldwnd = new GtkWidget();
Gtk::Widget wnd(*oldwnd);

But it does not compile.

Can anybody tell me how to type cast the types in gtk+ to the corresponding types in gtkmm?

0

1 Answer 1

2

Perhaps Gtk::Widget* wnd = Glib::wrap(oldwnd)?

documentation says

Gtk::Widget* wrap (GtkWidget* object, bool take_copy=false);
Sign up to request clarification or add additional context in comments.

1 Comment

Furthermore, this part of your example makes no sense because you should use a gtk__new() function to instantiate a GTK+ type: GtkWidget oldwnd = new GtkWidget();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.