// Generated by gmmproc 2.46.1 -- DO NOT MODIFY!


#include <glibmm.h>

#include <goocanvasmm/text.h>
#include <goocanvasmm/private/text_p.h>


/* 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 <iostream>
#include <goocanvastext.h>


namespace Goocanvas
{

Text::Text(const Glib::ustring& text, double x, double y, double width, AnchorType anchor)
: 
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(0),
  Goocanvas::ItemSimple(Glib::ConstructParams(text_class_.init(), "text",text.c_str(),"x",x,"y",y,"width",width,"anchor",(GooCanvasAnchorType)anchor, static_cast<char*>(0)))
{
}

} //namespace Goocanvas


namespace
{
} // anonymous namespace


namespace Glib
{

Glib::RefPtr<Goocanvas::Text> wrap(GooCanvasText* object, bool take_copy)
{
  return Glib::RefPtr<Goocanvas::Text>( dynamic_cast<Goocanvas::Text*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
  //We use dynamic_cast<> in case of multiple inheritance.
}

} /* namespace Glib */


namespace Goocanvas
{


/* The *_Class implementation: */

const Glib::Class& Text_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Class has to know the class init function to clone custom types.
    class_init_func_ = &Text_Class::class_init_function;

    // This is actually just optimized away, apparently with no harm.
    // Make sure that the parent type has been created.
    //CppClassParent::CppObjectType::get_type();

    // Create the wrapper type, with the same class/instance size as the base type.
    register_derived_type(goo_canvas_text_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:

  }

  return *this;
}


void Text_Class::class_init_function(void* g_class, void* class_data)
{
  const auto klass = static_cast<BaseClassType*>(g_class);
  CppClassParent::class_init_function(klass, class_data);


}


Glib::ObjectBase* Text_Class::wrap_new(GObject* object)
{
  return new Text((GooCanvasText*)object);
}


/* The implementation: */

GooCanvasText* Text::gobj_copy()
{
  reference();
  return gobj();
}

Text::Text(const Glib::ConstructParams& construct_params)
:
  Goocanvas::ItemSimple(construct_params)
{

}

Text::Text(GooCanvasText* castitem)
:
  Goocanvas::ItemSimple((GooCanvasItemSimple*)(castitem))
{}


Text::Text(Text&& src) noexcept
: Goocanvas::ItemSimple(std::move(src))
{}

Text& Text::operator=(Text&& src) noexcept
{
  Goocanvas::ItemSimple::operator=(std::move(src));
  return *this;
}

Text::~Text() noexcept
{}


Text::CppClassType Text::text_class_; // initialize static member

GType Text::get_type()
{
  return text_class_.init().get_type();
}


GType Text::get_base_type()
{
  return goo_canvas_text_get_type();
}


Glib::RefPtr<Text> Text::create(const Glib::ustring& text, double x, double y, double width, AnchorType anchor)
{
  return Glib::RefPtr<Text>( new Text(text, x, y, width, anchor) );
}

void Text::get_natural_extents(Pango::Rectangle& ink_rect, Pango::Rectangle& logical_rect) const
{
  goo_canvas_text_get_natural_extents(const_cast<GooCanvasText*>(gobj()), (ink_rect).gobj(), (logical_rect).gobj());
}


Glib::PropertyProxy< Pango::Alignment > Text::property_alignment() 
{
  return Glib::PropertyProxy< Pango::Alignment >(this, "alignment");
}

Glib::PropertyProxy_ReadOnly< Pango::Alignment > Text::property_alignment() const
{
  return Glib::PropertyProxy_ReadOnly< Pango::Alignment >(this, "alignment");
}

Glib::PropertyProxy< AnchorType > Text::property_anchor() 
{
  return Glib::PropertyProxy< AnchorType >(this, "anchor");
}

Glib::PropertyProxy_ReadOnly< AnchorType > Text::property_anchor() const
{
  return Glib::PropertyProxy_ReadOnly< AnchorType >(this, "anchor");
}

Glib::PropertyProxy< Pango::EllipsizeMode > Text::property_ellipsize() 
{
  return Glib::PropertyProxy< Pango::EllipsizeMode >(this, "ellipsize");
}

Glib::PropertyProxy_ReadOnly< Pango::EllipsizeMode > Text::property_ellipsize() const
{
  return Glib::PropertyProxy_ReadOnly< Pango::EllipsizeMode >(this, "ellipsize");
}

Glib::PropertyProxy< Glib::ustring > Text::property_text() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "text");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > Text::property_text() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "text");
}

Glib::PropertyProxy< bool > Text::property_use_markup() 
{
  return Glib::PropertyProxy< bool >(this, "use-markup");
}

Glib::PropertyProxy_ReadOnly< bool > Text::property_use_markup() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "use-markup");
}

Glib::PropertyProxy< Pango::WrapMode > Text::property_wrap() 
{
  return Glib::PropertyProxy< Pango::WrapMode >(this, "wrap");
}

Glib::PropertyProxy_ReadOnly< Pango::WrapMode > Text::property_wrap() const
{
  return Glib::PropertyProxy_ReadOnly< Pango::WrapMode >(this, "wrap");
}


} // namespace Goocanvas


