> Allow me to ask a question.
> I think it would be cool to wxCanObjScript working.
> I am thinking of deriving the wxCanvasObj from wxEvtHandler, and that
> way sent and event to wxLua to draw the object and another to Hittest
> the object.
> But maybe that is way to complex. And how to intercept those two
> functions in wxlua m_script of the object.
> In principle m_script in the C++ object, should contain two functions.
> On with input parameter a wxDC* etc. and this one is used for  drawing.
> The other Is IsHit( x, y etc. ) and is used for hit testing, and return
> true to C++ if hit.
> Now do you have any idea on how to best call those function in m_script
> from the coresponding C++ functions?

You can have your C function just call lua code directly.
m_wxlState.RunString(wxString::Format(wxT("hittest(%f, %f)"), x, y)));
in the lua code you can then set variables back to C++ through the binding.

Maybe I don't understand fully though.

> The next step is of course to have the whole derived wxCanObj defined in
> a lua script.
> But one step first ;-)

Whatever would be easier.

-John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to