[Openmcl-devel] cursor size & color

Gary Byers gb at clozure.com
Tue Sep 27 19:33:46 UTC 2011


And if by "cursor" you mean "insertion point in a text view", you'd have to
use a different set of Cocoa methods, notably 
#/drawInsertionPointInRect:color:turnedOn:

On Tue, 27 Sep 2011, R. Matthew Emerson wrote:

>
> On Sep 24, 2011, at 9:34 AM, Janusz Podrazik wrote:
>
>> Hi,
>>
>> I wonder were can I change the size and the color of the cursor in CCL.
>>
>> In LispWorks we can do:
>>
>> ; cursor size
>>
>> (setq *cursor-color* :red)
>> (setq *cursor-style* :inverse) ; ; :caret = narrow :left-bar = wider :inverse = large :underline = underline
>> (setq *cursor-blink* nil) ; nil = blink, 0 = no blink
>> (set-cursor-style)
>
> You have to use Cocoa functions directly.
>
> (#/set (#/openHandCursor ns:ns-cursor)) will change the cursor to an open hand.
>
> So, from a listener, you could type
> (gui::execute-in-gui #'(lambda () (#/set (#/openHandCursor ns:ns-cursor)) (sleep 3)))
>
> and see the open hand cursor for a few seconds.
>
> It's typical to set up cursor tracking rectangles so that the cursor is automatically updated whenever the cursor enters the tracking rectangle.
>
> http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/EventOverview/TrackingAreaObjects/TrackingAreaObjects.html
>
>
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list