On 04-07-18 16:30, Paulie Saint wrote:
With gtk.Builder I can do
auto mainWindow = cast(ApplicationWindow)builder.getObject("mainWindow");
But if I want to to make a derived classMainWindow : ApplicationWindow
how could I use it with gtk.Builder? I understand that the native gtk way of doing this is with Composite Widget Templates but I don't see anything on the gtkD docs.
Thanks.
We don't have anything implemented to support that, the best you can do
today with gtkd is to do this in the constructor of MainWindow:
super(cast(GtkApplicationWindow*)gtk_builder_get_object(builder.getBuilderStruct(),"mainwindow"));