Calling superclass paint event handler

Calling superclass paint event handler

Post by carlosjose » Fri, 12 Aug 2005 05:06:24


Hi all!
I have subclassed a canvas, now I need to draw some lines "on top"
of it (after its content has been drawn). I'm not sure how to
override the paint event. Should I call the superclass paint
event handler, the do my own painting? How can I do that (I mean,
not directly calling the superclass handler -as this would break
encapsulation-
but through the event table)? And is it correct to obtain the PaintDC
twice (once in the superclass and once in the subclass)? I think Skip()
is not the answer, but I'm not sure, far from being an expert. What I
need is more explicit control in the invokation of superclass event handler.
Thank you in advance.
Regards,
Carlos







___________________________________________________________
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://www.yqcomputer.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: XXXX@XXXXX.COM
For additional commands, e-mail: XXXX@XXXXX.COM
 
 
 

Calling superclass paint event handler

Post by vadi » Fri, 12 Aug 2005 07:02:17


CP> I have subclassed a canvas, now I need to draw some lines "on top"
CP> of it (after its content has been drawn). I'm not sure how to
CP> override the paint event.

There is no good way to do it currently unfortunately. If the base class
is under your control, extract its EVT_PAINT handler contents into some
DoPaint() and call it from the derived class EVT_PAINT.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.yqcomputer.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: XXXX@XXXXX.COM
For additional commands, e-mail: XXXX@XXXXX.COM

 
 
 

Calling superclass paint event handler

Post by carlo » Fri, 12 Aug 2005 07:18:44

Hi all!
I have subclassed a canvas, now I need to draw some lines "on top"
of it (after its content has been drawn). I'm not sure how to
override the paint event. Should I call the superclass paint
event handler, the do my own painting? How can I do that (I mean,
not directly calling the superclass handler -as this would break
encapsulation-
but through the event table)? And is it correct to obtain the PaintDC
twice (once in the superclass and once in the subclass)? I think Skip()
is not the answer, but I'm not sure, far from being an expert. What I
need is more explicit control in the invokation of superclass event handler.
Thank you in advance.
Regards,
Carlos






___________________________________________________________
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://www.yqcomputer.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: XXXX@XXXXX.COM
For additional commands, e-mail: XXXX@XXXXX.COM
 
 
 

Calling superclass paint event handler

Post by rulati » Sat, 20 Aug 2005 07:03:13

> Hi all!

Postprocessing events is a confirmed can't-do in wxWidgets and there
is no hope for this to change. The current consensus seems to be that
nobody has an idea how to implement this feature while remaining API
compatible. Devs, am I wrong?

Regards,
Szczepan Holyszewski


---------------------------------------------------------------------
To unsubscribe, e-mail: XXXX@XXXXX.COM
For additional commands, e-mail: XXXX@XXXXX.COM