[Lazarus] Showing selection on drawing under Cocoa
Dmitry Boyarintsev
skalogryz.lists at gmail.com
Thu Oct 17 04:44:26 CEST 2019
On Wed, Oct 16, 2019 at 4:33 PM C Western via lazarus <
lazarus at lists.lazarus-ide.org> wrote:
> Am I missing something? How does the Cocoa toolkit expect this to be done?
>
I'm see 3 ways of doing that.
1) you just invalidate the needed rectangle lines (or the entire selected
area) and do xor drawing on paint event.
2) you might want to try to play with "focusRing" settings of NSView. That
requires Cocoa level access to the view. Not cross platform, obviously.
3) instead of drawing into the view itself, you might want to create a
semi-transparent window or a control, to be at the top of the hierarchy.
and draw a focus as an overlay. Obviously you want this window or control
to ignore any keyboard or mouse events (not to interfere with underlying
controls).
The solution can be cross platform.
Approach #1 seems to be the easiest at this point.
thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20191016/9e0652d7/attachment.html>
More information about the lazarus
mailing list