[gnomemm] error when inheritent from CanvasItem and CanvasEllipse.
- From: "gao chaowei" <chaoweigao hotmail com>
- To: gnomemm-list gnome org
- Subject: [gnomemm] error when inheritent from CanvasItem and CanvasEllipse.
- Date: Wed, 06 Nov 2002 16:00:14 +0800
************file "treeitem.h" ************
#include <gnome--.h>
using namespace Gnome;
class Tree;
#ifndef __TREEITEM_H
#define __TREEITEM_H
class TreeItem : public CanvasItem{
public:
Tree * TNode;
virtual Tree * get_tree() = 0;
};
#endif
#ifndef __TREEELLIPSE_H
#define __TREEELLIPSE_H
class TreeEllipse : public CanvasEllipse, public TreeItem{
public:
TreeEllipse(Tree * t=0, const CanvasGroup& parent, double x1, double
y1, double x2,double y2,const Gtk::string&);
};
#endif
****************file "treeitem.cpp"*****************
#include "treeitem.h"
#include "Tree.h"
//TreeItem=======================================================================
TreeItem TreeItem::TreeItem(Tree * t){
TNode = t;
}
Tree * get_tree(){
return TNode;
}
//TreeEllipse====================================================================
TreeEllipse TreeEllipse::TreeEllipse(Tree * t,
const CanvasGroup& parent, double x1, double y1, double x2,double
y2,const Gtk::string& color)
:TreeItem(t), CanvasEllipse(parent,x1,y1,x2,y2){
set_fill_color(color);
}
****************compilation error**************
In file included from treeitem.cpp:1:
../include/treeitem.h:12: base `Gnome::CanvasItem' with only
non-default constructor in class without a constructor
../include/treeitem.h:20: no unique final overrider for
`SigC::ObjectReferenced::set_dynamic ()' since there two instances of
`Gtk::Object' in `TreeEllipse'
../include/treeitem.h:20: no unique final overrider for
`SigC::ObjectReferenced::reference ()' since there two instances of
`Gtk::Object' in `TreeEllipse'
../include/treeitem.h:20: no unique final overrider for
`SigC::ObjectReferenced::unreference ()' since there two instances of
`Gtk::Object' in `TreeEllipse'
I do not understand the meaning of the error. Anybody can explain and how
to fix it?
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/lccn/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]