/* Copyright (C) 2026 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/>.
 */

_CONFIGINCLUDE(gtkmmconfig.h)

#include <glibmm/object.h>
#include <gtk/gtk.h>

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

namespace Gtk
{
/** %Gtk::EnumListItem is the type of items in a Gtk::EnumList.
 *
 * How to get an %EnumListItem from an %EnumList:
 *
 * @code
 * Glib::RefPtr<Gtk::EnumList<T>> enum_list = Gtk::EnumList<T>::create();
 * Glib::RefPtr<Gtk::EnumListItem> item = enum_list->get_item(position);
 * if (!item)
 *   on_error();
 * @endcode 
 *
 * @see Gtk::EnumList
 * @ingroup ListView
 * @newin{4,24}
 */
class GTKMM_API EnumListItem : public Glib::Object
{
  _CLASS_GOBJECT(EnumListItem, GtkEnumListItem, GTK_ENUM_LIST_ITEM, Glib::Object, GObject, , , GTKMM_API)
  _DO_NOT_DERIVE_GTYPE dnl// GtkEnumListItem is a final type
  _STRUCT_NOT_HIDDEN

public:
  _WRAP_METHOD(int get_value() const, gtk_enum_list_item_get_value)
  _WRAP_METHOD(Glib::ustring get_name() const, gtk_enum_list_item_get_name)
  _WRAP_METHOD(Glib::ustring get_nick() const, gtk_enum_list_item_get_nick)

  _WRAP_PROPERTY("value", int)
  _WRAP_PROPERTY("name", Glib::ustring)
  _WRAP_PROPERTY("nick", Glib::ustring)
};

} // namespace Gtk
