Ticket #19 (closed enhancement: fixed)

Opened 8 months ago

Last modified 1 month ago

Inherit/Extend the GtkTreeModel. Or how to do a lazy TreeView?

Reported by: keinfarbton Assigned to: Mike Wey
Priority: major Milestone: RC 1
Component: Wrapper Version: 1.0
Keywords: Cc:

Description

What is a lazy TreeView??
Image you have many records and you don't want to load all into memory. Only that ones that are visible. With the standart GtkListStore/GtkTreeStore? all data must be allocated.

To solve this, a custom store can be used. See http://scentric.net/tutorial/sec-custom-models.html#sec-custom-models-when

ATM gtkD does a one-way wrapping, it makes it possible to call D->gtk. Most of the GTK widgets are not intended to be subclassed, so this is absolutely perfect.

The GtkTreeModel? is different. It is intended to be subclassed, and there are two standard implementations: GtkTreeStore?, GtkListStore?.

See http://scentric.net/tutorial/sec-custom-model-list.html how a custom model is done in C. For gtkD, we would need some mechanism to map the virtual member functions to a D class, which can then be inherited as a normal D class.

In the moment i don't have a concept for this. Thoughts?

Change History

01/02/08 16:56:45 changed by keinfarbton

I remembered, i brought that up some time ago...
http://dsource.org/forums/viewtopic.php?t=1586

07/22/08 13:41:22 changed by Mike Wey

  • owner changed from JJR to Mike Wey.
  • status changed from new to assigned.
  • milestone set to RC 1.

I'll try and see if i can get something working.

07/29/08 16:09:30 changed by Mike Wey

  • status changed from assigned to closed.
  • resolution set to fixed.

svn r546 and r548 add the extendable TreeModel? and an demo that shows how to create an CustomList?.