![]() |
Divide Framework 0.1
A free and open-source 3D Framework under heavy development
|
#include <DisplayWindow.h>
Classes | |
struct | UserData |
struct | WindowEventArgs |
Public Types | |
using | EventListener = DELEGATE< bool, const WindowEventArgs & > |
Public Member Functions | |
virtual | ~DisplayWindow () override |
DisplayWindow (WindowManager &parent, PlatformContext &context) | |
ErrorCode | init (U32 windowFlags, WindowType initialType, const WindowDescriptor &descriptor) |
ErrorCode | destroyWindow () |
SDL_Window * | getRawWindow () const noexcept |
I32 | currentDisplayIndex () const noexcept |
bool | isHovered () const noexcept |
bool | hasFocus () const noexcept |
bool | minimized () const noexcept |
void | minimized (bool state) noexcept |
bool | maximized () const noexcept |
void | maximized (bool state) noexcept |
bool | hidden () const noexcept |
void | hidden (bool state) noexcept |
bool | decorated () const noexcept |
void | decorated (bool state) noexcept |
bool | fullscreen () const noexcept |
void | changeType (WindowType newType) |
void | changeToPreviousType () |
void | opacity (U8 opacity) noexcept |
U8 | prevOpacity () const noexcept |
bool | setDimensions (U16 width, U16 height) |
width and height get adjusted to the closest supported value | |
bool | setDimensions (vec2< U16 > dimensions) |
void | centerWindowPosition () |
Centering is also easier via SDL. | |
void | bringToFront () const noexcept |
vec2< U16 > | getDimensions () const noexcept |
vec2< U16 > | getPreviousDimensions () const noexcept |
Rect< I32 > | getBorderSizes () const noexcept |
vec2< U16 > | getDrawableSize () const noexcept |
vec2< I32 > | getPosition (bool global=false, bool offset=false) const |
void | setPosition (I32 x, I32 y, bool global=false, bool offset=false) |
Window positioning is handled by SDL. | |
void | setPosition (vec2< I32 > position, bool global=false) |
const char * | title () const noexcept |
template<typename... Args> | |
void | title (const char *format, Args &&...args) noexcept |
WindowHandle | handle () const noexcept |
void | addEventListener (WindowEvent windowEvent, const EventListener &listener) |
void | clearEventListeners (WindowEvent windowEvent) |
void | notifyListeners (WindowEvent event, const WindowEventArgs &args) |
void | destroyCbk (const DELEGATE< void > &destroyCbk) |
Rect< I32 > | windowViewport () const noexcept |
const Rect< I32 > & | renderingViewport () const noexcept |
void | renderingViewport (const Rect< I32 > &viewport) noexcept |
bool | grabState () const noexcept |
void | grabState (bool state) const noexcept |
bool | onSDLEvent (SDL_Event event) override |
GFX::CommandBufferQueue & | getCurrentCommandBufferQueue () |
PROPERTY_R (U32, initialDisplay, 0u) | |
The display on which this window was initially created on. | |
PROPERTY_R (U32, flags, 0u) | |
PROPERTY_R (WindowType, type, WindowType::COUNT) | |
PROPERTY_R (U8, opacity, U8_MAX) | |
PROPERTY_R (Uint32, windowID, 0u) | |
PROPERTY_RW (UserData, userData) | |
POINTER_R (DisplayWindow, parentWindow, nullptr) | |
![]() | |
GUIDWrapper () noexcept | |
GUIDWrapper (const GUIDWrapper &old) noexcept | |
GUIDWrapper (GUIDWrapper &&old) noexcept | |
virtual | ~GUIDWrapper ()=default |
FORCE_INLINE I64 | getGUID () const noexcept |
GUIDWrapper & | operator= (const GUIDWrapper &old)=delete |
GUIDWrapper & | operator= (GUIDWrapper &&other)=delete |
![]() | |
PlatformContextComponent (PlatformContext &context) noexcept | |
virtual | ~PlatformContextComponent ()=default |
PlatformContext & | context () noexcept |
const PlatformContext & | context () const noexcept |
![]() | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
NonCopyable (NonCopyable &&)=default | |
NonCopyable & | operator= (NonCopyable &&)=default |
![]() | |
SDLEventListener () noexcept | |
virtual | ~SDLEventListener () |
virtual bool | onSDLEvent (SDL_Event event)=0 |
U64 | listenerID () const noexcept |
Private Types | |
using | EventListeners = vector< DELEGATE< bool, WindowEventArgs > > |
Private Member Functions | |
void | restore () noexcept |
void | handleChangeWindowType (WindowType newWindowType) |
void | updateDrawableSize () noexcept |
Private Attributes | |
std::array< EventListeners, to_base(WindowEvent::COUNT)> | _eventListeners |
DELEGATE< void > | _destroyCbk |
FColour4 | _clearColour |
Rect< I32 > | _renderingViewport |
vec2< U16 > | _prevDimensions |
vec2< U16 > | _drawableSize |
WindowManager & | _parent |
SDL_Window * | _sdlWindow = nullptr |
WindowType | _previousType = WindowType::COUNT |
U8 | _prevOpacity = 255u |
std::array< GFX::CommandBufferQueue, Config::MAX_FRAMES_IN_FLIGHT > | _commandBufferQueues |
bool | _internalMoveEvent = false |
Did we generate the window move event? | |
bool | _internalResizeEvent = false |
Static Private Attributes | |
static I64 | s_cursorWindowGUID |
Additional Inherited Members | |
![]() | |
static I64 | generateGUID () noexcept |
![]() | |
NonCopyable ()=default | |
~NonCopyable ()=default | |
![]() | |
const I64 | _guid |
![]() | |
PlatformContext & | _context |
Definition at line 103 of file DisplayWindow.h.
using Divide::DisplayWindow::EventListener = DELEGATE<bool, const WindowEventArgs&> |
Definition at line 124 of file DisplayWindow.h.
|
private |
Definition at line 225 of file DisplayWindow.h.
|
overridevirtual |
Definition at line 26 of file DisplayWindow.cpp.
Divide::DisplayWindow::DisplayWindow | ( | WindowManager & | parent, |
PlatformContext & | context | ||
) |
Definition at line 16 of file DisplayWindow.cpp.
|
inline |
Definition at line 106 of file DisplayWindow.inl.
|
noexcept |
Definition at line 339 of file DisplayWindow.cpp.
void Divide::DisplayWindow::centerWindowPosition | ( | ) |
Centering is also easier via SDL.
Definition at line 344 of file DisplayWindow.cpp.
|
inline |
Definition at line 96 of file DisplayWindow.inl.
|
inline |
Definition at line 91 of file DisplayWindow.inl.
|
inline |
Definition at line 111 of file DisplayWindow.inl.
|
noexcept |
Definition at line 244 of file DisplayWindow.cpp.
|
inlinenoexcept |
Definition at line 81 of file DisplayWindow.inl.
|
noexcept |
Definition at line 348 of file DisplayWindow.cpp.
|
inline |
Definition at line 116 of file DisplayWindow.inl.
ErrorCode Divide::DisplayWindow::destroyWindow | ( | ) |
Definition at line 36 of file DisplayWindow.cpp.
|
inlinenoexcept |
Definition at line 45 of file DisplayWindow.inl.
Definition at line 250 of file DisplayWindow.cpp.
GFX::CommandBufferQueue & Divide::DisplayWindow::getCurrentCommandBufferQueue | ( | ) |
Definition at line 518 of file DisplayWindow.cpp.
Definition at line 507 of file DisplayWindow.cpp.
Definition at line 259 of file DisplayWindow.cpp.
Definition at line 327 of file DisplayWindow.cpp.
Definition at line 453 of file DisplayWindow.cpp.
|
inlinenoexcept |
Definition at line 40 of file DisplayWindow.inl.
|
noexcept |
Definition at line 410 of file DisplayWindow.cpp.
|
noexcept |
Definition at line 414 of file DisplayWindow.cpp.
|
noexcept |
Definition at line 105 of file DisplayWindow.cpp.
|
private |
Changing from one window type to another should also change display dimensions and position
Definition at line 418 of file DisplayWindow.cpp.
|
inlinenoexcept |
Definition at line 61 of file DisplayWindow.inl.
|
inlinenoexcept |
Definition at line 86 of file DisplayWindow.inl.
|
noexcept |
Definition at line 355 of file DisplayWindow.cpp.
ErrorCode Divide::DisplayWindow::init | ( | U32 | windowFlags, |
WindowType | initialType, | ||
const WindowDescriptor & | descriptor | ||
) |
Definition at line 52 of file DisplayWindow.cpp.
|
inlinenoexcept |
Definition at line 56 of file DisplayWindow.inl.
|
inlinenoexcept |
Definition at line 76 of file DisplayWindow.inl.
|
noexcept |
Definition at line 394 of file DisplayWindow.cpp.
|
inlinenoexcept |
Definition at line 71 of file DisplayWindow.inl.
|
noexcept |
Definition at line 378 of file DisplayWindow.cpp.
void Divide::DisplayWindow::notifyListeners | ( | WindowEvent | event, |
const WindowEventArgs & | args | ||
) |
Definition at line 112 of file DisplayWindow.cpp.
|
overridevirtual |
Implements Divide::SDLEventListener.
Definition at line 133 of file DisplayWindow.cpp.
|
noexcept |
Definition at line 301 of file DisplayWindow.cpp.
Divide::DisplayWindow::POINTER_R | ( | DisplayWindow | , |
parentWindow | , | ||
nullptr | |||
) |
|
inlinenoexcept |
Definition at line 66 of file DisplayWindow.inl.
Divide::DisplayWindow::PROPERTY_R | ( | U32 | , |
flags | , | ||
0u | |||
) |
Divide::DisplayWindow::PROPERTY_R | ( | U32 | , |
initialDisplay | , | ||
0u | |||
) |
The display on which this window was initially created on.
Divide::DisplayWindow::PROPERTY_R | ( | Uint32 | , |
windowID | , | ||
0u | |||
) |
Divide::DisplayWindow::PROPERTY_R | ( | WindowType | , |
type | , | ||
WindowType::COUNT | |||
) |
Divide::DisplayWindow::PROPERTY_RW | ( | UserData | , |
userData | |||
) |
Definition at line 127 of file DisplayWindow.inl.
Definition at line 514 of file DisplayWindow.cpp.
|
privatenoexcept |
Definition at line 371 of file DisplayWindow.cpp.
width and height get adjusted to the closest supported value
Definition at line 460 of file DisplayWindow.cpp.
Definition at line 503 of file DisplayWindow.cpp.
Window positioning is handled by SDL.
Definition at line 309 of file DisplayWindow.cpp.
Definition at line 51 of file DisplayWindow.inl.
|
inlinenoexcept |
Definition at line 101 of file DisplayWindow.inl.
|
noexcept |
Definition at line 133 of file DisplayWindow.inl.
|
privatenoexcept |
Definition at line 264 of file DisplayWindow.cpp.
Definition at line 121 of file DisplayWindow.inl.
|
private |
Definition at line 228 of file DisplayWindow.h.
|
private |
Definition at line 240 of file DisplayWindow.h.
|
private |
Definition at line 227 of file DisplayWindow.h.
Definition at line 232 of file DisplayWindow.h.
|
private |
Definition at line 226 of file DisplayWindow.h.
|
private |
Did we generate the window move event?
Definition at line 242 of file DisplayWindow.h.
|
private |
Definition at line 243 of file DisplayWindow.h.
|
private |
Definition at line 234 of file DisplayWindow.h.
Definition at line 231 of file DisplayWindow.h.
|
private |
Definition at line 237 of file DisplayWindow.h.
|
private |
Definition at line 238 of file DisplayWindow.h.
Definition at line 229 of file DisplayWindow.h.
|
private |
Definition at line 235 of file DisplayWindow.h.
|
staticprivate |
Definition at line 245 of file DisplayWindow.h.