[Lazarus] Showing selection on drawing under Cocoa

C Western l at c-m-w.me.uk
Wed Oct 16 22:33:18 CEST 2019

Is there an easy way of indicating a selection on a plot in Cocoa? I 
have a plot that is relatively time consuming to plot (particularly 
under Cocoa), and I want to be able to indicate the area selected with a 
mouse. On other widget sets I can xor a rectangle and do this quickly in 
the mouse event handler, but this is not possible under Cocoa because 
you can only plot during a paint event, so I have to invalidate the 
selected area and redraw the entire plot just to show a selection.

Am I missing something? How does the Cocoa toolkit expect this to be done?


More information about the lazarus mailing list