Operators |
set_tray_icon_context_menu — Sets a context menu for the tray icon.
set_tray_icon_context_menu( : : TrayIconHandle, MenuStructure : )
set_tray_icon_context_menu sets a context menu for the tray icon.
The context menu for the tray icon is defined with the parameter MenuStructure. Every string entry in tuple MenuStructure leads to an entry in the context menu. Sub menus can be created with an indentation by two spaces, a separator is defined with the text '-'. Checks or explicitly non-checked entried are created with the prefixes '[x] ' and '[ ] '.
To receive the event that an entry in the context menu was selected, the tray icon must be created with a message queue in create_tray_icon or create_tray_icon_image. Messages can be taken from this message queue with the help of operator dequeue_message. Possible messages are listed in the description of create_tray_icon.
Find more information about the Notification extension package in the introduction to this chapter.
handle to the tray icon
context menu structure
Default value: ['entry1','entry2']
create_message_queue (MessageQueueHandle) create_tray_icon ('tooltip', 'folderopen', MessageQueueHandle, TrayIconHandle1) MenuStructure := \ [ 'entry1' \ ,' [ ] subentry1' \ ,' [X] subentry2' \ ,' subsubentry21' \ ,'entry2' \ ,'-' \ ,'-' \ ,'entry3' \ ,'-' \ ,'entry4' \ ] set_tray_icon_context_menu (TrayIconHandle, MenuStructure)
create_tray_icon, create_tray_icon_image
Foundation
Operators |