PixelLightAPI
.
|
Abstract frontend implementation base class. More...
#include <FrontendImpl.h>
Protected Member Functions | |
virtual PLCORE_API void | OnCreate () override |
Called directly after the object has been created. | |
virtual PLCORE_API void | OnRestart () override |
Called directly before a stopped object is going to start again (always followed by "OnStart()") | |
virtual PLCORE_API bool | OnStart () override |
Called when the object becoming visible to the user. | |
virtual PLCORE_API void | OnResume () override |
Called when the object has the focus (keep the implementation lightweight) | |
virtual PLCORE_API void | OnPause () override |
Called when the object has no longer the focus (keep the implementation lightweight) | |
virtual PLCORE_API void | OnStop () override |
Called when the object is no longer visible to the user. | |
virtual PLCORE_API void | OnDestroy () override |
Called before the object is going to be finally destroyed. | |
virtual PLCORE_API void | OnSize () override |
Called when the window size has been changed. | |
virtual PLCORE_API void | OnFullscreenMode () override |
Called when the fullscreen mode was changed. | |
virtual PLCORE_API void | OnDraw () override |
Called to let the frontend draw into it's window. | |
virtual PLCORE_API void | OnUpdate () override |
Called to let the frontend update it's states. | |
virtual PLCORE_API void | OnDrop (const Container< String > &lstFiles) override |
Called when string data has been dropped onto the frontend window. | |
virtual PLCORE_API void | OnRun (const String &sExecutableFilename, const Array< String > &lstArguments) |
Called when the frontend is run. | |
virtual PLCORE_API int | Run (const String &sExecutableFilename, const Array< String > &lstArguments) |
Called when the frontend should run. | |
virtual handle | GetNativeWindowHandle () const =0 |
Get native window handle. | |
virtual void | Redraw ()=0 |
Redraw frontend. | |
virtual void | Ping ()=0 |
Give the frontend a chance to process OS messages. | |
virtual String | GetTitle () const =0 |
Get frontend title. | |
virtual void | SetTitle (const String &sTitle)=0 |
Set frontend title. | |
virtual int | GetX () const =0 |
Get the x position of the frontend (in screen coordinates) | |
virtual int | GetY () const =0 |
Get the y position of the frontend (in screen coordinates) | |
virtual uint32 | GetWidth () const =0 |
Get frontend width. | |
virtual uint32 | GetHeight () const =0 |
Get frontend height. | |
virtual void | GetWindowPositionSize (int &nX, int &nY, uint32 &nWidth, uint32 &nHeight) const =0 |
Returns frontend window position and size. | |
virtual void | SetWindowPositionSize (int nX, int nY, uint32 nWidth, uint32 nHeight)=0 |
Set frontend window position and size. | |
virtual bool | GetToggleFullscreenMode () const =0 |
Gets whether it's allowed to toggle the fullscreen mode using hotkeys. | |
virtual void | SetToggleFullscreenMode (bool bToggleFullscreenMode)=0 |
Sets whether it's allowed to toggle the fullscreen mode using hotkeys. | |
virtual bool | GetFullscreenAltTab () const =0 |
Gets whether it's allowed to use Alt-Tab if fullscreen mode is used. | |
virtual void | SetFullscreenAltTab (bool bAllowed)=0 |
Sets whether it's allowed to use Alt-Tab if fullscreen mode is used. | |
virtual bool | IsFullscreen () const =0 |
Returns whether the frontend is in fullscreen mode or not. | |
virtual void | SetFullscreen (bool bFullscreen)=0 |
Sets the frontend's fullscreen mode. | |
virtual void | RefreshFullscreen ()=0 |
Something related to fullscreen mode has been changed (e.g. the display resolution) | |
virtual bool | IsMouseOver () const =0 |
Check if the mouse is currently over the frontend. | |
virtual int | GetMousePositionX () const =0 |
Get current mouse cursor X position inside the frontend. | |
virtual int | GetMousePositionY () const =0 |
Get current mouse cursor Y position inside the frontend. | |
virtual bool | IsMouseVisible () const =0 |
Check if the mouse cursor is visible. | |
virtual void | SetMouseVisible (bool bVisible)=0 |
Set mouse cursor visibility. | |
virtual void | SetTrapMouse (bool bTrap)=0 |
Trap mouse inside the frontend. | |
Static Protected Member Functions | |
static PLCORE_API Frontend * | CreateFrontend (const FrontendContext &cFrontendContext, FrontendImpl &cFrontendImpl) |
Creates a frontend instance. | |
static PLCORE_API void | CorrectPositionSize (int &nX, int &nY, uint32 &nWidth, uint32 &nHeight, int nScreenLeft, int nScreenTop, int nScreenWidth, int nScreenHeight, uint32 nMinWidth=200, uint32 nMinHeight=200) |
Correct frontend position and size settings. | |
Protected Attributes | |
Frontend * | m_pFrontend |
Abstract frontend implementation base class.
virtual PLCORE_API void PLCore::FrontendImpl::OnCreate | ( | ) | [override, protected, virtual] |
Called directly after the object has been created.
Implements PLCore::AbstractLifecycle.
virtual PLCORE_API void PLCore::FrontendImpl::OnRestart | ( | ) | [override, protected, virtual] |
Called directly before a stopped object is going to start again (always followed by "OnStart()")
Implements PLCore::AbstractLifecycle.
virtual PLCORE_API bool PLCore::FrontendImpl::OnStart | ( | ) | [override, protected, virtual] |
Called when the object becoming visible to the user.
Implements PLCore::AbstractLifecycle.
virtual PLCORE_API void PLCore::FrontendImpl::OnResume | ( | ) | [override, protected, virtual] |
Called when the object has the focus (keep the implementation lightweight)
Implements PLCore::AbstractLifecycle.
virtual PLCORE_API void PLCore::FrontendImpl::OnPause | ( | ) | [override, protected, virtual] |
Called when the object has no longer the focus (keep the implementation lightweight)
Implements PLCore::AbstractLifecycle.
virtual PLCORE_API void PLCore::FrontendImpl::OnStop | ( | ) | [override, protected, virtual] |
Called when the object is no longer visible to the user.
Implements PLCore::AbstractLifecycle.
virtual PLCORE_API void PLCore::FrontendImpl::OnDestroy | ( | ) | [override, protected, virtual] |
Called before the object is going to be finally destroyed.
Implements PLCore::AbstractLifecycle.
virtual PLCORE_API void PLCore::FrontendImpl::OnSize | ( | ) | [override, protected, virtual] |
Called when the window size has been changed.
Implements PLCore::AbstractFrontend.
virtual PLCORE_API void PLCore::FrontendImpl::OnFullscreenMode | ( | ) | [override, protected, virtual] |
Called when the fullscreen mode was changed.
Implements PLCore::AbstractFrontend.
virtual PLCORE_API void PLCore::FrontendImpl::OnDraw | ( | ) | [override, protected, virtual] |
Called to let the frontend draw into it's window.
Implements PLCore::AbstractFrontend.
virtual PLCORE_API void PLCore::FrontendImpl::OnUpdate | ( | ) | [override, protected, virtual] |
Called to let the frontend update it's states.
Implements PLCore::AbstractFrontend.
virtual PLCORE_API void PLCore::FrontendImpl::OnDrop | ( | const Container< String > & | lstFiles | ) | [override, protected, virtual] |
Called when string data has been dropped onto the frontend window.
[in] | lstFiles | List of file names |
Implements PLCore::AbstractFrontend.
virtual PLCORE_API void PLCore::FrontendImpl::OnRun | ( | const String & | sExecutableFilename, |
const Array< String > & | lstArguments | ||
) | [protected, virtual] |
Called when the frontend is run.
[in] | sExecutableFilename | Absolute application executable filename |
[in] | lstArguments | List of arguments to the program |
virtual PLCORE_API int PLCore::FrontendImpl::Run | ( | const String & | sExecutableFilename, |
const Array< String > & | lstArguments | ||
) | [protected, virtual] |
Called when the frontend should run.
[in] | sExecutableFilename | Absolute application executable filename |
[in] | lstArguments | List of arguments to the program |
virtual handle PLCore::FrontendImpl::GetNativeWindowHandle | ( | ) | const [protected, pure virtual] |
Get native window handle.
virtual void PLCore::FrontendImpl::Redraw | ( | ) | [protected, pure virtual] |
Redraw frontend.
virtual void PLCore::FrontendImpl::Ping | ( | ) | [protected, pure virtual] |
Give the frontend a chance to process OS messages.
virtual String PLCore::FrontendImpl::GetTitle | ( | ) | const [protected, pure virtual] |
Get frontend title.
virtual void PLCore::FrontendImpl::SetTitle | ( | const String & | sTitle | ) | [protected, pure virtual] |
virtual int PLCore::FrontendImpl::GetX | ( | ) | const [protected, pure virtual] |
Get the x position of the frontend (in screen coordinates)
virtual int PLCore::FrontendImpl::GetY | ( | ) | const [protected, pure virtual] |
Get the y position of the frontend (in screen coordinates)
virtual uint32 PLCore::FrontendImpl::GetWidth | ( | ) | const [protected, pure virtual] |
Get frontend width.
virtual uint32 PLCore::FrontendImpl::GetHeight | ( | ) | const [protected, pure virtual] |
Get frontend height.
virtual void PLCore::FrontendImpl::GetWindowPositionSize | ( | int & | nX, |
int & | nY, | ||
uint32 & | nWidth, | ||
uint32 & | nHeight | ||
) | const [protected, pure virtual] |
Returns frontend window position and size.
[out] | nX | Receives the x position of the frontend window (in screen coordinates) |
[out] | nY | Receives the y position of the frontend window (in screen coordinates) |
[out] | nWidth | Receives the width of the frontend window |
[out] | nHeight | Receives the height of the frontend window |
virtual void PLCore::FrontendImpl::SetWindowPositionSize | ( | int | nX, |
int | nY, | ||
uint32 | nWidth, | ||
uint32 | nHeight | ||
) | [protected, pure virtual] |
Set frontend window position and size.
[in] | nX | X position of the frontend window (in screen coordinates) |
[in] | nY | Y position of the frontend window (in screen coordinates) |
[in] | nWidth | Width of the frontend window |
[in] | nHeight | Height of the frontend window |
virtual bool PLCore::FrontendImpl::GetToggleFullscreenMode | ( | ) | const [protected, pure virtual] |
Gets whether it's allowed to toggle the fullscreen mode using hotkeys.
virtual void PLCore::FrontendImpl::SetToggleFullscreenMode | ( | bool | bToggleFullscreenMode | ) | [protected, pure virtual] |
Sets whether it's allowed to toggle the fullscreen mode using hotkeys.
[in] | bToggleFullscreenMode | Is it allowed to toggle the fullscreen mode using hotkeys? |
virtual bool PLCore::FrontendImpl::GetFullscreenAltTab | ( | ) | const [protected, pure virtual] |
Gets whether it's allowed to use Alt-Tab if fullscreen mode is used.
virtual void PLCore::FrontendImpl::SetFullscreenAltTab | ( | bool | bAllowed | ) | [protected, pure virtual] |
Sets whether it's allowed to use Alt-Tab if fullscreen mode is used.
[in] | bAllowed | Is it allowed to use Alt-Tab within fullscreen mode? |
virtual bool PLCore::FrontendImpl::IsFullscreen | ( | ) | const [protected, pure virtual] |
Returns whether the frontend is in fullscreen mode or not.
virtual void PLCore::FrontendImpl::SetFullscreen | ( | bool | bFullscreen | ) | [protected, pure virtual] |
Sets the frontend's fullscreen mode.
[in] | bFullscreen | 'true' if the frontend should be in fullscreen mode, else 'false' |
virtual void PLCore::FrontendImpl::RefreshFullscreen | ( | ) | [protected, pure virtual] |
Something related to fullscreen mode has been changed (e.g. the display resolution)
virtual bool PLCore::FrontendImpl::IsMouseOver | ( | ) | const [protected, pure virtual] |
Check if the mouse is currently over the frontend.
virtual int PLCore::FrontendImpl::GetMousePositionX | ( | ) | const [protected, pure virtual] |
Get current mouse cursor X position inside the frontend.
virtual int PLCore::FrontendImpl::GetMousePositionY | ( | ) | const [protected, pure virtual] |
Get current mouse cursor Y position inside the frontend.
virtual bool PLCore::FrontendImpl::IsMouseVisible | ( | ) | const [protected, pure virtual] |
Check if the mouse cursor is visible.
virtual void PLCore::FrontendImpl::SetMouseVisible | ( | bool | bVisible | ) | [protected, pure virtual] |
Set mouse cursor visibility.
[in] | bVisible | Shall the mouse cursor be visible? |
virtual void PLCore::FrontendImpl::SetTrapMouse | ( | bool | bTrap | ) | [protected, pure virtual] |
Trap mouse inside the frontend.
[in] | bTrap | 'true' if the mouse should be trapped inside the frontend, else 'false' |
static PLCORE_API Frontend* PLCore::FrontendImpl::CreateFrontend | ( | const FrontendContext & | cFrontendContext, |
FrontendImpl & | cFrontendImpl | ||
) | [static, protected] |
static PLCORE_API void PLCore::FrontendImpl::CorrectPositionSize | ( | int & | nX, |
int & | nY, | ||
uint32 & | nWidth, | ||
uint32 & | nHeight, | ||
int | nScreenLeft, | ||
int | nScreenTop, | ||
int | nScreenWidth, | ||
int | nScreenHeight, | ||
uint32 | nMinWidth = 200 , |
||
uint32 | nMinHeight = 200 |
||
) | [static, protected] |
Correct frontend position and size settings.
[in,out] | nX | X position of the frontend (in screen coordinates) |
[in,out] | nY | Y position of the frontend (in screen coordinates) |
[in,out] | nWidth | Width of the frontend |
[in,out] | nHeight | Height of the frontend |
[in] | nScreenLeft | Screen left side |
[in] | nScreenTop | Screen top side |
[in] | nScreenWidth | Screen width |
[in] | nScreenHeight | Screen height |
[in] | nMinWidth | Minimum allowed frontend width |
[in] | nMinHeight | Minimum allowed frontend height |
Frontend* PLCore::FrontendImpl::m_pFrontend [protected] |
Pointer to frontend, can be a null pointer
|