1 /*****************************************************************************
2 * playlist_manager.hpp: Header for the playlist manager
3 *****************************************************************************
4 * Copyright (C) 1999-2005 the VideoLAN team
7 * Authors: Clément Stenac <zorglub@videolan.org>
8 * Gildas Bazin <gbazin@videolan.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #ifndef _WXVLC_PLAYLIST_MANAGER_H_
26 #define _WXVLC_PLAYLIST_MANAGER_H_
28 #include "wxwidgets.hpp"
29 #include <wx/treectrl.h>
34 class PlaylistManager: public wxPanel
38 PlaylistManager( intf_thread_t *p_intf, wxWindow *p_parent );
39 virtual ~PlaylistManager();
44 int i_items_to_append;
47 DECLARE_EVENT_TABLE();
51 void CreateNode( playlist_item_t*, wxTreeItemId );
52 void UpdateNode( playlist_item_t*, wxTreeItemId );
53 void UpdateNodeChildren( playlist_item_t*, wxTreeItemId );
54 void UpdateTreeItem( wxTreeItemId );
56 void UpdateItem( int );
57 void AppendItem( wxCommandEvent& );
58 void RemoveItem( int );
60 wxTreeItemId FindItem( wxTreeItemId, int );
63 void OnActivateItem( wxTreeEvent& event );
65 void OnPlaylistEvent( wxCommandEvent& event );
67 /* Simple cache for FindItem() */
69 wxTreeItemId cached_item;
71 intf_thread_t *p_intf;
72 playlist_t *p_playlist;
79 } // end of wxvlc namespace