Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: UI Panel: Get notified when Playlist Tree gets selected (Read 4414 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

UI Panel: Get notified when Playlist Tree gets selected

Is there a way of being notified if the Playlist Tree's node is active or selected?

Basically, in UI Panels, I want to get notified whenever one of the Playlist Tree's nodes get selected.

This shouldn't be confuse with UI Panel's "%playlistname%" or CBW Hooks's "%cwb_activelist%", whom both return the active playlist's name, which is not what im looking for.

Im looking for a way to know if/when a node itself is active, not the node's playlist. Or even better, the selected/active node's index, where "-1" or "null" is returned if none of the nodes are active/selected.
Something like %playlist_tree_selected_node%

Here is a link to Bowron's Playlist Tree page:
Playlist Tree

When you go to the link above, and scroll down to the " For Developers" section, you will see that his plugin can notify other pulgins when his Playlist Tree's nodes get selected, here is his piece of code for reference.

Code: [Select]
class callback_node
{
public:
   virtual bool   get_entries( pfc::list_base_t<metadb_handle_ptr> & list ) const = 0;
   virtual bool   is_leaf() const     = 0;
   virtual bool   is_folder() const   = 0;
   virtual bool   is_query() const    = 0;
   virtual int    get_entry_count() const = 0;
   virtual void   get_name( pfc::string_base & out ) const = 0;
};

class NOVTABLE node_select_callback : public service_base
{
public:
   virtual void on_node_select( const callback_node * node ) = 0;

   FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(node_select_callback);
};

const GUID node_select_callback::class_guid =
{ 0x9c2ae3c3, 0xdc04, 0x4042, { 0xad, 0xf3, 0x88, 0x84, 0x11, 0x7b, 0x49, 0x55 } };


Is there a component that can do this? that is, get the selected node's index?
I really need some help on this one, please help, someone, anyone. 

Thanks in advanced.
A teacher is a student in denial.

 

UI Panel: Get notified when Playlist Tree gets selected

Reply #1
Is there a way of being notified if the Playlist Tree's node is active or selected?

Im looking for a way to know if/when a node itself is active, not the node's playlist. Or even better, the selected/active node's index, where "-1" or "null" is returned if none of the nodes are active/selected.
Something like %playlist_tree_selected_node%



Anyone looking at this? I'd find it really useful too.

(Generally, I find that getting plug-ins to work together is difficult if not next-to-impossible in Foobar - it's its biggest weakness as far as I'm concerned).