There is something I don't understand how to do with Gtkmm 3.
I have a custom business type that I have declared like this:
enum class Eurocents : int {};
I would like to render this type into a Gtk::TreeView
which has a Gtk::ListStore
as model. So I declare a Gtk::TreeModelColumn<Eurocents>
, and add it to the model. I then append_column
this model column to the Gtk::TreeView
with an appropriate title.
I then append_row
to the model and set the value corresponding to the column to (Eurocents)100
.
The result I get is that the cell is displayed empty. Understandably so, because I would not expect Gtkmm to know how to render my arbitrary type.
I would like to instruct Gtkmm on how to render my type.
I already know how to display Glib types like Glib::ustring
and formatting to Glib::ustring
for display is possible, but it is not the subject of the question.
Is it possible to code columns that can display arbitrary types like this? And if so, how? What is required for sorting to work?