FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do I derive a class from gtk.Container ?

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
gc1



Joined: 18 Feb 2010
Posts: 7

PostPosted: Thu Mar 04, 2010 5:54 am    Post subject: How do I derive a class from gtk.Container ? Reply with quote

If I want to derive a class from gtk.Container how should I allocate the GtkContainer structure to pass to the constructor of gtk.Container ?

gtktypes.d defines the GtkContainer structure as empty so it's contents are presumably private.

Other derived types have allocators in the C library code (e.g. gtk_hbox_new, gtk_vbox_new, gtk_table_new etc.)

Is there an example anywhere of how to allocate one of the items described as "Main Gtk struct" and/or register a new variant thereof ?
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Thu Mar 04, 2010 3:27 pm    Post subject: Reply with quote

To inherit from the container you would need a the correct struct, as for how you could look at: http://www.dsource.org/projects/gtkd/browser/trunk/src/gtk/TreeModel.d
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group