libglademm & derived widgets: "typedef struct GtkHBox Gtk::HBox::BaseObjectType' is inaccessible"



Hello,

I'm trying to use a derived type (from Gtk::HBox) in a libglademm
interface.  However, for the line where I call get_widget_derived on the
xml object, I get an error like:

GTabular.C:77:   instantiated from here
/home/jcs116/.local/include/gtkmm-2.4/gtkmm/box.h:498: error: 'typedef
struct GtkHBox Gtk::HBox::BaseObjectType' is inaccessible
/home/jcs116/.local/include/libglademm-2.4/libglademm/xml.h:236: error:
within this context

My derived type is defined at file scope, and is defined as:

class GtkLengthEntry : Gtk::HBox {
public:
        GtkLengthEntry::GtkLengthEntry(BaseObjectType* cobject, const
Glib::RefPtr<Gnome::Glade::Xml>& refGlade);

protected:
        Gtk::SpinButton spin_;
        Gtk::ComboBoxText combo_;

};

GtkLengthEntry::GtkLengthEntry(
        BaseObjectType* cobject,
        const Glib::RefPtr<Gnome::Glade::Xml>& refGlade)
: Gtk::HBox(cobject)
{
        pack_start (spin_, true, true, 0);
        pack_start (combo_, true, true, 0);
}

The glade file contains an hbox called "Width", which I'm trying to
access like:
GtkLengthEntry *lengthfoo;
xml_->get_widget_derived ("Width", lengthfoo);

Any help appreciated.

Cheers,
John





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]