foobar2000 SDK
2015-08-03
|
#include <ui.h>
Public Member Functions | |
FB2K_MAKE_SERVICE_INTERFACE (ui_selection_holder, service_base) | |
virtual void | set_playlist_selection_tracking ()=0 |
virtual void | set_playlist_tracking ()=0 |
virtual void | set_selection (metadb_handle_list_cref data)=0 |
virtual void | set_selection_ex (metadb_handle_list_cref data, const GUID &type)=0 |
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 () |
Additional Inherited Members | |
Public Types inherited from service_base | |
typedef service_base | t_interface |
Protected Member Functions inherited from service_base | |
service_base () | |
~service_base () | |
Write interface and reference counter for the shared selection. The ui_selection_manager stores the selected items as a list. The ui_selection_holder service allows components to modify this list. It also serves as a reference count: the ui_selection_manager clears the stored selection when no component holds a reference to a ui_selection_holder.
When a window that uses the shared selection gets the focus, it should acquire a ui_selection_holder from the ui_selection_manager. If it contains selectable items, it should use the appropriate method to store its selected items as the shared selection. If it just wants to preserve the selection - for example so it can display it - it should merely store the acquired ui_selection_holder.
When the window loses the focus, it should release its ui_selection_holder. It should not use a set method to clear the selection
ui_selection_holder::FB2K_MAKE_SERVICE_INTERFACE | ( | ui_selection_holder | , |
service_base | |||
) |
|
pure virtual |
Sets selected items to playlist selection and enables tracking. When the playlist selection changes, the stored selection is automatically updated. Tracking ends when a set method is called on any ui_selection_holder or when the last reference to this ui_selection_holder is released.
|
pure virtual |
Sets selected items to the contents of the active playlist and enables tracking. When the active playlist or its contents changes, the stored selection is automatically updated. Tracking ends when a set method is called on any ui_selection_holder or when the last reference to this ui_selection_holder is released.
|
pure virtual |
Sets selected items.
|
pure virtual |
Sets selected items and type of selection holder.
type | Specifies type of selection. Values same as contextmenu_item caller IDs. |