00001 #ifndef LIBWIISPRITE_LAYERMANAGER 00002 #define LIBWIISPRITE_LAYERMANAGER 00003 00004 #include <stdlib.h> 00005 #include <gccore.h> 00006 #include "layer.h" 00007 00009 namespace wsp{ 00011 class LayerManager{ 00012 public: 00015 LayerManager(u32 boundary); 00017 virtual ~LayerManager(); 00018 00021 void Append(Layer* layer); 00025 void Insert(Layer* layer, u32 index); 00028 void Remove(Layer* layer); 00029 00033 Layer* GetLayerAt(u32 index) const; 00036 u32 GetSize() const; 00037 00043 void SetViewWindow(s32 x, s32 y, u32 width, u32 height); 00044 00048 void Draw(s32 x, s32 y) const; 00049 protected: 00050 u32 _width, 00051 _height; 00052 s32 _x, 00053 _y; 00054 private: 00055 Layer** _layers; 00056 u32 _size, 00057 _boundary; 00058 }; 00059 }; 00060 00061 #endif