Crazy Eddie's GUI System  ${CEGUI_VERSION}
CEGuiIrrlichtBaseApplication.h
1 /***********************************************************************
2  created: 24/9/2004
3  author: Paul D Turner
4 *************************************************************************/
5 /***************************************************************************
6  * Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining
9  * a copy of this software and associated documentation files (the
10  * "Software"), to deal in the Software without restriction, including
11  * without limitation the rights to use, copy, modify, merge, publish,
12  * distribute, sublicense, and/or sell copies of the Software, and to
13  * permit persons to whom the Software is furnished to do so, subject to
14  * the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be
17  * included in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  ***************************************************************************/
27 #ifndef _CEGuiIrrlichtBaseApplication_h_
28 #define _CEGuiIrrlichtBaseApplication_h_
29 
30 #if defined(_WIN32)
31 # pragma comment(lib, "irrlicht.lib")
32 #if !defined(CEGUI_STATIC)
33 # if defined(_DEBUG)
34 # pragma comment(lib, "CEGUIIrrlichtRenderer_d.lib")
35 # else
36 # pragma comment(lib, "CEGUIIrrlichtRenderer.lib")
37 # endif
38 #else
39 # define _IRR_STATIC_LIB_ //Define this regardless if we are using a dll or not
40 # if defined(_DEBUG)
41 # pragma comment(lib, "CEGUIIrrlichtRenderer_Static_d.lib")
42 # else
43 # pragma comment(lib, "CEGUIIrrlichtRenderer_Static.lib")
44 # endif
45 #endif
46 #endif
47 
48 #include "CEGuiBaseApplication.h"
49 #include "CEGUI/Size.h"
50 
51 #include <irrlicht.h>
52 
53 namespace CEGUI
54 {
55  class IrrlichtEventPusher;
56 }
57 
59  public irr::IEventReceiver
60 {
61 public:
64 
65  // irrlicht event listener
66 #if CEGUI_IRR_SDK_VERSION >= 14
67  bool OnEvent(const irr::SEvent& event);
68 #else
69  bool OnEvent(irr::SEvent event);
70 #endif
71 
72 protected:
74  void checkWindowResize();
75 
76  // implementation of base class abstract methods.
77  void run();
78  void destroyWindow();
79  void beginRendering(const float elapsed);
80  void endRendering();
81 
82  bool processEvent(const irr::SEvent& event);
83 
84  bool OnKeyDown(irr::EKEY_CODE key, wchar_t wch, bool /*ctrl*/, bool /*shift*/);
85  bool OnKeyUp(irr::EKEY_CODE key, wchar_t /*wch*/, bool /*ctrl*/, bool /*shift*/);
86  bool OnMouse(irr::s32 x, irr::s32 y, irr::f32 w, irr::EMOUSE_INPUT_EVENT e);
87 
88  irr::IrrlichtDevice* d_device;
89  irr::video::IVideoDriver* d_driver;
90  irr::scene::ISceneManager* d_smgr;
91  irr::u32 d_lastTime;
92 
93  const CEGUI::IrrlichtEventPusher* d_eventPusher;
94 
97 };
98 
99 
100 #endif // end of guard _CEGuiIrrlichtBaseApplication_h_
Main namespace for Crazy Eddie&#39;s GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42
Definition: CEGuiIrrlichtBaseApplication.h:58
Definition: cegui/include/CEGUI/RendererModules/Irrlicht/EventPusher.h:37
CEGUI::Sizef d_lastDisplaySize
size of display last time a change was detected.
Definition: CEGuiIrrlichtBaseApplication.h:96
Base application abstract base class.
Definition: CEGuiBaseApplication.h:67