Re: Subclass Gtk::TreeModel

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Subclass Gtk::TreeModel

Jens Krause
Hallo Aitor

it took a while answer. 

In your example you derive Gtk::TreeView but you use
plain Gtk::ListStore. 

I would like to build my own storage class and therefore
derive from Gtk::TreeModel.

Regards

Jens

> > Hi,
> >
> > 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{?
> >
> > public:
> >    Gtk::TreeModelFlags? get_flags_vfunc () const;
> >
> > //.... and other vfuncs
> >
> > };
> >
> > Thanks for any hints.
> >
> > Regards
> >
> > Jens
>
> Maybe, this example can help you:
>
> https://git.devuan.org/aitor_czr/simple-netaid-gtk/tree/master/
>
> Have a look at the treeview.cpp and the col_model.cpp
>
> You can find another example in the gtkmm tutorial:
>
> https://developer.gnome.org/gtkmm-tutorial/stable/sec-treeview-exampl

es.html.en
>
> 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;
> [...]
>
> HTH,
>
>   ? Aitor.
_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Reply | Threaded
Open this post in threaded view
|

Re: Subclass Gtk::TreeModel

aitor_czr

Hi Jens,

On 05/04/18 14:00, Jens Krause [hidden email] wrote:
Hallo Aitor

it took a while answer.?

In your example you derive Gtk::TreeView but you use
plain Gtk::ListStore.?

I would like to build my own storage class and therefore
derive from Gtk::TreeModel.

Regards

Jens

Thanks for your attention, i'm a bit busy these days. I'm trying to finish my .deb repo of gnuinos jessie:

http://packages.gnuinos.org/

I hope to finish it in a few days. After that, i'll concentrate my energies on ascii (the analogous to debian 9 stretch). Most of my gtk projects are focused to ascii due to the higher version of gtkmm.

I'll be back shortly in this thread...

Have a nice day :)

  Aitor.



_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list