/* 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/itemsimple.h>
#include <gtkmm/enums.h> /* For AnchorType. */
#include <pangomm/rectangle.h>
#include <pangomm/layout.h> //For Pango::Alignment

_DEFS(goocanvasmm,libgoocanvas)
_PINCLUDE(glibmm/private/object_p.h)

namespace Goocanvas
{

class Text : public Goocanvas::ItemSimple
{
  _CLASS_GOBJECT(Text,GooCanvasText,GOO_CANVAS_TEXT,Goocanvas::ItemSimple,GooCanvasItemSimple)
protected:

  explicit Text(const Glib::ustring& text = Glib::ustring(), double x = 0.0, double y = 0.0, double width = -1, AnchorType anchor = ANCHOR_NORTH_WEST);
  _IGNORE(goo_canvas_text_new)

public:

  _WRAP_CREATE(const Glib::ustring& text = Glib::ustring(), double x = 0.0, double y = 0.0, double width = 0.0, AnchorType anchor = ANCHOR_NORTH_WEST)

#m4 _CONVERSION(`Pango::Rectangle&',`PangoRectangle*',`($3).gobj()')
  _WRAP_METHOD(void get_natural_extents(Pango::Rectangle& ink_rect, Pango::Rectangle& logical_rect) const, goo_canvas_text_get_natural_extents)

  //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("alignment", Pango::Alignment)
  _WRAP_PROPERTY("anchor", AnchorType)
  _WRAP_PROPERTY("ellipsize",Pango::EllipsizeMode)
  _WRAP_PROPERTY("text", Glib::ustring)
  _WRAP_PROPERTY("use-markup", bool)
  _WRAP_PROPERTY("wrap", Pango::WrapMode)
};

} //namespace Goocanvas

