PixelLightAPI
.
|
Abstract base class for all kind of buttons. More...
#include <AbstractButton.h>
Protected Member Functions | |
virtual PLGUI_API void | OnButtonPressed () |
virtual PLGUI_API void | OnButtonReleased () |
virtual PLGUI_API void | OnButtonClicked () |
virtual PLGUI_API void | OnDisable () override |
Called when the widget gets disabled. | |
virtual PLGUI_API void | OnGetFocus () override |
Called when the widget gets the keyboard focus. | |
virtual PLGUI_API void | OnLooseFocus () override |
Called when the widget looses the keyboard focus. | |
virtual PLGUI_API void | OnMouseEnter () override |
Called when the mouse has entered the widget. | |
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. | |
virtual PLGUI_API void | OnKeyDown (PLCore::uint32 nKey, PLCore::uint32 nModifiers) override |
Called when a key was pressed. | |
virtual PLGUI_API void | OnKeyUp (PLCore::uint32 nKey, PLCore::uint32 nModifiers) override |
Called when a key was released. | |
Protected Attributes | |
PLCore::String | m_sText |
Image | m_cImage |
PLMath::Vector2i | m_vImageSize |
bool | m_bRepeat |
PLCore::uint64 | m_nRepeatDelay |
PLCore::uint64 | m_nRepeatInterval |
bool | m_bPressed |
bool | m_bMouseIn |
bool | m_bMousePressed |
Timer | m_cTimer |
Abstract base class for all kind of buttons.
virtual PLGUI_API void PLGui::AbstractButton::OnButtonPressed | ( | ) | [protected, virtual] |
virtual PLGUI_API void PLGui::AbstractButton::OnButtonReleased | ( | ) | [protected, virtual] |
virtual PLGUI_API void PLGui::AbstractButton::OnButtonClicked | ( | ) | [protected, virtual] |
Reimplemented in PLGui::AbstractToggleButton, and PLGui::Button.
virtual PLGUI_API void PLGui::AbstractButton::OnDisable | ( | ) | [override, protected, virtual] |
Called when the widget gets disabled.
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::AbstractButton::OnGetFocus | ( | ) | [override, protected, virtual] |
Called when the widget gets the keyboard focus.
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::AbstractButton::OnLooseFocus | ( | ) | [override, protected, virtual] |
Called when the widget looses the keyboard focus.
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::AbstractButton::OnMouseEnter | ( | ) | [override, protected, virtual] |
Called when the mouse has entered the widget.
Reimplemented from PLGui::WidgetFunctions.
Reimplemented in PLGui::TabBarButton, and PLGui::Button.
virtual PLGUI_API void PLGui::AbstractButton::OnMouseLeave | ( | ) | [override, protected, virtual] |
Called when the mouse has left the widget.
Reimplemented from PLGui::WidgetFunctions.
Reimplemented in PLGui::TabBarButton, and PLGui::Button.
virtual PLGUI_API void PLGui::AbstractButton::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::AbstractButton::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::AbstractButton::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::AbstractButton::OnKeyDown | ( | PLCore::uint32 | nKey, |
PLCore::uint32 | nModifiers | ||
) | [override, protected, virtual] |
Called when a key was pressed.
[in] | nKey | Pressed key |
[in] | nModifiers | Modifier keys pressed |
Reimplemented from PLGui::WidgetFunctions.
virtual PLGUI_API void PLGui::AbstractButton::OnKeyUp | ( | PLCore::uint32 | nKey, |
PLCore::uint32 | nModifiers | ||
) | [override, protected, virtual] |
Called when a key was released.
[in] | nKey | Released key |
[in] | nModifiers | Modifier keys pressed |
Reimplemented from PLGui::WidgetFunctions.
PLCore::String PLGui::AbstractButton::m_sText [protected] |
Text that is displayed on the button
Image PLGui::AbstractButton::m_cImage [protected] |
Image that is displayed on the button
PLMath::Vector2i PLGui::AbstractButton::m_vImageSize [protected] |
Size of image (usually 16x16)
bool PLGui::AbstractButton::m_bRepeat [protected] |
If the button is hold down, emit clicks repeatedly
PLCore::uint64 PLGui::AbstractButton::m_nRepeatDelay [protected] |
Initial delay (in ms) for repeated clicks
PLCore::uint64 PLGui::AbstractButton::m_nRepeatInterval [protected] |
Interval (in ms) between repeated clicks
bool PLGui::AbstractButton::m_bPressed [protected] |
Is the button currently pressed?
bool PLGui::AbstractButton::m_bMouseIn [protected] |
Is the mouse inside the button?
bool PLGui::AbstractButton::m_bMousePressed [protected] |
Is there currently a mouse button pressed?
Timer PLGui::AbstractButton::m_cTimer [protected] |
Timer for repeated clicks
|