Re: [glade--] get_widget_derived() on indirect base class
- From: Rob Benton <rob benton conwaycorp net>
- To: Murray Cumming <murrayc murrayc com>
- Cc: "glademm-list gnome org" <glademm-list gnome org>
- Subject: Re: [glade--] get_widget_derived() on indirect base class
- Date: Mon, 25 Apr 2005 12:09:05 -0500
Murray Cumming wrote:
On Sun, 2005-04-24 at 12:39 -0500, Rob Benton wrote:
I've got a class I've created which is derived from Gtk::EventBox and
then another class derived from that:
class Chip: public Gtk::EventBox;
class EditChip: public Chip;
get_widget_derived() complains that Gtk::EventBox is not a direct or
virtual base of EditChip. Is there a way to get around this or do I
have to inherit from eventbox a second time in my second class?
What's the actual error message?
EditWindow.C: In constructor `EditWindow::EditWindow(GtkEventBox*, const
Glib::RefPtr<Gnome::Glade::Xml>&)':
EditWindow.C:4: error: type `class Gtk::EventBox' is not a direct or
virtual
base of `EditWindow'
here's there actual constructors:
BaseChip.C:
----------
BaseChip::BaseChip(const Glib::RefPtr<Gnome::Glade::Xml> & g) :
_type(EMPTY_EMPTY),
_xml(g),
drawHeight(100),
drawWidth(100)
{
// connect the drawingarea signals
_drawarea.signal_realize().connect(
sigc::mem_fun(*this, &BaseChip::drawarea_realize));
_drawarea.signal_expose_event().connect(
sigc::mem_fun(*this, &BaseChip::drawarea_expose_event));
// setup eventbox
set_size_request(drawWidth, drawHeight);
add(_drawarea);
set_events(Gdk::BUTTON_PRESS_MASK);
signal_button_press_event().connect(
sigc::mem_fun(*this, &BaseChip::button_press));
// initialize the chip as empty
init_empty();
// show widgets
_drawarea.show();
}
EditWindow.C:
------------EditWindow::EditWindow(GtkEventBox * e, const
Glib::RefPtr<Gnome::Glade::Xml> & g) :
Gtk::EventBox(e),
BaseChip(g)
{
init_empty();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]