On 2016-07-02 21:04, Richard Gaskin wrote:
We can't use widgets as part of our custom drawing apps that use the
pointer tool?

Heh - I perhaps should have been much more specific there.

The tool used to interact with an object (its effective tool) is a function of the cantSelect property of it and its ancestors (the mode of the stack also affects this), and the currently selected tool. So, the 'mode' in which an object runs is specific to the object.

If an object's effective tool is pointer, then it goes into 'edit mode' - you can see this in cards, in particular. Here, clicking on controls, or click-dragging on the canvas causes object selection to occur. Indeed, the behavior of most engine controls is slightly different if its effective tool is pointer (i.e. edit mode).

Widgets follow this pattern (as widgets are, basically, engine controls). When a widget changes effective tool, it gets notified of this so it can change its behavior appropriately.

A good example here is the browser widget. As native layers 'float above' all other objects and as such interfere with mouse events you want to handle somewhere else when editing, when it enters edit mode the native layer is hidden and you got a placeholder rendering.

There's a fair bit more work to do here in the future to make it much easier to write widgets which can be edited with pointer - many of the widgets we have already would benefit from this... For example, when in edit mode, you should really be able to interact with the individual buttons on a header bar, for example, to change their properties.

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to