Re: gtkmm-list Digest, Vol 166, Issue 16

Hi Jens,

On 24/02/18 13:00, Jens Krause <je krause bluewin ch> wrote:

I understand that one can implement custom TreeModels (to replace
Gtk::ListStore and Gtk::TreeStore). Can this be done by deriving
from Gtk::TreeModel? Do you have a tutorial on this subject.
What would be the skeleton of such a derived class?

class myModel : public ?Gtk::TreeModel{?

 Gtk::TreeModelFlags?	get_flags_vfunc () const;

//.... and other vfuncs


Thanks for any hints.



Maybe, this example can help you:

Have a look at the treeview.cpp and the col_model.cpp

You can find another example in the gtkmm tutorial:

BTW, it'll not build succesfully in debian or devuan jessie (or derivatives) due to the version of g++, getting the following errors:

simple-netaid-gtk/include/passwd_dialog.h:32:8: error: ‘thread’ in namespace ‘std’ does not name a type
   std::thread *m_WorkerThread;
window_main_worker.h:44:16: error: ‘mutex’ in namespace ‘std’ does not name a type
   mutable std::mutex m_Mutex;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]