Help - Search - Members - Calendar
Full Version: Main menu command full path
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
mixcherry
I'd like to create combobox with list of all main menu commands displayed with their full paths:
CODE
Edit/Clear
Edit/Redo
Edit/Selection/Crop
Edit/Sort/Sort by...
File/Exit
etc...

So I'm iterating over commands:
CODE
pfc::string8_fastalloc name;
service_enum_t<mainmenu_commands> e; service_ptr_t<mainmenu_commands> ptr;
while(e.next(ptr)) {
    const t_uint32 total = ptr->get_command_count();
    for (t_uint32 walk = 0; walk < total; ++walk) { ptr->get_name(walk, name); ... }
}

In addition to command's name (e.g. "Randomize"), I would like to retrieve its "path" (e.g. "Edit/Sort/Randomize"). Is there some simple way to achieve this, or do I have to construct the paths by myself?
foosion
You have to construct the path yourself. Note that there are two services related to that: mainmenu_group and mainmenu_group_popup.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.