PixelLightAPI
.
|
#include <Slider.h>
Classes | |
struct | SSliderHandle |
Slider handle. More... | |
Public Member Functions | |
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 | OnDisable () override |
Called when the widget gets disabled. | |
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 | |
virtual PLGUI_API void | OnChangeValue (int nValue) override |
Called when a new value has been set. | |
void | CalculateHandlePos () |
Calculate position of slider handle. | |
PLCore::uint32 | GetHandleState () |
Get widget state for the handle. | |
void | CheckButtons (const PLMath::Vector2i &vPos) |
Check if a button has been pressed. | |
Protected Attributes | |
EOrientation | m_nOrientation |
SSliderHandle | m_sHandle |
PLMath::Vector2i | m_vMousePos |
Slider widget.
virtual PLGUI_API void PLGui::Slider::OnChangeValue | ( | int | nValue | ) | [override, protected, virtual] |
Called when a new value has been set.
[in] | nValue | Value |
Reimplemented from PLGui::AbstractSlider.
virtual PLGUI_API void PLGui::Slider::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::Slider::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::Slider::OnDisable | ( | ) | [override, virtual] |
Called when the widget gets disabled.
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Slider::OnMouseLeave | ( | ) | [override, virtual] |
Called when the mouse has left the widget.
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::Slider::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::Slider::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::Slider::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.
void PLGui::Slider::CalculateHandlePos | ( | ) | [protected] |
Calculate position of slider handle.
PLCore::uint32 PLGui::Slider::GetHandleState | ( | ) | [protected] |
Get widget state for the handle.
void PLGui::Slider::CheckButtons | ( | const PLMath::Vector2i & | vPos | ) | [protected] |
Check if a button has been pressed.
[in] | vPos | Mouse position |
EOrientation PLGui::Slider::m_nOrientation [protected] |
Scrollbar orientation
SSliderHandle PLGui::Slider::m_sHandle [protected] |
Handle
PLMath::Vector2i PLGui::Slider::m_vMousePos [protected] |
Last mouse position
|