![]() |
Divide Framework 0.1
A free and open-source 3D Framework under heavy development
|
#include <WindowManager.h>
Classes | |
struct | MonitorData |
Public Member Functions | |
WindowManager () noexcept | |
~WindowManager () | |
void | hideAll () noexcept |
DisplayWindow * | createWindow (const WindowDescriptor &descriptor, ErrorCode &err) |
bool | destroyWindow (DisplayWindow *&window) |
void | drawToWindow (DisplayWindow &window) |
void | flushWindow () |
void | toggleFullScreen () const |
void | increaseResolution () |
void | decreaseResolution () |
void | stepResolution (bool increment) |
bool | setCursorPosition (I32 x, I32 y) noexcept |
void | snapCursorToCenter () |
DisplayWindow * | getFocusedWindow () noexcept |
const DisplayWindow * | getFocusedWindow () const noexcept |
DisplayWindow * | getHoveredWindow () noexcept |
const DisplayWindow * | getHoveredWindow () const noexcept |
DisplayWindow & | getWindow (I64 guid) |
const DisplayWindow & | getWindow (I64 guid) const |
DisplayWindow & | getWindow (U32 index) |
const DisplayWindow & | getWindow (U32 index) const |
DisplayWindow * | getWindowByID (U32 ID) noexcept |
const DisplayWindow * | getWindowByID (U32 ID) const noexcept |
const vector< MonitorData > & | monitorData () const noexcept |
DisplayWindow * | activeWindow () const noexcept |
size_t | pushActiveWindow (DisplayWindow *window) |
Returns the total number of active windows after the push. | |
size_t | popActiveWindow () |
Returns the remaining number of windows after the pop. | |
POINTER_R (DisplayWindow, mainWindow, nullptr) | |
Static Public Member Functions | |
static bool | SetGlobalCursorPosition (I32 x, I32 y) noexcept |
static vec2< I32 > | GetCursorPosition () noexcept |
static vec2< I32 > | GetGlobalCursorPosition () noexcept |
static U32 | GetMouseState (vec2< I32 > &pos, bool global) noexcept |
static void | SetCaptureMouse (bool state) noexcept |
static vec2< U16 > | GetFullscreenResolution () noexcept |
static void | CaptureMouse (bool state) noexcept |
static void | SetCursorStyle (CursorStyle style) |
static void | ToggleRelativeMouseMode (bool state) noexcept |
static bool | IsRelativeMouseMode () noexcept |
Protected Member Functions | |
ErrorCode | init (PlatformContext &context, RenderAPI renderingAPI, vec2< I16 > initialPosition, vec2< U16 > initialSize, WindowMode windowMode, I32 targetDisplayIndex) |
void | close () |
Static Protected Member Functions | |
static ErrorCode | ConfigureAPISettings (const PlatformContext &context, const WindowDescriptor &descriptor) |
static ErrorCode | ApplyAPISettings (const PlatformContext &context, RenderAPI api, DisplayWindow *targetWindow, DisplayWindow *activeWindow) |
static void | DestroyAPISettings (DisplayWindow *window) noexcept |
Protected Attributes | |
I64 | _mainWindowGUID { -1 } |
std::pair< vec2< U16 >, bool > | _resolutionChangeQueued |
PlatformContext * | _context { nullptr } |
vector< MonitorData > | _monitors |
vector< std::unique_ptr< DisplayWindow > > | _windows |
eastl::stack< DisplayWindow * > | _activeWindows |
Static Protected Attributes | |
static SDL_DisplayMode | s_mainDisplayMode |
static std::array< SDL_Cursor *, to_base(CursorStyle::COUNT)> | s_cursors = create_array<to_base(CursorStyle::COUNT), SDL_Cursor*>(nullptr) |
Friends | |
class | Application |
class | DisplayWindow |
Additional Inherited Members | |
![]() | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
NonCopyable (NonCopyable &&)=default | |
NonCopyable & | operator= (NonCopyable &&)=default |
NonCopyable ()=default | |
~NonCopyable ()=default | |
Definition at line 53 of file WindowManager.h.
|
noexcept |
Definition at line 63 of file WindowManager.cpp.
Divide::WindowManager::~WindowManager | ( | ) |
Definition at line 67 of file WindowManager.cpp.
|
inlinenoexcept |
Definition at line 63 of file WindowManager.inl.
|
staticprotected |
Definition at line 489 of file WindowManager.cpp.
|
staticnoexcept |
Definition at line 668 of file WindowManager.cpp.
|
protected |
Definition at line 213 of file WindowManager.cpp.
|
staticprotected |
Definition at line 427 of file WindowManager.cpp.
DisplayWindow * Divide::WindowManager::createWindow | ( | const WindowDescriptor & | descriptor, |
ErrorCode & | err | ||
) |
Definition at line 233 of file WindowManager.cpp.
void Divide::WindowManager::decreaseResolution | ( | ) |
Definition at line 616 of file WindowManager.cpp.
|
staticprotectednoexcept |
Definition at line 409 of file WindowManager.cpp.
bool Divide::WindowManager::destroyWindow | ( | DisplayWindow *& | window | ) |
Definition at line 384 of file WindowManager.cpp.
void Divide::WindowManager::drawToWindow | ( | DisplayWindow & | window | ) |
Definition at line 548 of file WindowManager.cpp.
void Divide::WindowManager::flushWindow | ( | ) |
Definition at line 573 of file WindowManager.cpp.
Definition at line 738 of file WindowManager.cpp.
|
inlinenoexcept |
Definition at line 93 of file WindowManager.inl.
|
inlinenoexcept |
Definition at line 80 of file WindowManager.inl.
Definition at line 72 of file WindowManager.cpp.
Definition at line 731 of file WindowManager.cpp.
|
inlinenoexcept |
Definition at line 119 of file WindowManager.inl.
|
inlinenoexcept |
Definition at line 106 of file WindowManager.inl.
Definition at line 745 of file WindowManager.cpp.
|
inline |
Definition at line 37 of file WindowManager.inl.
|
inline |
Definition at line 50 of file WindowManager.inl.
|
inline |
Definition at line 132 of file WindowManager.inl.
|
inline |
Definition at line 138 of file WindowManager.inl.
|
inlinenoexcept |
Definition at line 157 of file WindowManager.inl.
|
inlinenoexcept |
Definition at line 144 of file WindowManager.inl.
|
noexcept |
Definition at line 772 of file WindowManager.cpp.
void Divide::WindowManager::increaseResolution | ( | ) |
Definition at line 611 of file WindowManager.cpp.
|
protected |
Definition at line 77 of file WindowManager.cpp.
|
staticnoexcept |
Definition at line 726 of file WindowManager.cpp.
|
inlinenoexcept |
Definition at line 170 of file WindowManager.inl.
Divide::WindowManager::POINTER_R | ( | DisplayWindow | , |
mainWindow | , | ||
nullptr | |||
) |
|
inline |
Returns the remaining number of windows after the pop.
Definition at line 74 of file WindowManager.inl.
|
inline |
Returns the total number of active windows after the push.
Definition at line 68 of file WindowManager.inl.
|
staticnoexcept |
Definition at line 755 of file WindowManager.cpp.
Definition at line 673 of file WindowManager.cpp.
|
static |
Definition at line 710 of file WindowManager.cpp.
Definition at line 695 of file WindowManager.cpp.
void Divide::WindowManager::snapCursorToCenter | ( | ) |
Definition at line 760 of file WindowManager.cpp.
void Divide::WindowManager::stepResolution | ( | bool | increment | ) |
Definition at line 621 of file WindowManager.cpp.
void Divide::WindowManager::toggleFullScreen | ( | ) | const |
Definition at line 593 of file WindowManager.cpp.
|
staticnoexcept |
Definition at line 720 of file WindowManager.cpp.
|
friend |
Definition at line 124 of file WindowManager.h.
|
friend |
Definition at line 137 of file WindowManager.h.
|
protected |
Definition at line 150 of file WindowManager.h.
|
protected |
Definition at line 145 of file WindowManager.h.
|
protected |
Definition at line 143 of file WindowManager.h.
|
protected |
Definition at line 146 of file WindowManager.h.
Definition at line 144 of file WindowManager.h.
|
protected |
Definition at line 147 of file WindowManager.h.
|
staticprotected |
Definition at line 149 of file WindowManager.h.
|
staticprotected |
Definition at line 148 of file WindowManager.h.