// Generated by gtkmmproc -- DO NOT MODIFY!


#include <gdlmm/dockobject.h>
#include <gdlmm/private/dockobject_p.h>

#include <gdl/gdl-dock-object.h>
/* Copyright (c) 2009  Fabien Parent <parent.f@gmail.com>
 *
 * This file is part of gdlmm.
 *
 * gdlmm 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.
 *
 * gdlmm 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 program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "dockmaster.h"
#include <glibmm/object.h>

#include <gdl/gdl-dock-master.h>

namespace Gdl
{

void DockObject::dock(DockObject& requestor, DockPlacement position)
{
  gdl_dock_object_dock(gobj(), requestor.gobj(), static_cast<GdlDockPlacement>(position), 0);
}

void DockObject::dock(DockObject& requestor, const Glib::ValueBase& other_data, DockPlacement position)
{
  gdl_dock_object_dock(gobj(), requestor.gobj(), static_cast<GdlDockPlacement>(position), const_cast<GValue*>(other_data.gobj()));
}

bool DockObject::reorder(DockObject& child, DockPlacement new_position)
{
  return gdl_dock_object_reorder(gobj(), child.gobj(), static_cast<GdlDockPlacement>(new_position), 0);
}

bool DockObject::reorder(DockObject& child, const Glib::ValueBase& other_data, DockPlacement new_position)
{
  return gdl_dock_object_reorder(gobj(), child.gobj(), static_cast<GdlDockPlacement>(new_position), const_cast<GValue*>(other_data.gobj()));
}

Glib::RefPtr<DockMaster> DockObject::get_master()
{
	return Glib::wrap(GDL_DOCK_OBJECT_GET_MASTER(gobj()), true);
}

} // namespace Gdl

namespace
{


static void DockObject_signal_detach_callback(GdlDockObject* self, gboolean p0,void* data)
{
  using namespace Gdl;
  typedef sigc::slot< void,bool > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(p0
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }
}

static const Glib::SignalProxyInfo DockObject_signal_detach_info =
{
  "detach",
  (GCallback) &DockObject_signal_detach_callback,
  (GCallback) &DockObject_signal_detach_callback
};


static void DockObject_signal_dock_callback(GdlDockObject* self, GdlDockObject* p0,GdlDockPlacement p1,GValue* p2,void* data)
{
  using namespace Gdl;
  typedef sigc::slot< void,DockObject&,DockPlacement,const Glib::ValueBase* > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(*Glib::wrap(p0)
, ((DockPlacement)(p1))
, reinterpret_cast<const Glib::ValueBase*>(p2)
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }
}

static const Glib::SignalProxyInfo DockObject_signal_dock_info =
{
  "dock",
  (GCallback) &DockObject_signal_dock_callback,
  (GCallback) &DockObject_signal_dock_callback
};


} // anonymous namespace


namespace Glib
{

Gdl::DockObject* wrap(GdlDockObject* object, bool take_copy)
{
  return dynamic_cast<Gdl::DockObject *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}

} /* namespace Glib */

namespace Gdl
{


/* The *_Class implementation: */

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

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

  }

  return *this;
}


void DockObject_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_DEFAULT_SIGNAL_HANDLERS_ENABLED
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
}

#ifdef GLIBMM_VFUNCS_ENABLED
#endif //GLIBMM_VFUNCS_ENABLED

#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED


Glib::ObjectBase* DockObject_Class::wrap_new(GObject* o)
{
  return manage(new DockObject((GdlDockObject*)(o)));

}


/* The implementation: */

DockObject::DockObject(const Glib::ConstructParams& construct_params)
:
  Gtk::Container(construct_params)
{
  }

DockObject::DockObject(GdlDockObject* castitem)
:
  Gtk::Container((GtkContainer*)(castitem))
{
  }

DockObject::~DockObject()
{
  destroy_();
}

DockObject::CppClassType DockObject::dockobject_class_; // initialize static member

GType DockObject::get_type()
{
  return dockobject_class_.init().get_type();
}


GType DockObject::get_base_type()
{
  return gdl_dock_object_get_type();
}


DockObject::DockObject()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(0),
  Gtk::Container(Glib::ConstructParams(dockobject_class_.init()))
{
  

}

bool DockObject::is_compound() const
{
  return gdl_dock_object_is_compound(const_cast<GdlDockObject*>(gobj()));
}

void DockObject::detach(bool recursive)
{
gdl_dock_object_detach(gobj(), static_cast<int>(recursive)); 
}

DockObject* DockObject::get_parent_object() const
{
  return Glib::wrap(gdl_dock_object_get_parent_object(const_cast<GdlDockObject*>(gobj())));
}

void DockObject::freeze()
{
gdl_dock_object_freeze(gobj()); 
}

void DockObject::thaw()
{
gdl_dock_object_thaw(gobj()); 
}

void DockObject::reduce()
{
gdl_dock_object_reduce(gobj()); 
}

void DockObject::bind(const Glib::RefPtr<DockMaster>& master)
{
gdl_dock_object_bind(gobj(), G_OBJECT(master->gobj())); 
}

void DockObject::unbind()
{
gdl_dock_object_unbind(gobj()); 
}

bool DockObject::is_bound() const
{
  return gdl_dock_object_is_bound(const_cast<GdlDockObject*>(gobj()));
}

void DockObject::present(DockObject& child)
{
gdl_dock_object_present(gobj(), child.gobj()); 
}

bool DockObject::child_placement(DockObject& child, DockPlacement placement)
{
  return gdl_dock_object_child_placement(gobj(), child.gobj(), (GdlDockPlacement*) &placement);
}


Glib::SignalProxy1< void,bool > DockObject::signal_detach()
{
  return Glib::SignalProxy1< void,bool >(this, &DockObject_signal_detach_info);
}


Glib::SignalProxy3< void,DockObject&,DockPlacement,const Glib::ValueBase* > DockObject::signal_dock()
{
  return Glib::SignalProxy3< void,DockObject&,DockPlacement,const Glib::ValueBase* >(this, &DockObject_signal_dock_info);
}


#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<Glib::ustring> DockObject::property_long_name() 
{
  return Glib::PropertyProxy<Glib::ustring>(this, "long-name");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<Glib::ustring> DockObject::property_long_name() const
{
  return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "long-name");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<Glib::ustring> DockObject::property_name() const
{
  return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "name");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy< Glib::RefPtr<DockMaster> > DockObject::property_master() 
{
  return Glib::PropertyProxy< Glib::RefPtr<DockMaster> >(this, "master");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<DockMaster> > DockObject::property_master() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<DockMaster> >(this, "master");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<Glib::ustring> DockObject::property_stock_id() 
{
  return Glib::PropertyProxy<Glib::ustring>(this, "stock-id");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<Glib::ustring> DockObject::property_stock_id() const
{
  return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "stock-id");
}
#endif //GLIBMM_PROPERTIES_ENABLED


#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED

#ifdef GLIBMM_VFUNCS_ENABLED
#endif //GLIBMM_VFUNCS_ENABLED


} // namespace Gdl


