HydrogenAudio

Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: andrew_smolko on 2006-10-29 21:40:46

Title: Custom popup menu in main menu
Post by: andrew_smolko on 2006-10-29 21:40:46
Hi!
Does anybody know how to create custom popup menu in the main menu? Do I have to do anything with mainmenu_group, mainmenu_group_popup or mainmenu_group_popup_impl?
Title: Custom popup menu in main menu
Post by: kdx on 2006-11-12 22:07:04
i did this with a mainmenu_group_popup:
the group and each command in it need to have a GUID

you basically derive from mainmenu_commands and return the guid of the group in get_parent and the guids of the commands in get_command
then you have to instanciate the commands and the group with

Code: [Select]
static mainmenu_commands_factory_t<derived_from_mainmenu_commands> foo;
static mainmenu_group_popup_factory mainmenu_group(guid_menu_group, mainmenu_groups::playback, mainmenu_commands::sort_priority_dontcare, "name_of_group");

where mainmenu_groups::playback is, where you want to see the menu group
Title: Custom popup menu in main menu
Post by: andrew_smolko on 2006-11-19 19:05:45
i did this with a mainmenu_group_popup:
the group and each command in it need to have a GUID

you basically derive from mainmenu_commands and return the guid of the group in get_parent and the guids of the commands in get_command
then you have to instanciate the commands and the group with

Code: [Select]
static mainmenu_commands_factory_t<derived_from_mainmenu_commands> foo;
static mainmenu_group_popup_factory mainmenu_group(guid_menu_group, mainmenu_groups::playback, mainmenu_commands::sort_priority_dontcare, "name_of_group");

where mainmenu_groups::playback is, where you want to see the menu group


Thanks!