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

_DEFS(gtkmm,gtk)
_CONFIGINCLUDE(gtkmmconfig.h)
_IS_DEPRECATED // The entire file is deprecated.

#include <gtkmm/cellarea.h>
#include <gtkmm/orientable.h>

_PINCLUDE(gtkmm/private/cellarea_p.h)

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

namespace Gtk
{

/** A cell area that renders CellRenderers into a row or a colum, depending on its orientation.
 *
 * This class uses a notion of packing. Packing
 * refers to adding cell renderers with reference to a particular position
 * in a CellAreaBox. There are two reference positions: the
 * start and the end of the box.
 * When the CellAreaBox is oriented in the Gtk::Orientation::VERTICAL
 * orientation, the start is defined as the top of the box and the end is
 * defined as the bottom. In the  Gtk::Orientation::HORIZONTAL orientation
 * start is defined as the left side and the end is defined as the right
 * side.
 *
 * Alignments of CellRenderers rendered in adjacent rows can be
 * configured by configuring the align_child cell property
 * with CellArea::cell_set_property() or by specifying the "align"
 * argument to pack_start() or pack_end().
 *
 * @newin{3,0}
 * @deprecated 4.10: List views use widgets for displaying their contents.
 */
class GTKMM_API CellAreaBox
  : public Gtk::CellArea,
    public Orientable
{
  _CLASS_GOBJECT(CellAreaBox, GtkCellAreaBox, GTK_CELL_AREA_BOX, CellArea, GtkCellArea, , , GTKMM_API)
  _IMPLEMENTS_INTERFACE(Orientable)

protected:
  _CTOR_DEFAULT
public:
  _WRAP_CREATE()
  _IGNORE(gtk_cell_area_box_new)

  // The default values of expand, align and fixed are the default values of
  // CELL_PROP_[EXPAND,ALIGN,FIXED_SIZE] in gtkcellareabox.c.
  _WRAP_METHOD(void pack_start(CellRenderer& renderer, bool expand = false, bool align = false, bool fixed = true), gtk_cell_area_box_pack_start)
  _WRAP_METHOD(void pack_end(CellRenderer& renderer, bool expand = false, bool align = false, bool fixed = true), gtk_cell_area_box_pack_end)
  _WRAP_METHOD(int get_spacing() const, gtk_cell_area_box_get_spacing)
  _WRAP_METHOD(void set_spacing(int spacing), gtk_cell_area_box_set_spacing)

  _WRAP_PROPERTY("spacing", int)
};

} // namespace Gtk
