PixelLightAPI
.
|
Base class for windows (widgets with a border and a title bar) More...
#include <Window.h>
Public Member Functions | |
PLGUI_API | Window (Widget *pParent=nullptr) |
Constructor. | |
virtual PLGUI_API | ~Window () |
Destructor. | |
PLGUI_API PLCore::uint32 | GetSystemButtons () const |
Get system buttons. | |
PLGUI_API void | SetSystemButtons (PLCore::uint32 nButtons) |
Set system buttons. | |
PLGUI_API bool | GetShowTitleBar () const |
Check if a title bar is displayed. | |
PLGUI_API void | SetShowTitleBar (bool bVisible) |
Set if a title bar is displayed. | |
PLGUI_API bool | GetShowBorder () const |
Check if a border is displayed. | |
PLGUI_API void | SetShowBorder (bool bVisible) |
Set if a border is displayed. | |
PLGUI_API bool | GetResizable () const |
Check if the window is resizable. | |
PLGUI_API void | SetResizable (bool bResizable) |
Set if the window is resizable. | |
PLGUI_API PLMath::Vector2i | GetMinSize () const |
Get minimum size for resizing. | |
PLGUI_API void | SetMinSize (const PLMath::Vector2i &vSize) |
Set minimum size for resizing. | |
PLGUI_API PLMath::Vector2i | GetMaxSize () const |
Get maximum size for resizing. | |
PLGUI_API void | SetMaxSize (const PLMath::Vector2i &vSize) |
Set maximum size for resizing. | |
Protected Member Functions | |
virtual PLGUI_API void | OnDraw (Graphics &cGraphics) override |
Called to draw the widget. | |
virtual PLGUI_API void | OnAdjustContent () override |
Called when the widget content has to be adjusted. | |
virtual PLGUI_API void | OnWindowState (EWindowState nWindowState) override |
Called when the window state has changed. | |
virtual PLGUI_API void | OnEnterFullscreen () override |
Called when fullscreen mode is activated. | |
virtual PLGUI_API void | OnLeaveFullscreen () override |
Called when fullscreen mode is deactivated. | |
virtual PLGUI_API void | OnActivate (bool bActivate) override |
Called when the widget has been activated or deactivated (focus has changed) | |
virtual PLGUI_API void | OnMove (const PLMath::Vector2i &vPos) override |
Called when the widget gets moved. | |
virtual PLGUI_API void | OnMouseMove (const PLMath::Vector2i &vPos) override |
Called when the mouse is moved within the widget or captured by it. | |
virtual PLGUI_API void | OnMousePosUpdate (const PLMath::Vector2i &vPos) override |
Called when the mouse position inside the widget has changed. | |
virtual PLGUI_API void | OnMouseLeave () override |
Called when the mouse has left the widget. | |
virtual PLGUI_API void | OnMouseButtonDown (PLCore::uint32 nButton, const PLMath::Vector2i &vPos) override |
Called when a mouse button is pressed. | |
virtual PLGUI_API void | OnMouseButtonUp (PLCore::uint32 nButton, const PLMath::Vector2i &vPos) override |
Called when a mouse button is released. | |
virtual PLGUI_API void | OnMouseButtonDoubleClick (PLCore::uint32 nButton, const PLMath::Vector2i &vPos) override |
Called when a mouse button is double-clicked. | |
Protected Attributes | |
PLCore::uint32 | m_nSystemButtons |
bool | m_bShowTitleBar |
bool | m_bShowBorder |
bool | m_bResizable |
PLMath::Vector2i | m_vMinSize |
PLMath::Vector2i | m_vMaxSize |
SystemButton * | m_pSysButtonMinimize |
SystemButton * | m_pSysButtonMaximize |
SystemButton * | m_pSysButtonClose |
PLMath::Vector2i | m_vPos |
PLMath::Vector2i | m_vMousePos |
bool | m_bMouseTitle |
bool | m_bMouseLeft |
bool | m_bMouseRight |
bool | m_bMouseTop |
bool | m_bMouseBottom |
bool | m_bMove |
bool | m_bSizeXLeft |
bool | m_bSizeXRight |
bool | m_bSizeYTop |
bool | m_bSizeYBottom |
Base class for windows (widgets with a border and a title bar)
PLGUI_API PLGui::Window::Window | ( | Widget * | pParent = nullptr | ) |
Constructor.
[in] | pParent | Pointer to parent widget |
virtual PLGUI_API PLGui::Window::~Window | ( | ) | [virtual] |
Destructor.
PLGUI_API PLCore::uint32 PLGui::Window::GetSystemButtons | ( | ) | const |
Get system buttons.
PLGUI_API void PLGui::Window::SetSystemButtons | ( | PLCore::uint32 | nButtons | ) |
Set system buttons.
[in] | nButtons | Flags describing the displayed system buttons |
PLGUI_API bool PLGui::Window::GetShowTitleBar | ( | ) | const |
Check if a title bar is displayed.
PLGUI_API void PLGui::Window::SetShowTitleBar | ( | bool | bVisible | ) |
Set if a title bar is displayed.
[in] | bVisible | 'true' if title bar is visible, else 'false' |
PLGUI_API bool PLGui::Window::GetShowBorder | ( | ) | const |
Check if a border is displayed.
PLGUI_API void PLGui::Window::SetShowBorder | ( | bool | bVisible | ) |
Set if a border is displayed.
[in] | bVisible | 'true' if border is visible, else 'false' |
PLGUI_API bool PLGui::Window::GetResizable | ( | ) | const |
Check if the window is resizable.
PLGUI_API void PLGui::Window::SetResizable | ( | bool | bResizable | ) |
Set if the window is resizable.
[in] | bResizable | 'true' if window is resizable, else 'false' |
PLGUI_API PLMath::Vector2i PLGui::Window::GetMinSize | ( | ) | const |
Get minimum size for resizing.
PLGUI_API void PLGui::Window::SetMinSize | ( | const PLMath::Vector2i & | vSize | ) |
Set minimum size for resizing.
[in] | vSize | Size |
PLGUI_API PLMath::Vector2i PLGui::Window::GetMaxSize | ( | ) | const |
Get maximum size for resizing.
PLGUI_API void PLGui::Window::SetMaxSize | ( | const PLMath::Vector2i & | vSize | ) |
Set maximum size for resizing.
[in] | vSize | Size |
virtual PLGUI_API void PLGui::Window::OnDraw | ( | Graphics & | cGraphics | ) | [override, protected, virtual] |
Called to draw the widget.
[in] | cGraphics | Graphics object used for painting |
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Window::OnAdjustContent | ( | ) | [override, protected, virtual] |
Called when the widget content has to be adjusted.
Reimplemented from PLGui::ContainerWidget.
virtual PLGUI_API void PLGui::Window::OnWindowState | ( | EWindowState | nWindowState | ) | [override, protected, virtual] |
Called when the window state has changed.
[in] | nWindowState | Window state |
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Window::OnEnterFullscreen | ( | ) | [override, protected, virtual] |
Called when fullscreen mode is activated.
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Window::OnLeaveFullscreen | ( | ) | [override, protected, virtual] |
Called when fullscreen mode is deactivated.
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Window::OnActivate | ( | bool | bActivate | ) | [override, protected, virtual] |
Called when the widget has been activated or deactivated (focus has changed)
[in] | bActivate | 'true' if the widget itself or one of it's child widgets had the focus, else 'false' |
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Window::OnMove | ( | const PLMath::Vector2i & | vPos | ) | [override, protected, virtual] |
Called when the widget gets moved.
[in] | vPos | Position |
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Window::OnMouseMove | ( | const PLMath::Vector2i & | vPos | ) | [override, protected, virtual] |
Called when the mouse is moved within the widget or captured by it.
[in] | vPos | Mouse position within the widget |
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Window::OnMousePosUpdate | ( | const PLMath::Vector2i & | vPos | ) | [override, protected, virtual] |
Called when the mouse position inside the widget has changed.
[in] | vPos | Mouse position within the widget |
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Window::OnMouseLeave | ( | ) | [override, protected, virtual] |
Called when the mouse has left the widget.
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Window::OnMouseButtonDown | ( | PLCore::uint32 | nButton, |
const PLMath::Vector2i & | vPos | ||
) | [override, protected, virtual] |
Called when a mouse button is pressed.
[in] | nButton | Mouse button that is pressed |
[in] | vPos | Mouse position within the widget |
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Window::OnMouseButtonUp | ( | PLCore::uint32 | nButton, |
const PLMath::Vector2i & | vPos | ||
) | [override, protected, virtual] |
Called when a mouse button is released.
[in] | nButton | Mouse button that is released |
[in] | vPos | Mouse position within the widget |
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Window::OnMouseButtonDoubleClick | ( | PLCore::uint32 | nButton, |
const PLMath::Vector2i & | vPos | ||
) | [override, protected, virtual] |
Called when a mouse button is double-clicked.
[in] | nButton | Mouse button that is double-clicked |
[in] | vPos | Mouse position within the widget |
Reimplemented from PLGui::WidgetFunctions.
PLCore::uint32 PLGui::Window::m_nSystemButtons [protected] |
System buttons that are available in this window
bool PLGui::Window::m_bShowTitleBar [protected] |
Show title of window?
bool PLGui::Window::m_bShowBorder [protected] |
Show window border?
bool PLGui::Window::m_bResizable [protected] |
Is window resizable?
PLMath::Vector2i PLGui::Window::m_vMinSize [protected] |
Minimum size for resizing
PLMath::Vector2i PLGui::Window::m_vMaxSize [protected] |
Maximum size for resizing
SystemButton* PLGui::Window::m_pSysButtonMinimize [protected] |
System button to minimize the window size
SystemButton* PLGui::Window::m_pSysButtonMaximize [protected] |
System button to maximize or restore the window size
SystemButton* PLGui::Window::m_pSysButtonClose [protected] |
System button to close the window
PLMath::Vector2i PLGui::Window::m_vPos [protected] |
Current widget position
Reimplemented from PLGui::Widget.
PLMath::Vector2i PLGui::Window::m_vMousePos [protected] |
Current mouse position
bool PLGui::Window::m_bMouseTitle [protected] |
Is the mouse position on the title bar?
bool PLGui::Window::m_bMouseLeft [protected] |
Is the mouse position on the left border?
bool PLGui::Window::m_bMouseRight [protected] |
Is the mouse position on the right border?
bool PLGui::Window::m_bMouseTop [protected] |
Is the mouse position on the top border?
bool PLGui::Window::m_bMouseBottom [protected] |
Is the mouse position on the bottom border?
bool PLGui::Window::m_bMove [protected] |
Is the window currently moved?
bool PLGui::Window::m_bSizeXLeft [protected] |
Is the window currently sized (left border)?
bool PLGui::Window::m_bSizeXRight [protected] |
Is the window currently sized (right border)?
bool PLGui::Window::m_bSizeYTop [protected] |
Is the window currently sized (top border)?
bool PLGui::Window::m_bSizeYBottom [protected] |
Is the window currently sized (bottom border)?
|