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).
32 lines
547 B
C++
32 lines
547 B
C++
#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
|