NLS Engine  v0.1
The Next Logical Step in game engine design.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
win32.h
Go to the documentation of this file.
00001 
00007 #pragma once
00008 
00009 // Standard Includes
00010 #include <string>
00011 
00012 // Library Includes
00013 #include <boost/any.hpp>
00014 #include <windows.h>
00015 #include <EngineConfig.h>
00016 
00017 // Local Includes
00018 #include "../sharedbase/OSInterface.h"
00019 #include "../sharedbase/Envelope_fwd.h"
00020 #include "../sharedbase/EventLogger.h"
00021 
00022 // Forward Declarations
00023 class PropertyMap;
00024 class MessageRouter;
00025 
00026 class win32 : public OSInterface {
00027 public:
00028   static void Make(PropertyMap*, MessageRouter*);
00029   
00030 public:
00031   ~win32() {
00032     PostQuitMessage(0);
00033   }
00034   virtual boost::any CreateGUIWindow(int, int, std::string, WINDOW_FLAGS = WINDOW_OUTER_SIZE);
00035   virtual void ShowInfo(std::string, std::string = NLS_I18N::TITLE_INFO);
00036   virtual void ShowWarning(std::string, std::string = NLS_I18N::TITLE_WARNING);
00037   virtual void ShowError(std::string, std::string = NLS_I18N::TITLE_CRITICAL);
00038   virtual void RouteMessages();
00039   virtual std::string GetPath(DIRS::TYPE);
00040   virtual void SetupTimer();
00041   virtual double GetElapsedTime();
00042   void Quit(EnvelopeSPTR e);
00043   
00044   void SetClientRect(int width, int height);
00045   
00046   static LRESULT CALLBACK Proc(HWND hwnd, UINT msg, WPARAM w, LPARAM l);
00047   
00048 private:
00049   win32( PropertyMap* gprops, MessageRouter* msgrouter ) : gprops(gprops), msgrouter(msgrouter), freq(0.0f), elapsed(0.0f), handle(nullptr) { }
00050   
00051 private:
00052   PropertyMap* gprops;
00053   MessageRouter* msgrouter;
00054   
00055   LARGE_INTEGER count;
00056   double freq, elapsed;
00057   HWND handle;
00058 };