Recent

Author Topic: How to add MenuItem to Dock's PopUp  (Read 8450 times)

rajivsoft

  • New Member
  • *
  • Posts: 48
How to add MenuItem to Dock's PopUp
« on: February 10, 2011, 12:20:20 pm »
Hi all,
how can i add a custom menu item to dock's right click popup?
Thanks

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: How to add MenuItem to Dock's PopUp
« Reply #1 on: February 10, 2011, 06:35:08 pm »
Good question. I think that's been asked before but I can't recall the answer. Maybe you could search the forum and see if you can find a post related to the app's popup menu on the Dock.

Thanks.

-Phil

rajivsoft

  • New Member
  • *
  • Posts: 48
Re: How to add MenuItem to Dock's PopUp
« Reply #2 on: February 15, 2011, 10:49:24 am »
Good question. I think that's been asked before but I can't recall the answer. Maybe you could search the forum and see if you can find a post related to the app's popup menu on the Dock.

Thanks.

-Phil

I'v tried to make a search for 'dock' and viewed all page results, but nothing...

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: How to add MenuItem to Dock's PopUp
« Reply #3 on: February 15, 2011, 04:58:08 pm »
Here's Apple's docs:

http://developer.apple.com/library/mac/#documentation/Carbon/Conceptual/customizing_docktile/tasks/docktasks.html

I believe the functions mentioned like SetApplicationDockTileMenu are all in MacOSAll unit.

You might look at this for ideas on how to integrate your code with LCL since this does something similar with the menu bar "extras":

http://wiki.lazarus.freepascal.org/TrayIcon

Thanks.

-Phil

Sanem

  • Full Member
  • ***
  • Posts: 168
Re: How to add MenuItem to Dock's PopUp
« Reply #4 on: February 18, 2021, 09:39:43 am »
Here's Apple's docs:

http://developer.apple.com/library/mac/#documentation/Carbon/Conceptual/customizing_docktile/tasks/docktasks.html

I believe the functions mentioned like SetApplicationDockTileMenu are all in MacOSAll unit.

You might look at this for ideas on how to integrate your code with LCL since this does something similar with the menu bar "extras":

http://wiki.lazarus.freepascal.org/TrayIcon

Thanks.

-Phil


The apple doc link is not found, can you give me a new link or tell me what you know about this topic and how to implement it in Lazarus?

Again for clarification:  My quest is to find a way to add a menu item to the doc menu in a Lazarus application. regards
Lazarus trunk 2.1.0, FPC 3.3.1
Windows 10 64x, macOS Catalina 10.15, Linux Zorin 15.2 - Manjaro

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1683
  • Former Delphi 1-7, 10.2 user
Re: How to add MenuItem to Dock's PopUp
« Reply #5 on: February 18, 2021, 12:29:26 pm »
1. You are replying to a 10 year old thread!

2. Phil has not visited the forum since October 2018.

3. The Carbon API is 32 bit and was largely removed from macOS in Catalina in 2019 along with the ability to run 32 bit applications.
Lazarus 2.3, FPC 3.3.1 macOS 12.0.1 x86_64 Xcode 13.1
Lazarus 2.3, FPC 3.3.1 macOS 12.0.1 aarch64 Xcode 13.1
Lazarus 2.3, FPC 3.2.2 FreeBSD 13.0 amd64 VM
Lazarus 2.3, FPC 3.2.2 FreeBSD 12.2 amd64 VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 VM
Lazarus 2.0.10 FPC 3.2.0 Win10 VM

Sanem

  • Full Member
  • ***
  • Posts: 168
Re: How to add MenuItem to Dock's PopUp
« Reply #6 on: February 18, 2021, 12:39:18 pm »
1. You are replying to a 10 year old thread!

2. Phil has not visited the forum since October 2018.

3. The Carbon API is 32 bit and was largely removed from macOS in Catalina in 2019 along with the ability to run 32 bit applications.


You are right and I am aware of carbon removal, but I meant to keep this conversation here to help other people find it in future, and I meant to other people like you see my question and suggest a solution if they have one, that's because I mentioned my mac version in signature too.
Regards and thanks
Lazarus trunk 2.1.0, FPC 3.3.1
Windows 10 64x, macOS Catalina 10.15, Linux Zorin 15.2 - Manjaro

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1683
  • Former Delphi 1-7, 10.2 user
Re: How to add MenuItem to Dock's PopUp
« Reply #7 on: February 18, 2021, 12:47:34 pm »
For a Cocoa widgetset solution I suggest you start a new thread in the Cocoa sub-forum rather than here in the Carbon sub-forum as Carbon development has now ceased.
Lazarus 2.3, FPC 3.3.1 macOS 12.0.1 x86_64 Xcode 13.1
Lazarus 2.3, FPC 3.3.1 macOS 12.0.1 aarch64 Xcode 13.1
Lazarus 2.3, FPC 3.2.2 FreeBSD 13.0 amd64 VM
Lazarus 2.3, FPC 3.2.2 FreeBSD 12.2 amd64 VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 VM
Lazarus 2.0.10 FPC 3.2.0 Win10 VM

 

TinyPortal © 2005-2018