00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024
00025 #ifndef SFML_WINDOWIMPL_HPP
00026 #define SFML_WINDOWIMPL_HPP
00027
00029
00031 #include <SFML/Config.hpp>
00032 #include <SFML/System/NonCopyable.hpp>
00033 #include <SFML/Window/VideoMode.hpp>
00034 #include <SFML/Window/WindowHandle.hpp>
00035 #include <set>
00036 #include <string>
00037
00038 class sfEvent;
00039 class sfWindowListener;
00040
00041
00042 namespace sf_private
00043 {
00047 class sfWindowImpl : sfNonCopyable
00048 {
00049 public :
00050
00057 static sfWindowImpl* New();
00058
00069 static sfWindowImpl* New(sfVideoMode Mode, const std::string& Title, bool Fullscreen);
00070
00079 static sfWindowImpl* New(sfWindowHandle Handle);
00080
00081 public :
00082
00087 virtual ~sfWindowImpl();
00088
00095 void AddListener(sfWindowListener* Listener);
00096
00103 void RemoveListener(sfWindowListener* Listener);
00104
00111 unsigned int GetWidth() const;
00112
00119 unsigned int GetHeight() const;
00120
00127 unsigned int GetDepthBits() const;
00128
00135 unsigned int GetStencilBits() const;
00136
00141 void SetCurrent() const;
00142
00147 virtual void Display() = 0;
00148
00153 virtual void ProcessEvents() = 0;
00154
00161 virtual void UseVerticalSync(bool Enabled) = 0;
00162
00169 virtual void ShowMouseCursor(bool Show) = 0;
00170
00171 protected :
00172
00177 sfWindowImpl();
00178
00185 void SendEvent(const sfEvent& Event);
00186
00188
00190 unsigned int myWidth;
00191 unsigned int myHeight;
00192 unsigned int myDepthBits;
00193 unsigned int myStencilBits;
00194
00195 private :
00196
00201 virtual void MakeCurrent() const = 0;
00202
00204
00206 static const sfWindowImpl* ourCurrent;
00207
00209
00211 std::set<sfWindowListener*> myListeners;
00212 };
00213
00214 }
00215
00216 #endif // SFML_WINDOWIMPL_HPP