1 /* 2 * Copyright 2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef ICON_VIEW_H 6 #define ICON_VIEW_H 7 8 9 #include <View.h> 10 11 12 class IconView : public BView { 13 public: 14 IconView(BRect rect, const char* name, 15 uint32 resizeMode = B_FOLLOW_LEFT | B_FOLLOW_TOP); 16 virtual ~IconView(); 17 18 virtual void AttachedToWindow(); 19 virtual void Draw(BRect updateRect); 20 21 virtual void MouseDown(BPoint where); 22 23 void SetTo(entry_ref* file); 24 void ShowIconHeap(bool show); 25 26 private: 27 BBitmap* fIcon; 28 BBitmap* fHeapIcon; 29 }; 30 31 #endif // ICON_VIEW_H 32