/* Copyright (C) 2019 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glibmm/object.h>
#include <glibmm/refptr.h>
#include <giomm/listmodel.h>
#include <gtkmm/selectionmodel.h>
#include <gtk/gtk.h> // Declares GtkNoSelection and GtkNoSelectionClass

_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)

namespace Gtk
{
/** A selection model that does not allow selecting anything.
 *
 * %Gtk::NoSelection is an implementation of the Gtk::SelectionModel interface 
 * that does not allow selecting anything.
 *
 * This model is meant to be used as a simple wrapper to Gio::ListModels when a
 * Gtk::SelectionModel is required.
 *
 * @see SelectionModel
 * @newin{3,96}
 */
class NoSelection : public Glib::Object, public Gio::ListModel, public SelectionModel
{
  _CLASS_GOBJECT(NoSelection, GtkNoSelection, GTK_NO_SELECTION, Glib::Object, GObject)
  _IMPLEMENTS_INTERFACE(Gio::ListModel)
  _IMPLEMENTS_INTERFACE(SelectionModel)
  _STRUCT_NOT_HIDDEN

protected:
  _CTOR_DEFAULT()
  _WRAP_CTOR(NoSelection(const Glib::RefPtr<Gio::ListModel>& model), gtk_no_selection_new)

public:
  _WRAP_CREATE()
  _WRAP_CREATE(const Glib::RefPtr<Gio::ListModel>& model)

  _WRAP_METHOD(Glib::RefPtr<Gio::ListModel> get_model(), gtk_no_selection_get_model, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const Gio::ListModel> get_model() const, gtk_no_selection_get_model, refreturn, constversion)

  _WRAP_PROPERTY("model", Glib::RefPtr<Gio::ListModel>)

  // There are no signals or vfuncs.
};

} // namespace Gtk
