00001
00002
00003
00004
00005 #ifndef LIBWIISPRITE_LAYERMANAGER
00006 #define LIBWIISPRITE_LAYERMANAGER
00007
00008 #include <stdlib.h>
00009 #include <gccore.h>
00010 #include "layer.h"
00011
00013 namespace wsp{
00015 class LayerManager{
00016 public:
00019 LayerManager(u32 boundary);
00021 virtual ~LayerManager();
00022
00026 void Append(Layer* layer);
00031 void Insert(Layer* layer, u32 index);
00035 void Remove(Layer* layer);
00038 void RemoveAll();
00039
00044 Layer* GetLayerAt(u32 index) const;
00048 u32 GetSize() const;
00049
00056 void SetViewWindow(s32 x, s32 y, u32 width, u32 height);
00057
00062 void Draw(s32 x, s32 y) const;
00063 protected:
00064 u32 _width,
00065 _height;
00066 s32 _x,
00067 _y;
00068 private:
00069 Layer** _layers;
00070 u32 _size,
00071 _boundary;
00072 };
00073 };
00074
00107 #endif