#include <Window.hpp>
Inheritance diagram for sf::Window:
Public Types | |
enum | Style { Resizable, Fixed, Fullscreen } |
Enumeration of window creation styles. More... | |
Public Member Functions | |
Window () | |
Default constructor. | |
Window (VideoMode Mode, const std::string &Title, Style WindowStyle=Resizable, int AntialiasingLevel=0) | |
Construct a new window. | |
Window (WindowHandle Handle, int AntialiasingLevel=0) | |
Construct the window from an existing control. | |
virtual | ~Window () |
Destructor. | |
void | Create (VideoMode Mode, const std::string &Title, Style WindowStyle=Resizable, int AntialiasingLevel=0) |
Create the window. | |
void | Create (WindowHandle Handle, int AntialiasingLevel=0) |
Create the window from an existing control. | |
unsigned int | GetWidth () const |
Get the width of the rendering region of the window. | |
unsigned int | GetHeight () const |
Get the height of the rendering region of the window. | |
unsigned int | GetDepthBits () const |
Get the depth buffer bits. | |
unsigned int | GetStencilBits () const |
Get the stencil buffer bits. | |
bool | GetEvent (Event &EventReceived) |
Get the event on top of events stack, if any. | |
void | UseVerticalSync (bool Enabled) |
Enable / disable vertical synchronization. | |
void | ShowMouseCursor (bool Show) |
Show or hide the mouse cursor. | |
void | SetPosition (int Left, int Top) |
Change the position of the window on screen. | |
bool | SetCurrent () const |
Set the window as the current target for rendering. | |
void | Display () |
Display the window on screen. | |
const Input & | GetInput () const |
Get the input manager of the window. | |
void | SetFramerateLimit (unsigned int Limit) |
Set the framerate at a fixed frequency. | |
float | GetFrameTime () const |
Get time elapsed since last frame. |
Definition at line 54 of file Window/Window.hpp.
enum sf::Window::Style |
Enumeration of window creation styles.
Resizable | Resizable window. |
Fixed | Fixed window (not resizable). |
Fullscreen | Fullscreen mode. |
Definition at line 62 of file Window/Window.hpp.
sf::Window::Window | ( | ) |
sf::Window::Window | ( | VideoMode | Mode, | |
const std::string & | Title, | |||
Style | WindowStyle = Resizable , |
|||
int | AntialiasingLevel = 0 | |||
) |
Construct a new window.
Mode | : Video mode to use | |
Title | : Title of the window | |
WindowStyle | : Window style (resizable by default) | |
AntialiasingLevel | : Level of antialiasing (0 by default, disabled) |
Definition at line 64 of file Window.cpp.
sf::Window::Window | ( | WindowHandle | Handle, | |
int | AntialiasingLevel = 0 | |||
) |
Construct the window from an existing control.
Handle | : Platform-specific handle of the control | |
AntialiasingLevel | : Level of antialiasing (0 by default, disabled) |
Definition at line 77 of file Window.cpp.
sf::Window::~Window | ( | ) | [virtual] |
void sf::Window::Create | ( | VideoMode | Mode, | |
const std::string & | Title, | |||
Style | WindowStyle = Resizable , |
|||
int | AntialiasingLevel = 0 | |||
) |
Create the window.
Mode | : Video mode to use | |
Title | : Title of the window | |
WindowStyle | : Window style (resizable by default) | |
AntialiasingLevel | : Level of antialiasing (0 by default, disabled) |
Reimplemented in sf::RenderWindow.
Definition at line 100 of file Window.cpp.
void sf::Window::Create | ( | WindowHandle | Handle, | |
int | AntialiasingLevel = 0 | |||
) |
Create the window from an existing control.
Handle | : Platform-specific handle of the control | |
AntialiasingLevel | : Level of antialiasing (0 by default, disabled) |
Reimplemented in sf::RenderWindow.
Definition at line 116 of file Window.cpp.
unsigned int sf::Window::GetWidth | ( | ) | const |
Get the width of the rendering region of the window.
Definition at line 125 of file Window.cpp.
unsigned int sf::Window::GetHeight | ( | ) | const |
Get the height of the rendering region of the window.
Definition at line 134 of file Window.cpp.
unsigned int sf::Window::GetDepthBits | ( | ) | const |
Get the depth buffer bits.
Definition at line 143 of file Window.cpp.
unsigned int sf::Window::GetStencilBits | ( | ) | const |
Get the stencil buffer bits.
Definition at line 152 of file Window.cpp.
bool sf::Window::GetEvent | ( | Event & | EventReceived | ) |
Get the event on top of events stack, if any.
EventReceived | : Event to fill, if any |
Reimplemented in sf::RenderWindow.
Definition at line 161 of file Window.cpp.
void sf::Window::UseVerticalSync | ( | bool | Enabled | ) |
Enable / disable vertical synchronization.
Enabled | : True to enable v-sync, false to deactivate |
Definition at line 179 of file Window.cpp.
void sf::Window::ShowMouseCursor | ( | bool | Show | ) |
Show or hide the mouse cursor.
Show | : True to show, false to hide |
Definition at line 189 of file Window.cpp.
void sf::Window::SetPosition | ( | int | Left, | |
int | Top | |||
) |
Change the position of the window on screen.
Only works for top-level windows
Left | : Left position | |
Top | : Top position |
Definition at line 199 of file Window.cpp.
bool sf::Window::SetCurrent | ( | ) | const |
Set the window as the current target for rendering.
Definition at line 216 of file Window.cpp.
void sf::Window::Display | ( | ) |
Display the window on screen.
Reimplemented in sf::RenderWindow.
Definition at line 231 of file Window.cpp.
const Input & sf::Window::GetInput | ( | ) | const |
Get the input manager of the window.
Definition at line 259 of file Window.cpp.
void sf::Window::SetFramerateLimit | ( | unsigned int | Limit | ) |
Set the framerate at a fixed frequency.
Limit | : Framerate limit, in frames per seconds (use 0 to disable limit) |
Definition at line 268 of file Window.cpp.
float sf::Window::GetFrameTime | ( | ) | const |
Get time elapsed since last frame.
Definition at line 277 of file Window.cpp.