/* Copyright (C) 1998-2006 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, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */


#include <goocanvasmm/groupmodel.h>
#include <gtkmm/enums.h>

_DEFS(goocanvasmm,libgoocanvas)

namespace Goocanvas
{

class TableModel : public Goocanvas::GroupModel
{
  _CLASS_GOBJECT(TableModel, GooCanvasTableModel, GOO_CANVAS_TABLE_MODEL, Goocanvas::GroupModel, GooCanvasGroupModel)
protected:
  _CTOR_DEFAULT()
  _IGNORE(goo_canvas_table_model_new)

public:

  _WRAP_CREATE()

  void attach(const Glib::RefPtr<ItemModel>& item, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach, Gtk::AttachOptions xoptions = Gtk::FILL | Gtk::EXPAND, Gtk::AttachOptions yoptions = Gtk::FILL | Gtk::EXPAND, double left_padding = 0.0, double right_padding = 0.0, double top_padding = 0.0, double bottom_padding = 0.0);

  void set_align(const Glib::RefPtr<ItemModel>& child, double xalign = 0.0, double yalign = 0.0);
  void set_align(const Glib::RefPtr<ItemModel>& child, Gtk::Align xalign = Gtk::ALIGN_START, Gtk::Align yalign = Gtk::ALIGN_START);

  //We put these in item.hg instead.
  //See the comment there.
  //_WRAP_PROPERTY("x", double)
  //_WRAP_PROPERTY("y", double)
  //_WRAP_PROPERTY("width", double)
  //_WRAP_PROPERTY("height", double)
  _WRAP_PROPERTY("row-spacing", double)
  _WRAP_PROPERTY("column-spacing", double)
  _WRAP_PROPERTY("homogeneous-rows", bool)
  _WRAP_PROPERTY("homogeneous-columns", bool)
  _WRAP_PROPERTY("x-border-spacing", double)
  _WRAP_PROPERTY("y-border-spacing", double)
  _WRAP_PROPERTY("vert-grid-line-width", double)
  _WRAP_PROPERTY("horz-grid-line-width", double)
};

} //namespace Goocanvas

