// Generated by gtkmmproc -- DO NOT MODIFY!
+
#include <gtkmm/celllayout.h>
#include <gtkmm/private/celllayout_p.h>
#include <gtk/gtkcelllayout.h>
-namespace //anonymous
-{
-
-// This Signal Proxy allows the C++ coder to specify
-// a sigc::slot instead of a static function.
-class SignalProxy_CellData
+static void SignalProxy_CellData_gtk_callback(GtkCellLayout* /* cell_layout */, GtkCellRenderer* /* cell */, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer data)
{
-public:
- typedef Gtk::CellLayout::SlotCellData SlotType;
-
- SignalProxy_CellData(const SlotType& slot)
- : slot_(slot) {}
-
- ~SignalProxy_CellData();
-
- static void gtk_callback(GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer data);
- static void gtk_callback_destroy(void* data);
-
-private:
- SlotType slot_;
-};
-
-SignalProxy_CellData::~SignalProxy_CellData()
-{}
-
-void SignalProxy_CellData::gtk_callback(GtkCellLayout* /* cell_layout */, GtkCellRenderer* /* cell */, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer data)
-{
- SignalProxy_CellData *const self = static_cast<SignalProxy_CellData*>(data);
+ Gtk::CellLayout::SlotCellData* the_slot = static_cast<Gtk::CellLayout::SlotCellData*>(data);
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
//We ignore the cell, because that was given as an argument to the connecting method, so the caller should know which one it is already.
//And we ignore the tree_model because that can be obtained from the iter or from the CellLayout itself.
- (self->slot_)(Gtk::TreeModel::const_iterator(tree_model, iter));
+ (*the_slot)(Gtk::TreeModel::const_iterator(tree_model, iter));
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
-
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
}
-void SignalProxy_CellData::gtk_callback_destroy(void* data)
+static void SignalProxy_CellData_gtk_callback_destroy(void* data)
{
- delete static_cast<SignalProxy_CellData*>(data);
+ delete static_cast<Gtk::CellLayout::SlotCellData*>(data);
}
-} // anonymous namespace
-
-
namespace Gtk
{
+#ifdef GLIBMM_PROPERTIES_ENABLED
void CellLayout::add_attribute(const Glib::PropertyProxy_Base& property, const TreeModelColumnBase& column)
{
gtk_cell_layout_add_attribute(gobj(),
(GtkCellRenderer*) property.get_object()->gobj(), property.get_name(), column.index());
}
+#endif //GLIBMM_PROPERTIES_ENABLED
+
+void CellLayout::add_attribute(CellRenderer& cell, const Glib::ustring& attribute, const TreeModelColumnBase& column)
+{
+ gtk_cell_layout_add_attribute(gobj(),
+ (GtkCellRenderer*) cell.gobj(), attribute.c_str(), column.index());
+}
void CellLayout::set_cell_data_func(CellRenderer& cell, const SlotCellData& slot)
{
- // Create a signal proxy. A pointer to this will be passed
+ // Create a copy of the slot object. A pointer to this will be passed
// through the callback's data parameter. It will be deleted
- // when SignalProxy_CellData::gtk_callback_destroy() is called.
- SignalProxy_CellData *const pSignalProxy = new SignalProxy_CellData(slot);
+ // when SignalProxy_CellData_gtk_callback_destroy() is called.
+ SlotCellData* slot_copy = new SlotCellData(slot);
gtk_cell_layout_set_cell_data_func(gobj(), cell.gobj(),
- &SignalProxy_CellData::gtk_callback, pSignalProxy,
- &SignalProxy_CellData::gtk_callback_destroy);
+ &SignalProxy_CellData_gtk_callback, slot_copy,
+ &SignalProxy_CellData_gtk_callback_destroy);
}
Glib::RefPtr<Gtk::CellLayout> wrap(GtkCellLayout* object, bool take_copy)
{
- return Glib::RefPtr<Gtk::CellLayout>( dynamic_cast<Gtk::CellLayout*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ return Glib::RefPtr<Gtk::CellLayout>( dynamic_cast<Gtk::CellLayout*> (Glib::wrap_auto_interface<Gtk::CellLayout> ((GObject*)(object), take_copy)) );
//We use dynamic_cast<> in case of multiple inheritance.
}
//This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
g_assert(klass != 0);
+#ifdef GLIBMM_VFUNCS_ENABLED
klass->pack_start = &pack_start_vfunc_callback;
klass->pack_end = &pack_end_vfunc_callback;
klass->clear = &clear_vfunc_callback;
klass->add_attribute = &add_attribute_vfunc_callback;
klass->clear_attributes = &clear_attributes_vfunc_callback;
klass->reorder = &reorder_vfunc_callback;
+#endif //GLIBMM_VFUNCS_ENABLED
+
+#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
+#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
}
+#ifdef GLIBMM_VFUNCS_ENABLED
void CellLayout_Class::pack_start_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, gboolean expand)
{
- CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
- if(obj && obj->is_derived_())
+ if(obj_base && obj_base->is_derived_())
{
- try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
+ if(obj) // This can be NULL during destruction.
{
- // Call the virtual member method, which derived classes might override.
- obj->pack_start_vfunc(Glib::wrap(cell)
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ // Call the virtual member method, which derived classes might override.
+ obj->pack_start_vfunc(Glib::wrap(cell)
, expand
);
- }
- catch(...)
- {
- Glib::exception_handlers_invoke();
+ return;
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
- else
- {
- BaseClassType *const base = static_cast<BaseClassType*>(
- g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
-) );
+) );
- // Call the original underlying C function:
- if(base && base->pack_start)
- (*base->pack_start)(self, cell, expand);
- }
-}
+ // Call the original underlying C function:
+ if(base && base->pack_start)
+ (*base->pack_start)(self, cell, expand);
+}
void CellLayout_Class::pack_end_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, gboolean expand)
{
- CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
- if(obj && obj->is_derived_())
+ if(obj_base && obj_base->is_derived_())
{
- try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
+ if(obj) // This can be NULL during destruction.
{
- // Call the virtual member method, which derived classes might override.
- obj->pack_end_vfunc(Glib::wrap(cell)
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ // Call the virtual member method, which derived classes might override.
+ obj->pack_end_vfunc(Glib::wrap(cell)
, expand
);
- }
- catch(...)
- {
- Glib::exception_handlers_invoke();
+ return;
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
- else
- {
- BaseClassType *const base = static_cast<BaseClassType*>(
- g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
-) );
+) );
- // Call the original underlying C function:
- if(base && base->pack_end)
- (*base->pack_end)(self, cell, expand);
- }
-}
+ // Call the original underlying C function:
+ if(base && base->pack_end)
+ (*base->pack_end)(self, cell, expand);
+}
void CellLayout_Class::clear_vfunc_callback(GtkCellLayout* self)
{
- CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
- if(obj && obj->is_derived_())
+ if(obj_base && obj_base->is_derived_())
{
- try // Trap C++ exceptions which would normally be lost because this is a C callback.
- {
- // Call the virtual member method, which derived classes might override.
- obj->clear_vfunc();
- }
- catch(...)
+ CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
+ if(obj) // This can be NULL during destruction.
{
- Glib::exception_handlers_invoke();
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ // Call the virtual member method, which derived classes might override.
+ obj->clear_vfunc();
+ return;
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
- else
- {
- BaseClassType *const base = static_cast<BaseClassType*>(
- g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
-) );
+) );
- // Call the original underlying C function:
- if(base && base->clear)
- (*base->clear)(self);
- }
-}
+ // Call the original underlying C function:
+ if(base && base->clear)
+ (*base->clear)(self);
+}
void CellLayout_Class::add_attribute_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, const gchar* attribute, gint column)
{
- CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
- if(obj && obj->is_derived_())
+ if(obj_base && obj_base->is_derived_())
{
- try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
+ if(obj) // This can be NULL during destruction.
{
- // Call the virtual member method, which derived classes might override.
- obj->add_attribute_vfunc(Glib::wrap(cell)
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ // Call the virtual member method, which derived classes might override.
+ obj->add_attribute_vfunc(Glib::wrap(cell)
, Glib::convert_const_gchar_ptr_to_ustring(attribute)
, column
);
- }
- catch(...)
- {
- Glib::exception_handlers_invoke();
+ return;
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
- else
- {
- BaseClassType *const base = static_cast<BaseClassType*>(
- g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
-) );
+) );
- // Call the original underlying C function:
- if(base && base->add_attribute)
- (*base->add_attribute)(self, cell, attribute, column);
- }
-}
+ // Call the original underlying C function:
+ if(base && base->add_attribute)
+ (*base->add_attribute)(self, cell, attribute, column);
+}
void CellLayout_Class::clear_attributes_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell)
{
- CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
- if(obj && obj->is_derived_())
+ if(obj_base && obj_base->is_derived_())
{
- try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
+ if(obj) // This can be NULL during destruction.
{
- // Call the virtual member method, which derived classes might override.
- obj->clear_attributes_vfunc(Glib::wrap(cell)
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ // Call the virtual member method, which derived classes might override.
+ obj->clear_attributes_vfunc(Glib::wrap(cell)
);
- }
- catch(...)
- {
- Glib::exception_handlers_invoke();
+ return;
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
- else
- {
- BaseClassType *const base = static_cast<BaseClassType*>(
- g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
-) );
+) );
- // Call the original underlying C function:
- if(base && base->clear_attributes)
- (*base->clear_attributes)(self, cell);
- }
-}
+ // Call the original underlying C function:
+ if(base && base->clear_attributes)
+ (*base->clear_attributes)(self, cell);
+}
void CellLayout_Class::reorder_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, gint position)
{
- CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
- if(obj && obj->is_derived_())
+ if(obj_base && obj_base->is_derived_())
{
- try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
+ if(obj) // This can be NULL during destruction.
{
- // Call the virtual member method, which derived classes might override.
- obj->reorder_vfunc(Glib::wrap(cell)
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ // Call the virtual member method, which derived classes might override.
+ obj->reorder_vfunc(Glib::wrap(cell)
, position
);
- }
- catch(...)
- {
- Glib::exception_handlers_invoke();
+ return;
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
- else
- {
- BaseClassType *const base = static_cast<BaseClassType*>(
- g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
-) );
+) );
+
+ // Call the original underlying C function:
+ if(base && base->reorder)
+ (*base->reorder)(self, cell, position);
- // Call the original underlying C function:
- if(base && base->reorder)
- (*base->reorder)(self, cell, position);
- }
}
+#endif //GLIBMM_VFUNCS_ENABLED
+
+#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
+#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
Glib::ObjectBase* CellLayout_Class::wrap_new(GObject* object)
void CellLayout::pack_start(CellRenderer& cell, bool expand)
{
- gtk_cell_layout_pack_start(gobj(), (cell).gobj(), static_cast<int>(expand));
+gtk_cell_layout_pack_start(gobj(), (cell).gobj(), static_cast<int>(expand));
}
void CellLayout::pack_end(CellRenderer& cell, bool expand)
{
- gtk_cell_layout_pack_end(gobj(), (cell).gobj(), static_cast<int>(expand));
+gtk_cell_layout_pack_end(gobj(), (cell).gobj(), static_cast<int>(expand));
+}
+
+Glib::ListHandle<CellRenderer*> CellLayout::get_cells()
+{
+ return Glib::ListHandle<CellRenderer*>(gtk_cell_layout_get_cells(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle<const CellRenderer*> CellLayout::get_cells() const
+{
+ return Glib::ListHandle<const CellRenderer*>(gtk_cell_layout_get_cells(const_cast<GtkCellLayout*>(gobj())), Glib::OWNERSHIP_SHALLOW);
}
void CellLayout::clear()
{
- gtk_cell_layout_clear(gobj());
+gtk_cell_layout_clear(gobj());
}
void CellLayout::add_attribute(CellRenderer& cell, const Glib::ustring& attribute, int column)
{
- gtk_cell_layout_add_attribute(gobj(), (cell).gobj(), attribute.c_str(), column);
+gtk_cell_layout_add_attribute(gobj(), (cell).gobj(), attribute.c_str(), column);
}
void CellLayout::clear_attributes(CellRenderer& cell)
{
- gtk_cell_layout_clear_attributes(gobj(), (cell).gobj());
+gtk_cell_layout_clear_attributes(gobj(), (cell).gobj());
}
void CellLayout::reorder(CellRenderer& cell, int position)
{
- gtk_cell_layout_reorder(gobj(), (cell).gobj(), position);
+gtk_cell_layout_reorder(gobj(), (cell).gobj(), position);
}
+#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
+#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
+
+#ifdef GLIBMM_VFUNCS_ENABLED
void Gtk::CellLayout::pack_start_vfunc(CellRenderer* cell, bool expand)
{
BaseClassType *const base = static_cast<BaseClassType*>(
if(base && base->pack_start)
(*base->pack_start)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell),static_cast<int>(expand));
}
-
void Gtk::CellLayout::pack_end_vfunc(CellRenderer* cell, bool expand)
{
BaseClassType *const base = static_cast<BaseClassType*>(
if(base && base->pack_end)
(*base->pack_end)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell),static_cast<int>(expand));
}
-
void Gtk::CellLayout::clear_vfunc()
{
BaseClassType *const base = static_cast<BaseClassType*>(
if(base && base->clear)
(*base->clear)(gobj());
}
-
void Gtk::CellLayout::add_attribute_vfunc(CellRenderer* cell, const Glib::ustring& attribute, int column)
{
BaseClassType *const base = static_cast<BaseClassType*>(
if(base && base->add_attribute)
(*base->add_attribute)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell),attribute.c_str(),column);
}
-
void Gtk::CellLayout::clear_attributes_vfunc(CellRenderer* cell)
{
BaseClassType *const base = static_cast<BaseClassType*>(
if(base && base->clear_attributes)
(*base->clear_attributes)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell));
}
-
void Gtk::CellLayout::reorder_vfunc(CellRenderer* cell, int position)
{
BaseClassType *const base = static_cast<BaseClassType*>(
if(base && base->reorder)
(*base->reorder)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell),position);
}
+#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gtk