*
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include "Window.h"
|
||||
|
||||
|
||||
namespace LifeCore{
|
||||
class WindowWin : public Window
|
||||
{
|
||||
public:
|
||||
/*virtual ~RenderWindow(void) {}
|
||||
virtual void Update() = 0;
|
||||
virtual void SetCaption(const String& caption) = 0;
|
||||
virtual int GetWindowHandle() = 0;
|
||||
virtual int GetWidth() = 0;
|
||||
virtual int GetHeight() = 0;
|
||||
virtual const String& GetCaption() = 0;*/
|
||||
|
||||
WindowWin();
|
||||
~WindowWin(void);
|
||||
bool IsKeyPressed(KeyCodes::Key key);
|
||||
//void AddWindowDemander(IWindowDemander* demander);
|
||||
void Update();
|
||||
void SetCaption(const String& caption);
|
||||
int GetWindowHandle(){return (int)g_hwnd;}
|
||||
void SetSize(int w, int h);
|
||||
bool IsFullScreen();
|
||||
void SetFullScreen(bool state);
|
||||
bool SwitchMode(bool fullscreen);
|
||||
void SetFullscreenMode(LifeCore::DisplayMode mode);
|
||||
|
||||
void OnActivate();
|
||||
void OnDeactivate();
|
||||
void OnResize();
|
||||
//void OnInput();
|
||||
bool IsActive();
|
||||
bool IsModeSwitching();
|
||||
void SetCursorVisible(bool state);
|
||||
bool IsCursorVisible();
|
||||
void CenterWindow();
|
||||
|
||||
int GetWidth()
|
||||
{
|
||||
return width;
|
||||
}
|
||||
virtual int GetHeight()
|
||||
{
|
||||
return height;
|
||||
}
|
||||
const String& GetCaption()
|
||||
{
|
||||
return caption;
|
||||
}
|
||||
void SetAltEnterLocked(bool state)
|
||||
{
|
||||
bAltEnterLocked = state;
|
||||
}
|
||||
bool IsAltEnterLocked()
|
||||
{
|
||||
return bAltEnterLocked;
|
||||
}
|
||||
protected:
|
||||
KeyCodes::Key ConvertKeyCode(unsigned long key_code);
|
||||
std::vector<IWindowDemander*> window_demanders;
|
||||
bool bAltEnterLocked;
|
||||
HINSTANCE g_hInst;
|
||||
HWND g_hwnd;
|
||||
DEVMODE mode;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user