1 /* 2 * Copyright 2005, Jérôme Duval. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Inspired by SoundCapture from Be newsletter (Media Kit Basics: Consumers and Producers) 6 */ 7 8 #ifndef SOUNDLISTVIEW_H 9 #define SOUNDLISTVIEW_H 10 11 #include <ListView.h> 12 13 class SoundListView : public BListView { 14 public: 15 SoundListView(const BRect & area, const char * name, uint32 resize); 16 virtual ~SoundListView(); 17 18 virtual void Draw(BRect updateRect); 19 virtual void AttachedToWindow(); 20 }; 21 22 23 #include <ListItem.h> 24 25 class SoundListItem : public BStringItem { 26 public: 27 SoundListItem(const BEntry & entry, bool isTemp); 28 virtual ~SoundListItem(); 29 Entry()30 BEntry & Entry() { return fEntry; } IsTemp()31 bool IsTemp() { return fIsTemp; } SetTemp(bool isTemp)32 void SetTemp(bool isTemp) { fIsTemp = isTemp; } 33 private: 34 BEntry fEntry; 35 bool fIsTemp; 36 }; 37 38 39 #endif /* SOUNDLISTVIEW_H */ 40 41