foobar2000 SDK
2015-08-03
|
#include <menu.h>
Public Types | |
enum | { flag_disabled = 1<<0, flag_checked = 1<<1, flag_radiochecked = 1<<2, flag_defaulthidden = 1<<3, sort_priority_base = 0x10000, sort_priority_dontcare = 0x80000000, sort_priority_last = ~0 } |
Public Types inherited from service_base | |
typedef service_base | t_interface |
Public Member Functions | |
virtual void | execute (t_uint32 p_index, service_ptr_t< service_base > p_callback)=0 |
FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT (mainmenu_commands) | |
virtual GUID | get_command (t_uint32 p_index)=0 |
virtual t_uint32 | get_command_count ()=0 |
virtual bool | get_description (t_uint32 p_index, pfc::string_base &p_out)=0 |
virtual bool | get_display (t_uint32 p_index, pfc::string_base &p_text, t_uint32 &p_flags) |
virtual void | get_name (t_uint32 p_index, pfc::string_base &p_out)=0 |
virtual GUID | get_parent ()=0 |
virtual t_uint32 | get_sort_priority () |
Public Member Functions inherited from service_base | |
template<typename outPtr_t > | |
bool | cast (outPtr_t &outPtr) |
virtual int | service_add_ref ()=0 throw () |
virtual bool | service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid) |
template<class T > | |
bool | service_query_t (service_ptr_t< T > &p_out) |
virtual int | service_release ()=0 throw () |
Static Public Member Functions | |
static bool | g_execute (const GUID &p_guid, service_ptr_t< service_base > p_callback=NULL) |
static bool | g_execute_dynamic (const GUID &p_guid, const GUID &p_subGuid, service_ptr_t< service_base > p_callback=NULL) |
static bool | g_find_by_name (const char *p_name, GUID &p_guid) |
Additional Inherited Members | |
Protected Member Functions inherited from service_base | |
service_base () | |
~service_base () | |
anonymous enum |
Definition at line 20 of file menu.h.
|
pure virtual |
Executes the command. p_callback parameter is reserved for future use and should be ignored / set to null pointer.
Implemented in mainmenu_commands_sample.
mainmenu_commands::FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT | ( | mainmenu_commands | ) |
|
static |
Definition at line 11 of file mainmenu.cpp.
|
static |
Definition at line 3 of file mainmenu.cpp.
|
static |
Definition at line 18 of file mainmenu.cpp.
Retrieves GUID of specified command.
Implemented in mainmenu_commands_sample.
|
pure virtual |
Retrieves number of implemented commands. Index parameter of other methods must be in 0....command_count-1 range.
Implemented in mainmenu_commands_sample.
|
pure virtual |
Retrieves item's description for statusbar etc.
Implemented in mainmenu_commands_sample.
|
inlinevirtual |
Retrieves display string and display flags to use when menu is about to be displayed. If returns false, menu item won't be displayed. You can create keyboard-shortcut-only commands by always returning false from get_display().
Definition at line 45 of file menu.h.
|
pure virtual |
Retrieves name of item, for list of commands to assign keyboard shortcuts to etc.
Implemented in mainmenu_commands_sample.
|
pure virtual |
Retrieves GUID of owning menu group.
Implemented in mainmenu_commands_sample.
|
inlinevirtual |
Retrieves sorting priority of the command; the lower the number, the upper in the menu your commands will appear. Third party components should use sorting_priority_base and up (values below are reserved for internal use). In case of equal priority, order is undefined.
Definition at line 43 of file menu.h.