foobar2000 SDK  2015-01-14
Data Structures | Functions | Variables
contextmenu.cpp File Reference

Go to the source code of this file.

Data Structures

class  myitem
 

Functions

void RunCalculatePeak (metadb_handle_list_cref data)
 
static void RunTestCommand (metadb_handle_list_cref data)
 

Variables

static contextmenu_group_popup_factory g_mygroup (guid_mygroup, contextmenu_groups::root,"Sample component", 0)
 
static contextmenu_item_factory_t< myitemg_myitem_factory
 
static const GUID guid_mygroup = { 0x572de7f4, 0xcbdf, 0x479a, { 0x97, 0x26, 0xa, 0xb0, 0x97, 0x47, 0x69, 0xe3 } }
 

Function Documentation

void RunCalculatePeak ( metadb_handle_list_cref  data)

Definition at line 64 of file decode.cpp.

64  {
65  try {
66  if (data.get_count() == 0) throw pfc::exception_invalid_params();
68  static_api_ptr_t<threaded_process>()->run_modeless(
69  cb,
72  "Sample component: peak scan");
73  } catch(std::exception const & e) {
74  popup_message::g_complain("Could not start peak scan process", e);
75  }
76 }
Template implementing reference-counting features of service_base. Intended for dynamic instantiation...
Definition: service_impl.h:4
Shows the item being currently processed.
Shows dual progress bars; implies flag_show_progress.
virtual t_size get_count() const =0
std::exception exception
Definition: primitives.h:193
HWND get_main_window()
Retrieves main app window. WARNING: this is provided for parent of dialog windows and such only; usin...
Shows the "abort" button.
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
Definition: service.h:55
static void g_complain(const char *what)
Helper template used to easily access core services. Usage: static_api_ptr_t api; api->doso...
Definition: service.h:533
static void RunTestCommand ( metadb_handle_list_cref  data)
static

Definition at line 88 of file contextmenu.cpp.

88  {
89  pfc::string_formatter message;
90  message << "This is a test command.\n";
91  if (data.get_count() > 0) {
92  message << "Parameters:\n";
93  for(t_size walk = 0; walk < data.get_count(); ++walk) {
94  message << data[walk] << "\n";
95  }
96  }
97  popup_message::g_show(message, "Blah");
98 }
size_t t_size
Definition: int_types.h:48
string8_fastalloc string_formatter
Definition: string_base.h:614
virtual t_size get_count() const =0
static void g_show(const char *p_msg, const char *p_title, t_icon p_icon=icon_information)
Static helper function instantiating the service and activating the message dialog. See show() for description of parameters.
Definition: popup_message.h:26

Variable Documentation

contextmenu_group_popup_factory g_mygroup(guid_mygroup, contextmenu_groups::root,"Sample component", 0)
static
contextmenu_item_factory_t<myitem> g_myitem_factory
static

Definition at line 85 of file contextmenu.cpp.

const GUID guid_mygroup = { 0x572de7f4, 0xcbdf, 0x479a, { 0x97, 0x26, 0xa, 0xb0, 0x97, 0x47, 0x69, 0xe3 } }
static

Definition at line 5 of file contextmenu.cpp.