Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3 wxWidgets style Events

closed
nobody
None
5
2011-02-17
2009-11-05
DekarGuy
No

It would be nice for wxShapeFramework to adopt the wxWidgets style events for shapes and other objects.

The current implementation requires using only inherited versions of the FrameCanvas and Shapes in order to expose callback functionality, whereas using the wxWidgets style would allow you to connect events on a per-object basis and reduce amount of inheritance needed.

Discussion

  • "The current implementation requires using only inherited versions of the
    FrameCanvas and Shapes in order to expose callback functionality"

    It is not the truth. There are also wxSF events implemented in the library for both shape canvas and shapes (for example for clicking or double-clicking the shape canvas, dropping shapes to the canvas, pasting shapes to the canvas, text shapes' content change, etc.) See the sample projects (wxSFSample2 and wxSFSample3) and documentation. If you request some other event, let me know.

     
  • DekarGuy
    DekarGuy
    2009-11-12

    Thanks, it seems to be fine for the Canvas, but not for shapes since it looks like xsSerializable inherits from wxObject instead of wxEvtHandler

     
  • "... since it looks like xsSerializable inherits from wxObject instead of wxEvtHandler."

    Since the xsSerializable is a generic persistent class object container then it has no sense to derive it from event handler. On the other hand, I can still implement emitting of shape events on all shapebase-related operations like moving, sizing, hitting, etc. and those events can be redirected directly to the shape canvas. wxSFShapeEvent holds also pointer to source shape so a user could operate with it directly from an event handler connected to the shape canvas. What do you think about it?

     
    • status: open --> closed
     
  • Implemented.