PixelLightAPI
.
|
Container widget that splits an area into two sides. More...
#include <Splitter.h>
Public Member Functions | |
PLGUI_API | Splitter (Widget *pParent=nullptr) |
Constructor. | |
virtual PLGUI_API | ~Splitter () |
Destructor. | |
PLGUI_API EOrientation | GetOrientation () const |
Get orientation. | |
PLGUI_API void | SetOrientation (EOrientation nOrientation) |
Set orientation. | |
PLGUI_API bool | GetSizable () const |
Check if size can be altered by the user. | |
PLGUI_API void | SetSizable (bool bSizable) |
Set if size can be altered by the user. | |
PLGUI_API const SizeHint & | GetSizeLeft () const |
Get size of left (or top) side. | |
PLGUI_API void | SetSizeLeft (const SizeHint &cSize) |
Set size of left (or top) side. | |
PLGUI_API const SizeHint & | GetSizeRight () const |
Get size of right (or bottom) side. | |
PLGUI_API void | SetSizeRight (const SizeHint &cSize) |
Set size of right (or bottom) side. | |
PLGUI_API Widget * | GetSide (ESide nSide) const |
Get content widget of a given side. | |
virtual PLGUI_API Widget * | GetContentWidget () const |
Get content widget. | |
virtual PLGUI_API void | OnDraw (Graphics &cGraphics) override |
Called to draw the widget. | |
virtual PLGUI_API PLMath::Vector2i | OnPreferredSize (const PLMath::Vector2i &vRefSize) const override |
Called when the widget is to calculate it's preferred size. | |
virtual PLGUI_API void | OnAdjustContent () override |
Called when the widget content has to be adjusted. | |
virtual PLGUI_API void | OnMouseLeave () override |
Called when the mouse has left the widget. | |
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 | 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. | |
Protected Member Functions | |
PLGUI_API void | ChangeSize (int nDelta) |
Change size of content widgets. | |
Protected Attributes | |
EOrientation | m_nOrientation |
bool | m_bSizable |
SizeHint | m_cSizeLeft |
SizeHint | m_cSizeRight |
Widget * | m_pContentLeft |
Widget * | m_pContentRight |
PLMath::Vector2i | m_vMousePos |
bool | m_bSizing |
Container widget that splits an area into two sides.
PLGUI_API PLGui::Splitter::Splitter | ( | Widget * | pParent = nullptr | ) |
Constructor.
[in] | pParent | Pointer to parent widget |
virtual PLGUI_API PLGui::Splitter::~Splitter | ( | ) | [virtual] |
Destructor.
PLGUI_API EOrientation PLGui::Splitter::GetOrientation | ( | ) | const |
Get orientation.
PLGUI_API void PLGui::Splitter::SetOrientation | ( | EOrientation | nOrientation | ) |
Set orientation.
[in] | nOrientation | Orientation |
PLGUI_API bool PLGui::Splitter::GetSizable | ( | ) | const |
Check if size can be altered by the user.
PLGUI_API void PLGui::Splitter::SetSizable | ( | bool | bSizable | ) |
Set if size can be altered by the user.
[in] | bSizable | 'true' if sizable, else 'false' |
PLGUI_API const SizeHint& PLGui::Splitter::GetSizeLeft | ( | ) | const |
Get size of left (or top) side.
PLGUI_API void PLGui::Splitter::SetSizeLeft | ( | const SizeHint & | cSize | ) |
Set size of left (or top) side.
[in] | cSize | Size hint |
PLGUI_API const SizeHint& PLGui::Splitter::GetSizeRight | ( | ) | const |
Get size of right (or bottom) side.
PLGUI_API void PLGui::Splitter::SetSizeRight | ( | const SizeHint & | cSize | ) |
Set size of right (or bottom) side.
[in] | cSize | Size hint |
PLGUI_API Widget* PLGui::Splitter::GetSide | ( | ESide | nSide | ) | const |
Get content widget of a given side.
[in] | nSide | Side |
virtual PLGUI_API Widget* PLGui::Splitter::GetContentWidget | ( | ) | const [virtual] |
Get content widget.
Reimplemented from PLGui::Widget.
virtual PLGUI_API void PLGui::Splitter::OnDraw | ( | Graphics & | cGraphics | ) | [override, virtual] |
Called to draw the widget.
[in] | cGraphics | Graphics object used for painting |
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API PLMath::Vector2i PLGui::Splitter::OnPreferredSize | ( | const PLMath::Vector2i & | vRefSize | ) | const [override, virtual] |
Called when the widget is to calculate it's preferred size.
[in] | vRefSize | Precalculated reference size, can be (-1, -1) if no reference size is available |
Reimplemented from PLGui::Widget.
virtual PLGUI_API void PLGui::Splitter::OnAdjustContent | ( | ) | [override, virtual] |
Called when the widget content has to be adjusted.
Reimplemented from PLGui::Widget.
virtual PLGUI_API void PLGui::Splitter::OnMouseLeave | ( | ) | [override, virtual] |
Called when the mouse has left the widget.
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Splitter::OnMouseMove | ( | const PLMath::Vector2i & | vPos | ) | [override, 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::Splitter::OnMouseButtonDown | ( | PLCore::uint32 | nButton, |
const PLMath::Vector2i & | vPos | ||
) | [override, 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::Splitter::OnMouseButtonUp | ( | PLCore::uint32 | nButton, |
const PLMath::Vector2i & | vPos | ||
) | [override, 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.
PLGUI_API void PLGui::Splitter::ChangeSize | ( | int | nDelta | ) | [protected] |
Change size of content widgets.
[in] | nDelta | Movement delta (in pixels) |
EOrientation PLGui::Splitter::m_nOrientation [protected] |
Orientation
bool PLGui::Splitter::m_bSizable [protected] |
Is the widget sizable?
SizeHint PLGui::Splitter::m_cSizeLeft [protected] |
Size of left (or top) container
SizeHint PLGui::Splitter::m_cSizeRight [protected] |
Size of right (or bottom) container
Widget* PLGui::Splitter::m_pContentLeft [protected] |
Inner widget for the left/top side
Widget* PLGui::Splitter::m_pContentRight [protected] |
Inner widget for the right/bottom side
PLMath::Vector2i PLGui::Splitter::m_vMousePos [protected] |
Current mouse position
bool PLGui::Splitter::m_bSizing [protected] |
Are we currently changing the size?
|