// // Created by selim on 13.11.22. // #include "SelectionModel.h" namespace gtkpp { SelectionModel::SelectionModel(gtkpp::Selection selection) { const char *array[] = { "one", "two", "three", "four", nullptr }; GtkStringList *sl = gtk_string_list_new ((const char * const *) array); switch (selection) { case None: _model = GTK_SELECTION_MODEL(gtk_no_selection_new(G_LIST_MODEL(sl))); case Single: _model = GTK_SELECTION_MODEL(gtk_single_selection_new(G_LIST_MODEL(sl))); } } GtkSelectionModel *SelectionModel::gobj() const { return _model; } }