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 545321 - paint() is not called when subclassing actor
paint() is not called when subclassing actor
Status: RESOLVED NOTABUG
Product: gnomemm
Classification: Deprecated
Component: cluttermm
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2008-07-29 13:58 UTC by gonen
Modified: 2008-08-04 10:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase.rar (1.08 KB, text/plain)
2008-07-30 07:42 UTC, gonen
Details

Description gonen 2008-07-29 13:58:39 UTC
I tried to write my own actor, that inherits from actor, and 
override the paint function to paint my own stuff, but
paint isn't called.
Debugging it shows that do_paint is called, but base->paint isnt called from that because base is NULL.

Can you give an example on how to inherit from actor the do my own paint function?
Comment 1 Jonathon Jongsma 2008-07-29 15:47:06 UTC
I think we'll need a simple test case in order to investigate whether this is a bug or not.
Comment 2 Murray Cumming 2008-07-30 07:01:58 UTC
You are probably also the first person to try this with C++. I'd really like to have time to create C++ versions of all the examples in the clutter tutorial. 
Comment 3 gonen 2008-07-30 07:42:59 UTC
Created attachment 115545 [details]
testcase.rar

Test case that shows the problem, paint isnt called for a class that inherits from actor
Comment 4 Murray Cumming 2008-07-30 07:58:00 UTC
I don't believe there is any paint() virtual function. Try paint_vfunc() instead, please, or generally look a the class heirarchy to see what virtual functions really exist.

One way to check this is to call the base class's implementation of the virtual function, which you should often do anyway.
Comment 5 gonen 2008-07-30 08:44:45 UTC
Thanks, using do_paint() actually worked, I guess what really is missing is documentation and examples.
Comment 6 Murray Cumming 2008-08-04 10:31:12 UTC
I don't really understand what do_paint() is, but this seems to be resolved.