[Lazarus] Adding Mac specific functionality

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Adding Mac specific functionality

Free Pascal - Lazarus mailing list
I’m working on a Lazarus program for another person and I’d like to use a feature of the Mac Cocoa framework which doesn’t exist in Lazarus.

I’m happy to add this myself and submit a patch (because it’s helpful for other users) but what is the protocol for doing this? I could add an accessor function into the control (TMemo) but it would route to a Cocoa control and it wouldn’t have any affect on Windows/Linux.

Here is the code in question which I’ve added via an ifdef for now but Lazarus should expose “setFocusRingType” in the main interface because it’s important on OS X.

     {$ifdef DARWIN}
     NSTextView(Memo1.Handle).setFocusRingType(NSFocusRingTypeNone);
     {$endif}

Regards,
        Ryan Joseph

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Adding Mac specific functionality

Free Pascal - Lazarus mailing list
I submitted a patch to correct the problem. WantsTab property of TMemo should affect the focus ring on Mac.

https://bugs.freepascal.org/view.php?id=35016

> On Feb 5, 2019, at 9:24 AM, Ryan Joseph via lazarus <[hidden email]> wrote:
>
> I’m working on a Lazarus program for another person and I’d like to use a feature of the Mac Cocoa framework which doesn’t exist in Lazarus.
>
> I’m happy to add this myself and submit a patch (because it’s helpful for other users) but what is the protocol for doing this? I could add an accessor function into the control (TMemo) but it would route to a Cocoa control and it wouldn’t have any affect on Windows/Linux.
>
> Here is the code in question which I’ve added via an ifdef for now but Lazarus should expose “setFocusRingType” in the main interface because it’s important on OS X.
>
>     {$ifdef DARWIN}
>     NSTextView(Memo1.Handle).setFocusRingType(NSFocusRingTypeNone);
>     {$endif}
>
> Regards,
> Ryan Joseph
>
> --
> _______________________________________________
> lazarus mailing list
> [hidden email]
> https://lists.lazarus-ide.org/listinfo/lazarus

Regards,
        Ryan Joseph

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus