xref: /haiku/src/apps/mediaplayer/playlist/PlaylistWindow.h (revision a1163de83ea633463a79de234b8742ee106531b2)
1 /*
2  * Copyright 2007, Haiku. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus 	<superstippi@gmx.de>
7  *		Fredrik Modéen 	<fredrik@modeen.se>
8  */
9 
10 #ifndef PLAYLIST_WINDOW_H
11 #define PLAYLIST_WINDOW_H
12 
13 
14 #include <Entry.h>
15 #include <Window.h>
16 
17 #include "ListenerAdapter.h"
18 
19 class BMenuBar;
20 class BMenuItem;
21 class CommandStack;
22 class Controller;
23 class Notifier;
24 class Playlist;
25 class PlaylistListView;
26 class RWLocker;
27 class BButton;
28 class BFilePanel;
29 
30 enum {
31 	M_PLAYLIST_REMOVE_AND_PUT_INTO_TRASH	= 'rmtr'
32 };
33 
34 class PlaylistWindow : public BWindow {
35 public:
36 								PlaylistWindow(BRect frame,
37 									Playlist* playlist,
38 									Controller* controller);
39 	virtual						~PlaylistWindow();
40 
41 	virtual	bool				QuitRequested();
42 	virtual	void				MessageReceived(BMessage* message);
43 
44 private:
45 			void				_CreateMenu(BRect& frame);
46 			void				_ObjectChanged(const Notifier* object);
47 			void				_SavePlaylist(const BMessage* filePanelMessage);
48 			void				_SavePlaylist(const entry_ref& ref);
49 			void				_SavePlaylist(BEntry& origEntry,
50 									BEntry& tempEntry, const char* finalName);
51 
52 			Playlist*			fPlaylist;
53 			PlaylistListView*	fListView;
54 
55 			BView*				fTopView;
56 			BMenuItem*			fUndoMI;
57 			BMenuItem*			fRedoMI;
58 
59 			RWLocker*			fLocker;
60 			CommandStack*		fCommandStack;
61 			ListenerAdapter		fCommandStackListener;
62 
63 			entry_ref			fSavedPlaylistRef;
64 };
65 
66 #endif // PLAYLIST_WINDOW_H
67