Berserk
Public Types | Public Member Functions | Static Public Member Functions | List of all members
EventWindow Class Referencefinal

Event dispatched when window state changed. More...

#include <EventWindow.hpp>

Inheritance diagram for EventWindow:
Inheritance graph
[legend]
Collaboration diagram for EventWindow:
Collaboration graph
[legend]

Public Types

enum class  Type {
  Resized = 0 , FramebufferResized , Moved , FocusReceived ,
  FocusLost , Minimized , Maximized , Restored ,
  PixelRatioChanged , CloseRequested , Unknown
}
 

Public Member Functions

BRK_API EventWindow ()=default
 
BRK_API ~EventWindow () override=default
 
BRK_API const EventTypeGetEventType () const override
 
BRK_API void SetWindow (Ref< Window > window)
 
BRK_API void SetWindowSize (const Size2i &size)
 
BRK_API void SetFramebufferSize (const Size2i &size)
 
BRK_API void SetPosition (const Point2i &position)
 
BRK_API void SetPixelRatio (const Vec2f &ratio)
 
BRK_API void SetFocus (bool focus)
 
BRK_API void SetType (Type type)
 
BRK_API const Ref< Window > & GetWindow () const
 
BRK_API const Size2iGetWindowSize () const
 
BRK_API const Size2iGetFramebufferSize () const
 
BRK_API const Point2iGetPosition () const
 
BRK_API const Vec2fGetPixelRatio () const
 
BRK_API bool GetFocus () const
 
BRK_API Type GetType () const
 
- Public Member Functions inherited from Event
BRK_API Event ()=default
 
BRK_API ~Event () override=default
 
- Public Member Functions inherited from RefCnt
virtual ~RefCnt ()
 
bool IsUnique () const
 
std::int32_t GetRefs () const
 
std::int32_t AddRef () const
 
std::int32_t RelRef () const
 

Static Public Member Functions

static BRK_API const EventTypeGetEventTypeStatic ()
 

Additional Inherited Members

- Protected Member Functions inherited from RefCnt
virtual void Destroy () const
 

Detailed Description

Event dispatched when window state changed.

Member Enumeration Documentation

◆ Type

enum EventWindow::Type
strong

Type of window event

Enumerator
Resized 

Triggered when window size changes

FramebufferResized 

Triggered when window framebuffer size changes

Moved 

Triggered when window position changes

FocusReceived 

Triggered when window receives input focus

FocusLost 

Triggered when window loses input focus

Minimized 

Triggered when the window is minimized (iconified)

Maximized 

Triggered when the window is expanded to cover the current screen

Restored 

Triggered when the window leaves minimized or maximized state

PixelRatioChanged 

Triggered when the pixel ration of the window is changed (usually happens when the window is moved to another monitor)

CloseRequested 

Triggered when the user wants to close the window

Unknown 

Unknown event

Constructor & Destructor Documentation

◆ EventWindow()

BRK_API EventWindow::EventWindow ( )
default

◆ ~EventWindow()

BRK_API EventWindow::~EventWindow ( )
overridedefault

Member Function Documentation

◆ GetEventType()

BRK_NS_BEGIN const EventType & EventWindow::GetEventType ( ) const
overridevirtual

Implements Event.

◆ GetEventTypeStatic()

const EventType & EventWindow::GetEventTypeStatic ( )
static

◆ GetFocus()

bool EventWindow::GetFocus ( ) const

◆ GetFramebufferSize()

const Size2i & EventWindow::GetFramebufferSize ( ) const

◆ GetPixelRatio()

const Vec2f & EventWindow::GetPixelRatio ( ) const

◆ GetPosition()

const Point2i & EventWindow::GetPosition ( ) const

◆ GetType()

EventWindow::Type EventWindow::GetType ( ) const

◆ GetWindow()

const Ref< Window > & EventWindow::GetWindow ( ) const

◆ GetWindowSize()

const Size2i & EventWindow::GetWindowSize ( ) const

◆ SetFocus()

void EventWindow::SetFocus ( bool  focus)

◆ SetFramebufferSize()

void EventWindow::SetFramebufferSize ( const Size2i size)

◆ SetPixelRatio()

void EventWindow::SetPixelRatio ( const Vec2f ratio)

◆ SetPosition()

void EventWindow::SetPosition ( const Point2i position)

◆ SetType()

void EventWindow::SetType ( Type  type)

◆ SetWindow()

void EventWindow::SetWindow ( Ref< Window window)

◆ SetWindowSize()

void EventWindow::SetWindowSize ( const Size2i size)

The documentation for this class was generated from the following files: