(02-28-2014, 11:12 PM)VincentDoan Wrote: So, with CORE, how do we get AIToolMessage in the callback?
Since CORE is meant to provide an object-oriented environment for Adobe Illustrator, it is heavily object-driven. Also, we didn't want to require CORE API users to worry about compiling/managing something like Boost.Bind for callbacks.
As such, CORE utilizes simple callbacks of the form
Code:
void MyClass::callback_function();
Code:
void MyClass::callback_function() const;
For the gear tool sample, you can access message data from the hdi::core:ispatcher class. You would want either the lastMessage() or lastToolMessage() member function, depending on the circumstances.