NRE_Window.hpp
Go to the documentation of this file.
1 
10  #pragma once
11 
15  #include "../Driver/Context/NRE_Context.hpp"
16 
17  #include <Utility/String/NRE_String.hpp>
18 
23  namespace NRE {
28  namespace Graphics {
29 
34  class Window {
35  private : // Fields
36  InternalWindow window;
37  WindowAttributes attributes;
38  WindowStatus status;
39  WindowStyle style;
40  Id id;
41  Context context;
43  public : // Methods
44  //## Constructor ##//
48  Window() = delete;
58  Window(Id const& i, Utility::String const& t, Math::Point2D<unsigned int> const& pos, Math::Vector2D<unsigned int> const& s, WindowStyle const& ws, ContextAttributes const& attr);
67  Window(Id const& i, Utility::String const& t, Math::Vector2D<unsigned int> const& s, WindowStyle const& ws, ContextAttributes const& attr);
68 
69  //## Copy Constructor ##//
74  Window(Window const& w) = delete;
75 
76  //## Copy Constructor ##//
81  Window(Window && w) = delete;
82 
83  //## Deconstructor ##//
87  ~Window();
88 
89  //## Getter ##//
93  bool isRunning() const;
97  Id getId() const;
98 
99  //## Methods ##//
104  void close(bool removeFromSystem = true);
108  void refresh();
109 
110  //## Assignment Operator ##//
116  Window& operator =(Window const& w) = delete;
122  Window& operator =(Window && w) = delete;
123 
124  //## Stream Operator ##//
129  Utility::String toString() const;
130 
131  };
132 
139  std::ostream& operator <<(std::ostream& stream, Window const& o);
140  }
141  }
142 
143  #include "NRE_Window.tpp"
Manage a graphics window.
Definition: NRE_Window.hpp:34
Manage a window style.
Definition: NRE_WindowStyle.hpp:37
Manage a window status.
Definition: NRE_WindowStatus.hpp:29
Window & operator=(Window const &w)=delete
Describe an OpenGL Context with a set of attributes.
Definition: NRE_Context.hpp:40
Utility::String toString() const
Definition: NRE_Window.cpp:48
Manage a window attributes.
Definition: NRE_WindowAttributes.hpp:30
Declaration of Graphics&#39;s API&#39;s Object : InternalWindow.
Declaration of Graphics&#39;s API&#39;s Object : WindowAttributes.
The NearlyRealEngine&#39;s global namespace.
void close(bool removeFromSystem=true)
Definition: NRE_Window.cpp:39
Declaration of Graphics&#39;s API&#39;s Object : WindowStatus.
Graphics&#39; API.
Regroup all attributes needed in a GL context, should be modified before creation.
Definition: NRE_ContextAttributes.hpp:52
Manage the internal os-dependant graphics window.
Definition: NRE_InternalWindow.hpp:34
bool isRunning() const
~Window()
Definition: NRE_Window.cpp:33