After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 547163 - Can't call protected vfuncs of children.
Can't call protected vfuncs of children.
Status: RESOLVED INVALID
Product: gnomemm
Classification: Deprecated
Component: cluttermm
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2008-08-10 12:48 UTC by gonen
Modified: 2009-01-27 09:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description gonen 2008-08-10 12:48:35 UTC
To implement a layout manager class, I need to write a class that inherits from clutter::actor and clutter:container, The idea is to write something similar to clutter:group, which contains other actors, and but unlike group that just calls do_paint one by one, It needs to make smarter choises and lay them out on the screen.

My problem writing this class, is that i need to have several actor children, and call there virtual functions to get the info i need to lay them out, and also to paint them, for example, call there allocate_vfunc() to find there screen size, and make decisions according to that size.
quote from clutter's allocate function "Should never be called by applications (except when implementing a container or layout manager)."

I cannot do that, because all the virtual functions are protected, so I cannot call m_child[0]->allocate(), or any other vfuncs.
I'm guessing they are protected because of "Should never be called by applications" , but as I am implementing the exception, I'm stuck.

I'm not that familiar with the glib objects in C, I'm guessing they didnt implement 'protected' functionality, or they can somehow override that.

Any suggestions/idea's on how to fix this?
Comment 1 Murray Cumming 2008-08-11 17:51:05 UTC
Clutter::Actor::allocate() is not protected. I believe it's how you should invoke the Clutter::Actor::allocate_vfunc() virtual functions.
Comment 2 Murray Cumming 2008-08-15 12:38:10 UTC
Have you had success with that?
Comment 3 Murray Cumming 2009-01-07 21:11:09 UTC
Please respond.
Comment 4 Murray Cumming 2009-01-27 09:30:50 UTC
Closing due to lack of response. See comment #1.