1 /* 2 * Copyright 2003-2008 Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT license. 4 * 5 * Authors: 6 * Jérôme Duval 7 * Oliver Ruiz Dorantes 8 * Atsushi Takamatsu 9 */ 10 #ifndef __HEVENTLIST_H__ 11 #define __HEVENTLIST_H__ 12 13 14 #include <ColumnListView.h> 15 #include <String.h> 16 17 18 enum { 19 kEventColumn, 20 kSoundColumn, 21 }; 22 23 24 class HEventRow : public BRow { 25 public: 26 HEventRow(const char* event_name, 27 const char* path); 28 virtual ~HEventRow(); 29 Name()30 const char* Name() const { return fName.String(); } Path()31 const char* Path() const { return fPath.String(); } 32 void Remove(const char* type); 33 void SetPath(const char* path); 34 35 private: 36 BString fName; 37 BString fPath; 38 }; 39 40 41 enum { 42 M_EVENT_CHANGED = 'SCAG' 43 }; 44 45 46 class HEventList : public BColumnListView { 47 public: 48 HEventList(const char* name = "EventList"); 49 virtual ~HEventList(); 50 void RemoveAll(); 51 void SetType(const char* type); 52 void SetPath(const char* path); 53 54 protected: 55 virtual void SelectionChanged(); 56 57 private: 58 char* fType; 59 }; 60 61 62 #endif // __HEVENTLIST_H__ 63