1 /* 2 * Copyright 2007 Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com 7 * Ryan Leavengood, leavengood@gmail.com 8 */ 9 #ifndef MESSAGED_ITEM_H 10 #define MESSAGED_ITEM_H 11 12 13 #include <Window.h> 14 #include <ListItem.h> 15 #include <Message.h> 16 #include <ListItem.h> 17 18 19 class MessagedItem : public BStringItem { 20 public: 21 MessagedItem(const char* label, BMessage* information) : BStringItem(label) 22 { 23 fMessage = information; 24 } 25 26 ~MessagedItem() 27 { 28 delete fMessage; 29 } 30 31 BMessage* getMessage() 32 { 33 return fMessage; 34 } 35 36 protected: 37 BMessage* fMessage; 38 39 }; 40 41 42 #endif /* MESSAGED_ITEM_H */ 43 44