Re: [gtk-list] Re: Gtk_MenuFactory in gtk--?



Guillaume Laurent wrote:

> Marsel Osipov <marsel@lex.infi.net> writes:
>
> >   // compiler produces a mistake here
> >   // class 'Gtk_MenuFactory' has no member named 'widget'
> >   // I think this is the reason why menubar is not shown...
> >   //  if(mebar)
> >   //*mebar = subfactory[0]->widget;
>
> You have to create the widget like this :
>
> Gtk_Widget *menubarWidget = Gtk_Widget(subfactory[0].gtkmenufactory->widget);
>
> ie from the 'widget' member of the 'gtkmenufactory' member of your
> Gtk_MenuFactory.
>

O.K.  Is this the right way?

Gtk_Widget *menubarWidget = Gtk_Widget(subfactory[0].gtkmenufactory->widget);
 if(mebar)
    *mebar = menubarWidget;

I get the following error when compiling:
testmfac.cc:49: request for member 'gtkmenufactory' in 'MyWin::subfactory[0]'
which is of non-aggregate type 'Gtk_MenuFactory *'

what is my mistake?

> You can also take a look at my MenuFactory class
>
> http://www.worldnet.fr/~glaurent/rose_devel/rosegarden-c++.tgz
>

I have, but I can not compile it since I run gcc 2.7.*

> --
>                                         Guillaume.
>                                         http://www.worldnet.fr/~glaurent
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null



Thank you.
Marsel Osipov



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