40 #ifndef EVENTGAMEWINDOW_CPP
41 #define EVENTGAMEWINDOW_CPP
43 #include "eventgamewindow.h"
44 #include "stringtool.h"
45 #include "exception.h"
76 {
Data=0; construct(Raw_); }
79 {
Data=0; construct(GWEventID, First, Second); }
119 return "GAME_WINDOW_NONE";
121 return "GAME_WINDOW_SHOWN";
123 return "GAME_WINDOW_HIDDEN";
125 return "GAME_WINDOW_EXPOSED";
127 return "GAME_WINDOW_MOVED";
129 return "GAME_WINDOW_RESIZED";
131 return "GAME_WINDOW_SIZE_CHANGED";
133 return "GAME_WINDOW_MINIMIZED";
135 return "GAME_WINDOW_MAXIMIZED";
137 return "GAME_WINDOW_RESTORED";
139 return "GAME_WINDOW_ENTER";
141 return "GAME_WINDOW_LEAVE";
143 return "GAME_WINDOW_FOCUS_GAINED";
145 return "GAME_WINDOW_FOCUS_LOST";
147 return "GAME_WINDOW_CLOSE";
149 throw(
"Unhandled EventGameWindow::GameWindowEventID reached during eventid to String conversion.");
174 void EventGameWindow::construct(
RawEvent Raw_)
179 switch (Raw_.window.event)
181 case SDL_WINDOWEVENT_NONE:
183 case SDL_WINDOWEVENT_SHOWN:
185 case SDL_WINDOWEVENT_HIDDEN:
187 case SDL_WINDOWEVENT_EXPOSED:
189 case SDL_WINDOWEVENT_MOVED:
191 case SDL_WINDOWEVENT_RESIZED:
193 case SDL_WINDOWEVENT_SIZE_CHANGED:
195 case SDL_WINDOWEVENT_MINIMIZED:
197 case SDL_WINDOWEVENT_MAXIMIZED:
199 case SDL_WINDOWEVENT_RESTORED:
201 case SDL_WINDOWEVENT_ENTER:
203 case SDL_WINDOWEVENT_LEAVE:
205 case SDL_WINDOWEVENT_FOCUS_GAINED:
207 case SDL_WINDOWEVENT_FOCUS_LOST:
209 case SDL_WINDOWEVENT_CLOSE:
212 throw(
"Unhandled EventGameWindow::GameWindowEventID reached during event creation.");
214 construct(GWEventID, Raw_.window.data1, Raw_.window.data2);
219 this->
Data=
new EventGameWindowData(GWEventID,First, Second);
236 Doc->GetFirstChild() >> Ev;