/* Copyright (C) 1998-2002 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 <https://www.gnu.org/licenses/>.
 */

_CONFIGINCLUDE(gtkmmconfig.h)

#include <glibmm/interface.h>
#include <gdkmm/event.h>

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

#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
#undef GTK_DISABLE_DEPRECATED
#define GDK_DISABLE_DEPRECATION_WARNINGS 1
#m4 _POP()

//TODO: Do this when we can stop using this as a base class elsewhere, when we break ABI:
//_IS_DEPRECATED // The entire file is deprecated.

#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C"
{
typedef struct _GtkCellEditableIface GtkCellEditableIface;
}
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

namespace Gtk
{

/** Interface for widgets which are used for editing cells.
 * The CellEditable interface must be implemented for widgets to be usable when editing the contents of a TreeView cell.
 *
 * @deprecated 4.10: List views use widgets for displaying their
 *   contents. See Gtk::Editable for editable text widgets.
 */
class GTKMM_API CellEditable : public Glib::Interface
{
  _CLASS_INTERFACE(CellEditable,GtkCellEditable,GTK_CELL_EDITABLE,GtkCellEditableIface, , , GTKMM_API)

public:
  _WRAP_METHOD(void start_editing(const Glib::RefPtr<const Gdk::Event>& event), gtk_cell_editable_start_editing,
    deprecated "See Gtk::Editable for editable text widgets.")
  _WRAP_METHOD(void editing_done(), gtk_cell_editable_editing_done,
    deprecated "See Gtk::Editable for editable text widgets.")
  _WRAP_METHOD(void remove_widget(), gtk_cell_editable_remove_widget,
    deprecated "See Gtk::Editable for editable text widgets.")

  _WRAP_SIGNAL(void editing_done(), "editing_done",
    deprecated "See Gtk::Editable for editable text widgets.")
  _WRAP_SIGNAL(void remove_widget(), "remove_widget",
    deprecated "See Gtk::Editable for editable text widgets.")

  _WRAP_PROPERTY("editing-canceled", bool,
    deprecated "See Gtk::Editable for editable text widgets.")

protected:
#m4 _CONVERSION(`GdkEvent*',`const Glib::RefPtr<const Gdk::Event>&',`Glib::wrap($3, true)')
  _WRAP_VFUNC(void start_editing(const Glib::RefPtr<const Gdk::Event>& event), start_editing)
};

} // namespace Gtk
