1 /* 2 * Copyright 2002-2006, Haiku, Inc. 3 * Distributed under the terms of the MIT license. 4 * 5 * Authors: 6 * Oliver Siebenmarck 7 * Andrew McCall, mccall@digitalparadise.co.uk 8 * Michael Wilber 9 */ 10 #ifndef TRANSLATOR_LIST_VIEW_H 11 #define TRANSLATOR_LIST_VIEW_H 12 13 14 #include <ListView.h> 15 #include <TranslationDefs.h> 16 17 18 class TranslatorItem : public BStringItem { 19 public: 20 TranslatorItem(translator_id id, const char* name); 21 virtual ~TranslatorItem(); 22 23 translator_id ID() const { return fID; } 24 25 private: 26 translator_id fID; 27 }; 28 29 class TranslatorListView : public BListView { 30 public: 31 TranslatorListView(BRect rect, const char *name, 32 list_view_type type = B_SINGLE_SELECTION_LIST); 33 virtual ~TranslatorListView(); 34 35 virtual void MessageReceived(BMessage *message); 36 virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *msg); 37 38 void SortItems(); 39 }; 40 41 #endif // TRANSLATOR_LIST_VIEW_H 42