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 00022 void Append(Layer* layer); 00027 void Insert(Layer* layer, u32 index); 00031 void Remove(Layer* layer); 00034 void RemoveAll(); 00035 00040 Layer* GetLayerAt(u32 index) const; 00044 u32 GetSize() const; 00045 00052 void SetViewWindow(s32 x, s32 y, u32 width, u32 height); 00053 00058 void Draw(s32 x, s32 y) const; 00059 protected: 00060 u32 _width, 00061 _height; 00062 s32 _x, 00063 _y; 00064 private: 00065 Layer** _layers; 00066 u32 _size, 00067 _boundary; 00068 }; 00069 }; 00070 00103 #endif