Programmatically create ui xml

is there a way to programmatically create ui xml? for example if i have a gtkwindow (gtk_window_new… gtk_window_set_title… etc) can i convert it to xml to use with gtkbuilder?

in practice the opposite of what gtkbuilder/gtkbuildable do

i tried to understand if i can use gladeui api… but i didn’t understand how to create a gladewidget from a gtkwidget

thanks in advance

No, there isn’t. Widgets can deserialise XML, but they don’t have any support for serialising their state, so it’s not possible to traverse a GTK widget tree and generate XML except in the most simple of cases. Any conversion that goes above simple property definitions—e.g. anything that involves menu items, actions, accessible objects, tree models, accelerators, etc.—would be lossy.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.