// Generated by gtkmmproc -- DO NOT MODIFY!


#include <libvtemm/charattributes.h>
#include <libvtemm/private/charattributes_p.h>

/* charattributes.cc
 *
 * Copyright (C) 2008, 2009 libvtemm Development Team
 *
 * This file is part of libvtemm.
 *
 * libvtemm is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * libvtemm 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 Public License for more details.
 *
 * You should have received a copy of the GNU Lesser Public License
 * along with libvtemm.  If not, see <http://www.gnu.org/licenses/>.
 */

namespace Gnome
{

namespace Vte
{

CharAttributes::CharAttributes()
: gobject_(0)
{
}

CharAttributes::CharAttributes(const CharAttributes& src)
{
  if (!src.gobject_)
  {
    gobject_ = 0;
  }
  else
  {
    gobject_ = new VteCharAttributes(*(src.gobj()));
  }
}

CharAttributes::CharAttributes(VteCharAttributes* castitem, bool take_copy)
{
  if (take_copy)
  {
    gobject_ = new VteCharAttributes(*castitem);
  }
  else
  {
    gobject_ = castitem;
  }
}

CharAttributes::~CharAttributes()
{
  if (gobject_)
  {
    delete gobject_;
    gobject_ = 0;
  }
}

CharAttributes& CharAttributes::operator=(const CharAttributes& src)
{
  if (&src != this)
  {
    if (gobject_)
    {
      delete gobject_;
    }
    gobject_ = new VteCharAttributes(*(src.gobj()));
  }
  return *this;
}

} // namespace Vte

} // namespace Gnome

namespace Glib
{

Gnome::Vte::CharAttributes wrap(VteCharAttributes* object, bool take_copy)
{
  return Gnome::Vte::CharAttributes(object, take_copy);
}

} // namespace Glib

namespace
{
} // anonymous namespace


namespace Gnome
{

namespace Vte
{


 long CharAttributes::get_row() const
{
  return gobj()->row;
}
 
 long CharAttributes::get_column() const
{
  return gobj()->column;
}
 
 Gdk::Color CharAttributes::get_fore() const
{
  return Gdk::Color(const_cast<GdkColor*>(&(gobj()->fore)), true);
}
 
 Gdk::Color CharAttributes::get_back() const
{
  return Gdk::Color(const_cast<GdkColor*>(&(gobj()->back)), true);
}
 
 bool CharAttributes::get_underline() const
{
  return gobj()->underline;
}
 
 bool CharAttributes::get_strikethrough() const
{
  return gobj()->strikethrough;
}
 

} // namespace Vte

} // namespace Gnome


