ui_extension::extension_base Class Reference

Base class for ui_extension::window and ui_extension::visualisation classes. More...

#include <base.h>

Inheritance diagram for ui_extension::extension_base:

service_base ui_extension::visualisation ui_extension::window ui_extension::menu_window ui_extension::playlist_window ui_extension::splitter_window List of all members.

Public Member Functions

virtual void export_config (stream_writer *p_writer, abort_callback &p_abort) const
 Get instance configuration data. This differs from get_config, in that what is written is intended to be transferable between different foobar2000 installations on different computers (i.e. self-contained).
virtual void get_config (stream_writer *p_writer, abort_callback &p_abort) const
 Get instance configuration data.
virtual const GUID & get_extension_guid () const =0
 Get unique ID of extension.
virtual void get_menu_items (menu_hook_t &p_hook)
 Retrieve menu items to be displayed in the host menu.
virtual void get_name (pfc::string_base &out) const =0
 Get a user-readable name of the extension.
virtual bool have_config_popup () const
 Gets whether the extension has a modal configuration window.
virtual void import_config (stream_reader *p_reader, t_size p_size, abort_callback &p_abort)
 Set instance configuration data. This differs from set_config in that the data will be of that returned by export_config.
virtual void set_config (stream_reader *p_reader, t_size p_size, abort_callback &p_abort)
 Set instance configuration data.
virtual bool show_config_popup (HWND wnd_parent)
 Displays a modal configuartion dialog.

Detailed Description

Base class for ui_extension::window and ui_extension::visualisation classes.


Member Function Documentation

virtual void ui_extension::extension_base::export_config stream_writer *  p_writer,
abort_callback &  p_abort
const [inline, virtual]
 

Get instance configuration data. This differs from get_config, in that what is written is intended to be transferable between different foobar2000 installations on different computers (i.e. self-contained).

Note:
The default implementation calls get_config for compatibility only. Be sure that you override if you need to.
Exceptions:
Throws pfc::exception on failure
Parameters:
[out] p_writer Pointer to stream receiving configuration data
[in] p_abort Signals abort of operation

virtual void ui_extension::extension_base::get_config stream_writer *  p_writer,
abort_callback &  p_abort
const [inline, virtual]
 

Get instance configuration data.

Remarks:
Must not be used by single instance extensions.
Note:
Consider compatibility with future versions of you own component when deciding upon a data format. You may wish to change what is written by this function in the future. If you prepare for this in advance, you won't have to take measures such as changing your extension GUID to avoid incompatibility.
Exceptions:
Throws pfc::exception on failure
Parameters:
[out] p_writer Pointer to stream receiving configuration data
[in] p_abort Signals abort of operation

virtual const GUID& ui_extension::extension_base::get_extension_guid  )  const [pure virtual]
 

Get unique ID of extension.

This GUID is used to identify a specific extension.

Returns:
extension GUID

virtual void ui_extension::extension_base::get_menu_items menu_hook_t &  p_hook  )  [inline, virtual]
 

Retrieve menu items to be displayed in the host menu.

Parameters:
[in] p_hook The interface you use to add your menu items

virtual void ui_extension::extension_base::get_name pfc::string_base &  out  )  const [pure virtual]
 

Get a user-readable name of the extension.

Warning:
Do not use the name to identify extensions; use extension GUIDs instead.
Parameters:
[out] out receives the name of the extension, e.g. "Spectrum analyser"
See also:
get_extension_guid

virtual bool ui_extension::extension_base::have_config_popup  )  const [inline, virtual]
 

Gets whether the extension has a modal configuration window.

The window is exposed through show_config_popup()

Returns:
true iff a configuration window is exposed through show_config_popup

virtual void ui_extension::extension_base::import_config stream_reader *  p_reader,
t_size  p_size,
abort_callback &  p_abort
[inline, virtual]
 

Set instance configuration data. This differs from set_config in that the data will be of that returned by export_config.

Remarks:
  • Only called before enabling/window creation.
Note:
The default implementation calls set_config for compatibility only. Be sure that you override if you need to.
Exceptions:
Throws pfc::exception on failure
Parameters:
[in] p_reader Pointer to configuration data stream
[in] p_size Size of data in stream
[in] p_abort Signals abort of operation

virtual void ui_extension::extension_base::set_config stream_reader *  p_reader,
t_size  p_size,
abort_callback &  p_abort
[inline, virtual]
 

Set instance configuration data.

Remarks:
  • Only called before enabling/window creation.
  • Must not be used by single instance extensions.
  • You should also make sure you deal with the case of an empty stream
Exceptions:
Throws pfc::exception on failure
Parameters:
[in] p_reader Pointer to configuration data stream
[in] p_size Size of data in stream
[in] p_abort Signals abort of operation

virtual bool ui_extension::extension_base::show_config_popup HWND  wnd_parent  )  [inline, virtual]
 

Displays a modal configuartion dialog.

Parameters:
[in] wnd_parent The window to use as the owner window for your configuration dialog
Returns:
false if the configuration did not change


The documentation for this class was generated from the following file:
Generated on Fri Apr 28 15:02:31 2006 for Columns UI SDK by  doxygen 1.4.6-NO