view EXCLUDE/GLTSF/include/App.hpp @ 4734:0c7c67d4e6ee

Added On_Char method to Window_Listener for WM_CHAR messages. Removed a lot of TSF code because part of it was wrong and part was too complicated. Added Clear method to clear the window. IME input should work in both windowed mode and fullscreen mode with these changes. I have tested on Windows XP SP3 and Windows 7 Ultimate in VirtualBox. When you type a character (with an IME or not), the console will show the code point as U+XXXX. You use Left Alt+Shift (or whatever you have it set to) to switch input languages as usual. Hit ESC to exit (or close the window in windowed mode). The program will pause before exiting so you can review the console output (press a key to exit).
author dewyatt
date Wed, 09 Jun 2010 00:03:54 -0400
parents 6032ada8b9e5
children 381d402a5e90
line wrap: on
line source

#ifndef APP_HPP
#define APP_HPP

#include "Window.hpp"

class App : public Window_Listener
{
public:
	App();
	virtual ~App();

	void Initialize();
	void Finalize();

	void Run();

	virtual void On_Close();
	virtual void On_Key_Down(int Key);
	virtual void On_Key_Up(int Key);
	virtual void On_Char(unsigned int Char);

private:
	static const int Width = 800;
	static const int Height = 600;
	static const int Bits_Per_Pixel = 32;
	static const bool Fullscreen = false;

	Window my_Window;
	bool my_Done;
};

#endif