// Generated by gtkmmproc -- DO NOT MODIFY!


#include <gtkmm/statusicon.h>
#include <gtkmm/private/statusicon_p.h>

// -*- c++ -*-
/* $Id: statusicon.ccg,v 1.2 2006/04/25 05:37:47 murrayc Exp $ */

/* Copyright 2005 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtk/gtkstatusicon.h>


namespace Gtk
{

Glib::RefPtr<StatusIcon> StatusIcon::create_from_file(const std::string& filename)
{
  Glib::RefPtr<StatusIcon> status_icon( new StatusIcon() );
  status_icon->set_from_file(filename);
  return status_icon;
}


} // namespace Gtk


namespace
{
} // anonymous namespace


namespace Glib
{

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

} /* namespace Glib */


namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& StatusIcon_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_ = &StatusIcon_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(gtk_status_icon_get_type());

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

  return *this;
}

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

#ifdef GLIBMM_VFUNCS_ENABLED
#endif //GLIBMM_VFUNCS_ENABLED
}

#ifdef GLIBMM_VFUNCS_ENABLED
#endif //GLIBMM_VFUNCS_ENABLED


Glib::ObjectBase* StatusIcon_Class::wrap_new(GObject* object)
{
  return new StatusIcon((GtkStatusIcon*)object);
}


/* The implementation: */

GtkStatusIcon* StatusIcon::gobj_copy()
{
  reference();
  return gobj();
}

StatusIcon::StatusIcon(const Glib::ConstructParams& construct_params)
:
  Glib::Object(construct_params)
{}

StatusIcon::StatusIcon(GtkStatusIcon* castitem)
:
  Glib::Object((GObject*)(castitem))
{}

StatusIcon::~StatusIcon()
{}


StatusIcon::CppClassType StatusIcon::statusicon_class_; // initialize static member

GType StatusIcon::get_type()
{
  return statusicon_class_.init().get_type();
}

GType StatusIcon::get_base_type()
{
  return gtk_status_icon_get_type();
}


StatusIcon::StatusIcon()
:
  Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
  Glib::Object(Glib::ConstructParams(statusicon_class_.init()))
{
  }

StatusIcon::StatusIcon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
:
  Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
  Glib::Object(Glib::ConstructParams(statusicon_class_.init(), "pixbuf", Glib::unwrap(pixbuf), (char*) 0))
{
  }

StatusIcon::StatusIcon(const StockID& stock)
:
  Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
  Glib::Object(Glib::ConstructParams(statusicon_class_.init(), "stock", (stock).get_c_str(), (char*) 0))
{
  }

StatusIcon::StatusIcon(const Glib::ustring& icon_name)
:
  Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
  Glib::Object(Glib::ConstructParams(statusicon_class_.init(), "icon_name", icon_name.c_str(), (char*) 0))
{
  }

Glib::RefPtr<StatusIcon> StatusIcon::create(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
{
  return Glib::RefPtr<StatusIcon>( new StatusIcon(pixbuf) );
}
Glib::RefPtr<StatusIcon> StatusIcon::create(const StockID& stock_id)
{
  return Glib::RefPtr<StatusIcon>( new StatusIcon(stock_id) );
}
Glib::RefPtr<StatusIcon> StatusIcon::create(const Glib::ustring& icon_name)
{
  return Glib::RefPtr<StatusIcon>( new StatusIcon(icon_name) );
}
void StatusIcon::set(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
{
gtk_status_icon_set_from_pixbuf(gobj(), Glib::unwrap(pixbuf)); 
}

void StatusIcon::set_from_file(const Glib::ustring& filename)
{
gtk_status_icon_set_from_file(gobj(), filename.c_str()); 
}

void StatusIcon::set(const StockID& stock_id)
{
gtk_status_icon_set_from_stock(gobj(), (stock_id).get_c_str()); 
}

void StatusIcon::set(const Glib::ustring& icon_name)
{
gtk_status_icon_set_from_icon_name(gobj(), icon_name.c_str()); 
}

ImageType StatusIcon::get_storage_type() const
{
  return ((ImageType)(gtk_status_icon_get_storage_type(const_cast<GtkStatusIcon*>(gobj()))));
}

Glib::RefPtr<Gdk::Pixbuf> StatusIcon::get_pixbuf()
{
  return Glib::wrap(gtk_status_icon_get_pixbuf(gobj()));
}

Glib::RefPtr<const Gdk::Pixbuf> StatusIcon::get_pixbuf() const
{
  return const_cast<StatusIcon*>(this)->get_pixbuf();
}

StockID StatusIcon::get_stock() const
{
  return StockID(gtk_status_icon_get_stock(const_cast<GtkStatusIcon*>(gobj())));
}

Glib::ustring StatusIcon::get_icon_name() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_status_icon_get_icon_name(const_cast<GtkStatusIcon*>(gobj())));
}

int StatusIcon::get_size() const
{
  return gtk_status_icon_get_size(const_cast<GtkStatusIcon*>(gobj()));
}

void StatusIcon::set_tooltip(const Glib::ustring& tooltip_text)
{
gtk_status_icon_set_tooltip(gobj(), tooltip_text.c_str()); 
}

void StatusIcon::set_visible(bool visible)
{
gtk_status_icon_set_visible(gobj(), static_cast<int>(visible)); 
}

bool StatusIcon::get_visible() const
{
  return gtk_status_icon_get_visible(const_cast<GtkStatusIcon*>(gobj()));
}

void StatusIcon::set_blinking(bool blinking)
{
gtk_status_icon_set_blinking(gobj(), static_cast<int>(blinking)); 
}

bool StatusIcon::get_blinking() const
{
  return gtk_status_icon_get_blinking(const_cast<GtkStatusIcon*>(gobj()));
}

bool StatusIcon::is_embedded() const
{
  return gtk_status_icon_is_embedded(const_cast<GtkStatusIcon*>(gobj()));
}


#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > StatusIcon::property_pixbuf() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > StatusIcon::property_pixbuf() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_WriteOnly<std::string> StatusIcon::property_file() 
{
  return Glib::PropertyProxy_WriteOnly<std::string>(this, "file");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<StockID> StatusIcon::property_stock() 
{
  return Glib::PropertyProxy<StockID>(this, "stock");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<StockID> StatusIcon::property_stock() const
{
  return Glib::PropertyProxy_ReadOnly<StockID>(this, "stock");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<Glib::ustring> StatusIcon::property_icon_name() 
{
  return Glib::PropertyProxy<Glib::ustring>(this, "icon-name");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<Glib::ustring> StatusIcon::property_icon_name() const
{
  return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "icon-name");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<ImageType> StatusIcon::property_storage_type() const
{
  return Glib::PropertyProxy_ReadOnly<ImageType>(this, "storage-type");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<int> StatusIcon::property_size() const
{
  return Glib::PropertyProxy_ReadOnly<int>(this, "size");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<bool> StatusIcon::property_blinking() 
{
  return Glib::PropertyProxy<bool>(this, "blinking");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<bool> StatusIcon::property_blinking() const
{
  return Glib::PropertyProxy_ReadOnly<bool>(this, "blinking");
}
#endif //GLIBMM_PROPERTIES_ENABLED


#ifdef GLIBMM_VFUNCS_ENABLED
#endif //GLIBMM_VFUNCS_ENABLED


} // namespace Gtk


