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;
193 virtual std::set<std::pair<CPSize, CPSize> > FindWords(
const std::string& str)
const;
195 const boost::shared_ptr<StyleFactory>& GetStyleFactory()
const;
197 bool RenderCursor()
const;
198 const boost::shared_ptr<Cursor>& GetCursor()
const;
212 void SaveWndAsPNG(
const Wnd* wnd,
const std::string& filename)
const;
217 virtual void Exit(
int code) = 0;
222 virtual void HandleSystemEvents() = 0;
225 void SetFocusWnd(
Wnd* wnd);
226 virtual void Wait(
unsigned int ms);
227 void Register(
Wnd* wnd);
228 void RegisterModal(
Wnd* wnd);
229 void Remove(
Wnd* wnd);
230 void WndDying(
Wnd* wnd);
231 void MoveUp(
Wnd* wnd);
232 void MoveDown(
Wnd* wnd);
234 virtual boost::shared_ptr<ModalEventPump>
235 CreateModalEventPump(
bool& done);
243 void RegisterDragDropWnd(
Wnd* wnd,
const Pt& offset,
Wnd* originating_wnd);
244 void CancelDragDrop();
246 void RegisterTimer(
Timer& timer);
247 void RemoveTimer(
Timer& timer);
249 virtual void Enter2DMode() = 0;
250 virtual void Exit2DMode() = 0;
251 void EnableFPS(
bool b =
true);
252 void SetMaxFPS(
double max);
253 void EnableMouseButtonDownRepeat(
unsigned int delay,
unsigned int interval);
254 void SetDoubleClickInterval(
unsigned int interval);
255 void SetMinDragTime(
unsigned int time);
256 void SetMinDragDistance(
unsigned int distance);
277 boost::shared_ptr<Font> GetFont(
const std::string& font_filename,
unsigned int pts);
281 boost::shared_ptr<Font> GetFont(
const std::string& font_filename,
unsigned int pts,
282 const std::vector<unsigned char>& file_contents);
286 template <
class CharSetIter>
287 boost::shared_ptr<Font> GetFont(
const std::string& font_filename,
unsigned int pts,
288 CharSetIter first, CharSetIter last);
293 template <
class CharSetIter>
294 boost::shared_ptr<Font> GetFont(
const std::string& font_filename,
unsigned int pts,
295 const std::vector<unsigned char>& file_contents,
296 CharSetIter first, CharSetIter last);
299 boost::shared_ptr<Font> GetFont(
const boost::shared_ptr<Font>& font,
unsigned int pts);
303 void FreeFont(
const std::string& font_filename,
unsigned int pts);
308 boost::shared_ptr<Texture> StoreTexture(
Texture* texture,
const std::string& texture_name);
310 boost::shared_ptr<Texture> StoreTexture(
const boost::shared_ptr<Texture> &texture,
const std::string& texture_name);
311 boost::shared_ptr<Texture> GetTexture(
const std::string& name,
bool mipmap =
false);
312 void FreeTexture(
const std::string& name);
314 void SetStyleFactory(
const boost::shared_ptr<StyleFactory>& factory);
316 void RenderCursor(
bool render);
317 void SetCursor(
const boost::shared_ptr<Cursor>& cursor);
320 static GUI* GetGUI();
321 static void RenderWindow(
Wnd* wnd);
334 GUI(
const std::string& app_name);
338 void ProcessBrowseInfo();
339 virtual void RenderBegin() = 0;
340 virtual void Render();
341 virtual void RenderEnd() = 0;
344 void SetFPS(
double FPS);
345 void SetDeltaT(
unsigned int delta_t);
348 virtual void Run() = 0;
351 bool ProcessBrowseInfoImpl(
Wnd* wnd);
352 Wnd* ModalWindow()
const;
359 static boost::shared_ptr<GUIImpl> s_impl;
362 friend struct GUIImpl;
375 while (first != last)
376 retval |=
static_cast<bool>(*first++);
380 template <
class CharSetIter>
381 boost::shared_ptr<Font>
GUI::GetFont(
const std::string& font_filename,
unsigned int pts,
382 CharSetIter first, CharSetIter last)
385 template <
class CharSetIter>
386 boost::shared_ptr<Font>
GUI::GetFont(
const std::string& font_filename,
unsigned int pts,
387 const std::vector<unsigned char>& file_contents,
388 CharSetIter first, CharSetIter last)