Play 'round
include/Engine.h
00001 #ifndef __ENGINE_H_
00002 #define __ENGINE_H_
00003 
00004 #include <vector>
00005 #include <list>
00006 #include <float.h>
00007 
00008 #include "Widget.h"
00009 
00013 class Engine : public Widget
00014 {
00015 public:
00019   enum TextMode
00020   {
00021     TEXT_REPLACE,
00022     TEXT_APPEND
00023   };
00024 
00025   Engine();
00026   ~Engine();
00027 
00028   static SoundSourceMap* getSoundSources();
00029 
00030   bool onKeyDown(unsigned char key, float x, float y);
00031 
00032   virtual void draw();
00033   virtual bool handleDraw(float x, float y);
00034   virtual bool handleDrawEnd(float x, float y);
00035 
00036   void setSelectedWidget(Widget* widget) { m_selectedWidget = widget; }
00037 
00038   void setMouseCursorPosition(float, float);
00039   void setSize(int, int);
00040   void setCursorText(std::string text);
00041   void setTextMode(TextMode mode) { m_textMode = mode; }
00042   TextMode getTextMode() { return m_textMode; }
00043 
00044 private:
00045   RoundPad *m_newRoundPad;
00046   Widget* m_selectedWidget;
00047   Spiral* m_mouseCursor;
00048   Text* m_cursorText;
00049   TextMode m_textMode;
00050   Line m_xLine, m_yLine;
00051   int m_width, m_height;
00052   float m_maxRadius;
00053 };
00054 
00055 #endif
 All Classes Functions Enumerations