xref: /haiku/src/apps/mediaconverter/MediaFileListView.h (revision 239222b2369c39dc52df52b0a7cdd6cc0a91bc92)
1 // Copyright 1999, Be Incorporated. All Rights Reserved.
2 // Copyright 2000-2004, Jun Suzuki. All Rights Reserved.
3 // Copyright 2007, Stephan Aßmus. All Rights Reserved.
4 // This file may be used under the terms of the Be Sample Code License.
5 #ifndef MEDIA_FILE_LIST_VIEW_H
6 #define MEDIA_FILE_LIST_VIEW_H
7 
8 
9 #include <Entry.h>
10 #include <ListView.h>
11 
12 
13 class BMediaFile;
14 struct entry_ref;
15 
16 
17 class MediaFileListItem : public BStringItem {
18 public:
19 				MediaFileListItem(BMediaFile* file, const entry_ref& ref);
20 	virtual		~MediaFileListItem();
21 
22 	entry_ref	fRef;
23 	BMediaFile*	fMediaFile;
24 };
25 
26 
27 class MediaFileListView : public BListView {
28 public:
29 								MediaFileListView(BRect frame,
30 									uint32 resizingMode);
31 	virtual						~MediaFileListView();
32 
33 protected:
34 	virtual void				KeyDown(const char *bytes, int32 numBytes);
35 	virtual void				SelectionChanged();
36 
37 public:
38 			bool				AddMediaItem(BMediaFile* file,
39 									const entry_ref& ref);
40 
41 			void				SetEnabled(bool enabled);
42 			bool				IsEnabled() const;
43 
44 private:
45 			bool				fEnabled;
46 };
47 
48 #endif //MEDIACONVERTER_H
49