Goocanvasmm: GridModel not derived from ItemModelSimple
- From: Andreas Klaedtke <andreas klaedtke gmx net>
- To: gtkmm-list gnome org
- Subject: Goocanvasmm: GridModel not derived from ItemModelSimple
- Date: Sat, 28 May 2011 23:24:11 +0100
Hi,
I am currently trying to get the mvdemo from Goocanvas rewritten in
Goocanvasmm.
I encountered a problem with the GridModel. This seems to be derived
from ItemSimple, not ItemModelSimple, as I would imagine it should be.
Am I getting this wrong?
As I am working with debian and its packages, I am currently still at
version 0.15. But from what I can see it is still problematic in 1.90.3.
I could provide a patch for version 0.15.3 (attached). Not sure to whom
to send this other than the list.
Cheers
Andreas
diff -crB /tmp/goocanvasmm-0.15.3.orig/goocanvas/goocanvasmm/gridmodel.cc /tmp/goocanvasmm-0.15.3/goocanvas/goocanvasmm/gridmodel.cc
*** /tmp/goocanvasmm-0.15.3.orig/goocanvas/goocanvasmm/gridmodel.cc 2009-09-03 09:29:32.000000000 +0100
--- /tmp/goocanvasmm-0.15.3/goocanvas/goocanvasmm/gridmodel.cc 2011-05-28 23:19:51.000000000 +0100
***************
*** 32,38 ****
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
Glib::ObjectBase(0),
! Goocanvas::ItemSimple(Glib::ConstructParams(gridmodel_class_.init(), "x",x,"y",y,"width",width,"height",height,"x-step",x_step,"y-step",y_step,"x-offset",x_offset,"y-offset",y_offset, static_cast<char*>(0)))
{
}
--- 32,38 ----
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
Glib::ObjectBase(0),
! Goocanvas::ItemModelSimple(Glib::ConstructParams(gridmodel_class_.init(), "x",x,"y",y,"width",width,"height",height,"x-step",x_step,"y-step",y_step,"x-offset",x_offset,"y-offset",y_offset, static_cast<char*>(0)))
{
}
***************
*** 119,132 ****
GridModel::GridModel(const Glib::ConstructParams& construct_params)
:
! Goocanvas::ItemSimple(construct_params)
{
}
GridModel::GridModel(GooCanvasGridModel* castitem)
:
! Goocanvas::ItemSimple((GooCanvasItemSimple*)(castitem))
{}
--- 119,132 ----
GridModel::GridModel(const Glib::ConstructParams& construct_params)
:
! Goocanvas::ItemModelSimple(construct_params)
{
}
GridModel::GridModel(GooCanvasGridModel* castitem)
:
! Goocanvas::ItemModelSimple((GooCanvasItemModelSimple*)(castitem))
{}
diff -crB /tmp/goocanvasmm-0.15.3.orig/goocanvas/goocanvasmm/gridmodel.h /tmp/goocanvasmm-0.15.3/goocanvas/goocanvasmm/gridmodel.h
*** /tmp/goocanvasmm-0.15.3.orig/goocanvas/goocanvasmm/gridmodel.h 2009-09-03 09:29:32.000000000 +0100
--- /tmp/goocanvasmm-0.15.3/goocanvas/goocanvasmm/gridmodel.h 2011-05-28 23:19:51.000000000 +0100
***************
*** 24,29 ****
--- 24,31 ----
*/
+ #include <glibmm/object.h>
+ #include <goocanvasmm/itemmodelsimple.h>
#include <goocanvasmm/group.h>
#include <gtkmm/enums.h>
***************
*** 40,46 ****
{
! class GridModel : public Goocanvas::ItemSimple
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
--- 42,48 ----
{
! class GridModel : public Goocanvas::ItemModelSimple
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff -crB /tmp/goocanvasmm-0.15.3.orig/goocanvas/goocanvasmm/private/gridmodel_p.h /tmp/goocanvasmm-0.15.3/goocanvas/goocanvasmm/private/gridmodel_p.h
*** /tmp/goocanvasmm-0.15.3.orig/goocanvas/goocanvasmm/private/gridmodel_p.h 2009-09-03 09:29:32.000000000 +0100
--- /tmp/goocanvasmm-0.15.3/goocanvas/goocanvasmm/private/gridmodel_p.h 2011-05-28 23:19:51.000000000 +0100
***************
*** 4,9 ****
--- 4,11 ----
#define _GOOCANVASMM_GRIDMODEL_P_H
+ #include <glibmm/private/object_p.h>
+
#include <glibmm/class.h>
namespace Goocanvas
***************
*** 16,23 ****
typedef GridModel CppObjectType;
typedef GooCanvasGridModel BaseObjectType;
typedef GooCanvasGridModelClass BaseClassType;
! typedef Goocanvas::ItemSimple_Class CppClassParent;
! typedef GooCanvasItemSimpleClass BaseClassParent;
friend class GridModel;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
--- 18,25 ----
typedef GridModel CppObjectType;
typedef GooCanvasGridModel BaseObjectType;
typedef GooCanvasGridModelClass BaseClassType;
! typedef Goocanvas::ItemModelSimple_Class CppClassParent;
! typedef GooCanvasItemModelSimpleClass BaseClassParent;
friend class GridModel;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
***************
*** 45,51 ****
} // namespace Goocanvas
! #include <goocanvasmm/private/itemsimple_p.h>
#endif /* _GOOCANVASMM_GRIDMODEL_P_H */
--- 47,53 ----
} // namespace Goocanvas
! #include <goocanvasmm/private/itemmodelsimple_p.h>
#endif /* _GOOCANVASMM_GRIDMODEL_P_H */
diff -crB /tmp/goocanvasmm-0.15.3.orig/goocanvas/src/gridmodel.ccg /tmp/goocanvasmm-0.15.3/goocanvas/src/gridmodel.ccg
*** /tmp/goocanvasmm-0.15.3.orig/goocanvas/src/gridmodel.ccg 2009-09-03 09:28:35.000000000 +0100
--- /tmp/goocanvasmm-0.15.3/goocanvas/src/gridmodel.ccg 2011-05-28 23:19:23.000000000 +0100
***************
*** 18,24 ****
#include <goocanvasgrid.h>
! _PINCLUDE(goocanvasmm/private/itemsimple_p.h)
namespace Goocanvas
{
--- 18,24 ----
#include <goocanvasgrid.h>
! _PINCLUDE(goocanvasmm/private/itemmodelsimple_p.h)
namespace Goocanvas
{
diff -crB /tmp/goocanvasmm-0.15.3.orig/goocanvas/src/gridmodel.hg /tmp/goocanvasmm-0.15.3/goocanvas/src/gridmodel.hg
*** /tmp/goocanvasmm-0.15.3.orig/goocanvas/src/gridmodel.hg 2009-09-03 09:28:35.000000000 +0100
--- /tmp/goocanvasmm-0.15.3/goocanvas/src/gridmodel.hg 2011-05-28 23:19:23.000000000 +0100
***************
*** 16,32 ****
*/
#include <goocanvasmm/group.h>
#include <gtkmm/enums.h>
_DEFS(goocanvasmm,libgoocanvas)
namespace Goocanvas
{
! class GridModel : public Goocanvas::ItemSimple
{
! _CLASS_GOBJECT(GridModel, GooCanvasGridModel, GOO_CANVAS_GRID_MODEL, Goocanvas::ItemSimple, GooCanvasItemSimple)
protected:
explicit GridModel(double x = 0, double y = 0, double width = 0, double height = 0, double x_step = 0, double y_step = 0, double x_offset = 0, double y_offset = 0);
_IGNORE(goo_canvas_grid_model_new)
--- 16,35 ----
*/
+ #include <glibmm/object.h>
+ #include <goocanvasmm/itemmodelsimple.h>
#include <goocanvasmm/group.h>
#include <gtkmm/enums.h>
_DEFS(goocanvasmm,libgoocanvas)
+ _PINCLUDE(glibmm/private/object_p.h)
namespace Goocanvas
{
! class GridModel : public Goocanvas::ItemModelSimple
{
! _CLASS_GOBJECT(GridModel, GooCanvasGridModel, GOO_CANVAS_GRID_MODEL, Goocanvas::ItemModelSimple, GooCanvasItemModelSimple)
protected:
explicit GridModel(double x = 0, double y = 0, double width = 0, double height = 0, double x_step = 0, double y_step = 0, double x_offset = 0, double y_offset = 0);
_IGNORE(goo_canvas_grid_model_new)
Only in /tmp/goocanvasmm-0.15.3/goocanvas/src: .stamps
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]