1/* 2 Copyright 2009 Vincent Duvert, vincent.duvert@free.fr 3 All rights reserved. Distributed under the terms of the MIT License. 4*/ 5#ifndef ICON_DISPLAY_H 6#define ICON_DISPLAY_H 7 8#include <Rect.h> 9#include <View.h> 10 11struct VectorIcon { 12 uint8* data; 13 size_t size; 14}; 15 16 17class BBitmap; 18 19 20class IconDisplay { 21public: 22 IconDisplay(); 23 ~IconDisplay(); 24 25 void Run(VectorIcon* icon, BRect frame); 26 inline bool IsRunning() { return fIsRunning; }; 27 inline BRect GetFrame() { return fFrame; }; 28 29 void ClearOn(BView* view); 30 void DrawOn(BView* view, uint32 delta); 31 32private: 33 bool fIsRunning; 34 uint8 fState; 35 36 int32 fTicks; 37 int32 fDelay; 38 39 BBitmap* fBitmap; 40 BRect fFrame; 41}; 42 43#endif 44