문제

I am trying to implement own TreeModel for use in TreeView.

I have subclassed Gtk::TreeModel and currently trying to override virtual methods with my own implementation.

But i have a problem with very basics of it. Say, we have

virtual bool iter_next_vfunc(const iterator &iter, iterator &iter_next) const;

function where i am supposed to read iter variable, somehow understand where it points to and based on this, fill iter_next with point next to the current.

But i do not understand how to do this.

What is 'index', 'pointer' or whatever based on what i could understand where iter is pointing to?

도움이 되었습니까?

해결책

Directly access the underlying GtkTreeIter struct through gobj(), and fill it with the relevant data ('stamp' should be the same across all iters of the same model). (Reference)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top