#include <menu.h>

Public Types | |
| enum | { flag_disabled = 1<<0, flag_checked = 1<<1, sort_priority_base = 0x10000, sort_priority_dontcare = 0x80000000, sort_priority_last = infinite } |
| typedef mainmenu_commands | t_interface_entrypoint |
| typedef mainmenu_commands | t_interface |
| typedef service_base | t_interface_parent |
Public Member Functions | |
| virtual t_uint32 | get_command_count ()=0 |
| Retrieves number of implemented commands. Index parameter of other methods must be in 0....command_count-1 range. | |
| virtual GUID | get_command (t_uint32 p_index)=0 |
| Retrieves GUID of specified command. | |
| virtual void | get_name (t_uint32 p_index, pfc::string_base &p_out)=0 |
| Retrieves name of item, for list of commands to assign keyboard shortcuts to etc. | |
| virtual bool | get_description (t_uint32 p_index, pfc::string_base &p_out)=0 |
| Retrieves item's description for statusbar etc. | |
| virtual GUID | get_parent ()=0 |
| Retrieves GUID of owning menu group. | |
| virtual t_uint32 | get_sort_priority () |
| 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. | |
| virtual bool | get_display (t_uint32 p_index, pfc::string_base &p_text, t_uint32 &p_flags) |
| 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(). | |
| virtual void | execute (t_uint32 p_index, service_ptr_t< service_base > p_callback)=0 |
| Executes the command. p_callback parameter is reserved for future use and should be ignored / set to null pointer. | |
Static Public Member Functions | |
| static bool | g_execute (const GUID &p_guid, service_ptr_t< service_base > p_callback=service_ptr_t< service_base >()) |
| static bool | g_find_by_name (const char *p_name, GUID &p_guid) |
Static Public Attributes | |
| static const GUID | class_guid |
Reimplemented from service_base.
| anonymous enum |
| virtual t_uint32 mainmenu_commands::get_command_count | ( | ) | [pure virtual] |
Retrieves number of implemented commands. Index parameter of other methods must be in 0....command_count-1 range.
| virtual GUID mainmenu_commands::get_command | ( | t_uint32 | p_index | ) | [pure virtual] |
Retrieves GUID of specified command.
| virtual void mainmenu_commands::get_name | ( | t_uint32 | p_index, | |
| pfc::string_base & | p_out | |||
| ) | [pure virtual] |
Retrieves name of item, for list of commands to assign keyboard shortcuts to etc.
| virtual bool mainmenu_commands::get_description | ( | t_uint32 | p_index, | |
| pfc::string_base & | p_out | |||
| ) | [pure virtual] |
Retrieves item's description for statusbar etc.
| virtual GUID mainmenu_commands::get_parent | ( | ) | [pure virtual] |
Retrieves GUID of owning menu group.
| virtual t_uint32 mainmenu_commands::get_sort_priority | ( | ) | [inline, virtual] |
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.
| virtual bool mainmenu_commands::get_display | ( | t_uint32 | p_index, | |
| pfc::string_base & | p_text, | |||
| t_uint32 & | p_flags | |||
| ) | [inline, virtual] |
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().
| virtual void mainmenu_commands::execute | ( | t_uint32 | p_index, | |
| service_ptr_t< service_base > | p_callback | |||
| ) | [pure virtual] |
Executes the command. p_callback parameter is reserved for future use and should be ignored / set to null pointer.
| static bool mainmenu_commands::g_execute | ( | const GUID & | p_guid, | |
| service_ptr_t< service_base > | p_callback = service_ptr_t< service_base >() | |||
| ) | [static] |
| static bool mainmenu_commands::g_find_by_name | ( | const char * | p_name, | |
| GUID & | p_guid | |||
| ) | [static] |
const GUID mainmenu_commands::class_guid [static] |
Initial value:
{ 0x35077b8c, 0x6e70, 0x47ba, { 0xb9, 0xdd, 0xd5, 0x15, 0x0, 0xe1, 0x2f, 0x2e } }
1.5.5