/* Copyright (C) 2023 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 <gtkmm/listitem.h>

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

namespace Gtk
{
 /** %Gtk::ColumnViewRow is used by Gtk::ColumnView to allow configuring
 * how rows are displayed.
 *
 * It is not used to set the widgets displayed in the individual cells. For that
 * see Gtk::ColumnViewColumn::set_factory() and Gtk::ColumnViewCell.
 *
 * @newin{4,12}
 */
class GTKMM_API ColumnViewRow : public Glib::Object
{
  _CLASS_GOBJECT(ColumnViewRow, GtkColumnViewRow, GTK_COLUMN_VIEW_ROW, Glib::Object, GObject, , , GTKMM_API)
  _DO_NOT_DERIVE_GTYPE dnl// GtkColumnViewRow is an internal type

public:
  // Don't use Glib::RefPtr<Glib::Object> Glib::wrap(GObject* object, bool take_copy).
  // The object may be an interface object, e.g. Gio::AppInfo. Such an object can't be
  // cast to Glib::Object. https://gitlab.gnome.org/GNOME/glibmm/-/issues/93
#m4 _CONVERSION(`gpointer',`Glib::RefPtr<Glib::ObjectBase>',`Glib::make_refptr_for_instance<Glib::ObjectBase>(Glib::wrap_auto(G_OBJECT($3)))')
  _WRAP_METHOD(Glib::RefPtr<Glib::ObjectBase> get_item(), gtk_column_view_row_get_item, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const Glib::ObjectBase> get_item() const, gtk_column_view_row_get_item, refreturn, constversion)
  _WRAP_METHOD(guint get_position() const, gtk_column_view_row_get_position)
  _WRAP_METHOD(bool get_selected() const, gtk_column_view_row_get_selected)
  _WRAP_METHOD(bool get_selectable() const, gtk_column_view_row_get_selectable)
  _WRAP_METHOD(void set_selectable(bool selectable = true), gtk_column_view_row_set_selectable)
  _WRAP_METHOD(bool get_activatable() const, gtk_column_view_row_get_activatable)
  _WRAP_METHOD(void set_activatable(bool activatable = true), gtk_column_view_row_set_activatable)
  _WRAP_METHOD(bool get_focusable() const, gtk_column_view_row_get_focusable)
  _WRAP_METHOD(void set_focusable(bool focusable = true), gtk_column_view_row_set_focusable)
  _WRAP_METHOD(Glib::ustring get_accessible_description() const, gtk_column_view_row_get_accessible_description)
  _WRAP_METHOD(void gtk_set_accessible_description(const Glib::ustring& description), gtk_column_view_row_set_accessible_description)
  _WRAP_METHOD(Glib::ustring get_accessible_label() const, gtk_column_view_row_get_accessible_label)
  _WRAP_METHOD(void gtk_set_accessible_label(const Glib::ustring& label), gtk_column_view_row_set_accessible_label)

  _WRAP_PROPERTY("accessible-description", Glib::ustring)
  _WRAP_PROPERTY("accessible-label", Glib::ustring)
  _WRAP_PROPERTY("activatable", bool)
  _WRAP_PROPERTY("focusable", bool)
  _WRAP_PROPERTY("item", Glib::RefPtr<Glib::ObjectBase>)
  _WRAP_PROPERTY("position", guint)
  _WRAP_PROPERTY("selectable", bool)
  _WRAP_PROPERTY("selected", bool)
};

} // namespace Gtk
