1 /* 2 * Copyright 2006, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 */ 8 9 #ifndef ICON_VIEW_H 10 #define ICON_VIEW_H 11 12 #include <View.h> 13 14 #include "Icon.h" 15 16 class BBitmap; 17 class IconRenderer; 18 19 class IconView : public BView, 20 public IconListener { 21 public: 22 IconView(BRect frame, const char* name); 23 virtual ~IconView(); 24 25 // BView interface 26 virtual void AttachedToWindow(); 27 virtual void Draw(BRect updateRect); 28 29 // IconListener interface 30 virtual void AreaInvalidated(const BRect& area); 31 32 // IconView 33 void SetIcon(Icon* icon); 34 35 private: 36 BBitmap* fBitmap; 37 Icon* fIcon; 38 IconRenderer* fRenderer; 39 BRect fDirtyIconArea; 40 41 double fScale; 42 }; 43 44 #endif // ICON_VIEW_H 45