cae  0.0.0
Cross-API graphics engine
Loading...
Searching...
No Matches
cae::IWindow Interface Referenceabstract

Abstract class for window. More...

#include <IWindow.hpp>

+ Inheritance diagram for cae::IWindow:
+ Collaboration diagram for cae::IWindow:

Public Member Functions

 ~IWindow () override=default
 
virtual bool create (const std::string &name, WindowSize size)=0
 Create a window with the given name and size.
 
virtual void close ()=0
 Close the window.
 
virtual NativeWindowHandle getNativeHandle () const =0
 Get the native window handle.
 
virtual WindowSize getWindowSize () const =0
 Get the current window size.
 
virtual void setIcon (const std::string &path) const =0
 Set the window icon from the given image path.
 
virtual bool shouldClose () const =0
 Check if the window should close.
 
virtual void pollEvents ()=0
 Poll window events.
 
virtual bool pollEvent (WindowEvent &outEvent)=0
 Poll window events into outEvent.
 
virtual bool wasResized () const =0
 Check if the window was resized.
 
virtual void resetResizedFlag ()=0
 Reset the resized flag.
 
- Public Member Functions inherited from utl::IPlugin
virtual ~IPlugin ()=default
 
virtual std::string getName () const =0
 Get the name of the plugin.
 
virtual PluginType getType () const =0
 Get the type of the plugin.
 
virtual PluginPlatform getPlatform () const =0
 Get the handled platform of the plugin.
 

Detailed Description

Abstract class for window.

Interface for window.

Definition at line 96 of file IWindow.hpp.

Constructor & Destructor Documentation

◆ ~IWindow()

cae::IWindow::~IWindow ( )
overridedefault

Member Function Documentation

◆ close()

virtual void cae::IWindow::close ( )
pure virtual

Close the window.

Implemented in cae::GLFW.

◆ create()

virtual bool cae::IWindow::create ( const std::string & name,
WindowSize size )
pure virtual

Create a window with the given name and size.

Parameters
nameWindow name
sizeWindow size
Returns
True if the window was created successfully

Implemented in cae::GLFW.

◆ getNativeHandle()

virtual NativeWindowHandle cae::IWindow::getNativeHandle ( ) const
pure virtual

Get the native window handle.

Returns
Native window handle

Implemented in cae::GLFW.

◆ getWindowSize()

virtual WindowSize cae::IWindow::getWindowSize ( ) const
pure virtual

Get the current window size.

Returns
Current window size

Implemented in cae::GLFW.

◆ pollEvent()

virtual bool cae::IWindow::pollEvent ( WindowEvent & outEvent)
pure virtual

Poll window events into outEvent.

Parameters
outEventEvent to be filled
Returns
True if an event was polled

Implemented in cae::GLFW.

◆ pollEvents()

virtual void cae::IWindow::pollEvents ( )
pure virtual

Poll window events.

Implemented in cae::GLFW.

◆ resetResizedFlag()

virtual void cae::IWindow::resetResizedFlag ( )
pure virtual

Reset the resized flag.

Implemented in cae::GLFW.

◆ setIcon()

virtual void cae::IWindow::setIcon ( const std::string & path) const
pure virtual

Set the window icon from the given image path.

Parameters
pathPath to the icon image
Returns
True if the icon was set successfully

Implemented in cae::GLFW.

◆ shouldClose()

virtual bool cae::IWindow::shouldClose ( ) const
pure virtual

Check if the window should close.

Returns
True if the window should close

Implemented in cae::GLFW.

◆ wasResized()

virtual bool cae::IWindow::wasResized ( ) const
pure virtual

Check if the window was resized.

Returns
True if the window was resized

Implemented in cae::GLFW.


The documentation for this interface was generated from the following file: