[Openmcl-devel] cursor size & color

Janusz Podrazik info at mracpublishing.com
Wed Sep 28 01:59:46 PDT 2011


Yes, I am talking about the insertion point in a text view - size and colour.
What function should I use, I have no experience in Cocoa functions at all.

thanks,

JP

On 27 Sep 2011, at 21:33, Gary Byers wrote:

> 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
>> 
>> 

MRAC Publishing
info at mracpublishing.com
http://januszpodrazik.com





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20110928/000f2105/attachment.htm>


More information about the Openmcl-devel mailing list