36 namespace boost {
namespace archive {
47 class PluginInterface;
121 typedef bool result_type;
122 template<
class InIt>
bool operator()(InIt first, InIt last)
const;
164 Wnd* FocusWnd()
const;
165 Wnd* GetWindowUnder(
const Pt& pt)
const;
166 unsigned int DeltaT()
const;
169 bool RenderingDragDropWnds()
const;
170 bool FPSEnabled()
const;
172 std::string FPSString()
const;
173 double MaxFPS()
const;
174 virtual X AppWidth()
const = 0;
175 virtual Y AppHeight()
const = 0;
176 unsigned int ButtonDownRepeatDelay()
const;
177 unsigned int ButtonDownRepeatInterval()
const;
178 unsigned int DoubleClickInterval()
const;
179 unsigned int MinDragTime()
const;
180 unsigned int MinDragDistance()
const;
181 bool DragDropWnd(
const Wnd* wnd)
const;
182 bool AcceptedDragDropWnd(
const Wnd* wnd)
const;
183 bool MouseButtonDown(
unsigned int bn)
const;
184 Pt MousePosition()
const;
185 Pt MouseMovement()
const;
187 bool MouseLRSwapped()
const;
188 const std::map<Key, Key>&
196 virtual std::set<std::pair<CPSize, CPSize> > FindWords(
const std::string& str)
const;
198 const boost::shared_ptr<StyleFactory>& GetStyleFactory()
const;
200 bool RenderCursor()
const;
201 const boost::shared_ptr<Cursor>& GetCursor()
const;
215 void SaveWndAsPNG(
const Wnd* wnd,
const std::string& filename)
const;
220 virtual void Exit(
int code) = 0;
225 virtual void HandleSystemEvents() = 0;
228 void SetFocusWnd(
Wnd* wnd);
229 virtual void Wait(
unsigned int ms);
230 void Register(
Wnd* wnd);
231 void RegisterModal(
Wnd* wnd);
232 void Remove(
Wnd* wnd);
233 void WndDying(
Wnd* wnd);
234 void MoveUp(
Wnd* wnd);
235 void MoveDown(
Wnd* wnd);
237 virtual boost::shared_ptr<ModalEventPump>
238 CreateModalEventPump(
bool& done);
246 void RegisterDragDropWnd(
Wnd* wnd,
const Pt& offset,
Wnd* originating_wnd);
247 void CancelDragDrop();
249 void RegisterTimer(
Timer& timer);
250 void RemoveTimer(
Timer& timer);
252 virtual void Enter2DMode() = 0;
253 virtual void Exit2DMode() = 0;
254 void EnableFPS(
bool b =
true);
255 void SetMaxFPS(
double max);
256 void EnableMouseButtonDownRepeat(
unsigned int delay,
unsigned int interval);
257 void SetDoubleClickInterval(
unsigned int interval);
258 void SetMinDragTime(
unsigned int time);
259 void SetMinDragDistance(
unsigned int distance);
279 void SetMouseLRSwapped(
bool swapped =
true);
282 void SetKeyMap(
const std::map<Key, Key>& key_map);
286 boost::shared_ptr<Font> GetFont(
const std::string& font_filename,
unsigned int pts);
290 boost::shared_ptr<Font> GetFont(
const std::string& font_filename,
unsigned int pts,
291 const std::vector<unsigned char>& file_contents);
295 template <
class CharSetIter>
296 boost::shared_ptr<Font> GetFont(
const std::string& font_filename,
unsigned int pts,
297 CharSetIter first, CharSetIter last);
302 template <
class CharSetIter>
303 boost::shared_ptr<Font> GetFont(
const std::string& font_filename,
unsigned int pts,
304 const std::vector<unsigned char>& file_contents,
305 CharSetIter first, CharSetIter last);
308 boost::shared_ptr<Font> GetFont(
const boost::shared_ptr<Font>& font,
unsigned int pts);
312 void FreeFont(
const std::string& font_filename,
unsigned int pts);
317 boost::shared_ptr<Texture> StoreTexture(
Texture* texture,
const std::string& texture_name);
319 boost::shared_ptr<Texture> StoreTexture(
const boost::shared_ptr<Texture> &texture,
const std::string& texture_name);
320 boost::shared_ptr<Texture> GetTexture(
const std::string& name,
bool mipmap =
false);
321 void FreeTexture(
const std::string& name);
323 void SetStyleFactory(
const boost::shared_ptr<StyleFactory>& factory);
325 void RenderCursor(
bool render);
326 void SetCursor(
const boost::shared_ptr<Cursor>& cursor);
329 static GUI* GetGUI();
330 static void RenderWindow(
Wnd* wnd);
343 GUI(
const std::string& app_name);
347 void ProcessBrowseInfo();
348 virtual void RenderBegin() = 0;
349 virtual void Render();
350 virtual void RenderEnd() = 0;
353 void SetFPS(
double FPS);
354 void SetDeltaT(
unsigned int delta_t);
357 virtual void Run() = 0;
360 bool ProcessBrowseInfoImpl(
Wnd* wnd);
361 Wnd* ModalWindow()
const;
368 static boost::shared_ptr<GUIImpl> s_impl;
371 friend struct GUIImpl;
381 bool GUI::OrCombiner::operator()(InIt first, InIt last)
const
384 while (first != last)
385 retval |=
static_cast<bool>(*first++);
389 template <
class CharSetIter>
390 boost::shared_ptr<Font>
GUI::GetFont(
const std::string& font_filename,
unsigned int pts,
391 CharSetIter first, CharSetIter last)
394 template <
class CharSetIter>
395 boost::shared_ptr<Font>
GUI::GetFont(
const std::string& font_filename,
unsigned int pts,
396 const std::vector<unsigned char>& file_contents,
397 CharSetIter first, CharSetIter last)