On Sat, 20 Apr 2019 15:28:29 +0200, Mike Wey wrote:
I D / GtkD we implement the CellLayout interface as a actual D
interface, the functions that are part of the interface are mixed in to
the class using a mixin template. This creates a problem for the
TreeViewColumn as the functions are now defined more than once for the
same class. So we purposely skip the functions for the TreeViewColumn as
the ones from the interface will do the same.
The difference between addAttributes and setAttributes is that
addAttributes allows you to set a single attribute, and setAttributes
will allow you to set more than one attribute with a single function call.
Only setAttributes is a variadic function and for now i don't know of a
good way to wrap them automatically, so they will have to be implemented
by hand, and thats why most of them are missing on the GtkD side.
Ah! That explains it. Just curious... would it not have worked to do something like was done for ListStore with setValue() and set() wherein the latter uses arrays of columns and values? Or is that more a question for the Gnome guys? :)
The function definitions in */c/functions.d are there so GtkD can
actually call the GTK functions it's wrapping. Of course you can also
call them yourself if needed.
Good to know. I was thinking that might be the case, but wasn't feeling brave enough to just jump in.
For a GtkD example of a TreeViewColumn with more that one attribute see:
Excellent! Thank you.