PixelLightAPI  .
Protected Member Functions | Protected Attributes
PLGui::AbstractButton Class Reference

Abstract base class for all kind of buttons. More...

#include <AbstractButton.h>

Inheritance diagram for PLGui::AbstractButton:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

Abstract base class for all kind of buttons.


Member Function Documentation

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]
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.

Parameters:
[in]vPosMouse 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.

Parameters:
[in]nButtonMouse button that is pressed
[in]vPosMouse 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.

Parameters:
[in]nButtonMouse button that is released
[in]vPosMouse 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.

Parameters:
[in]nKeyPressed key
[in]nModifiersModifier keys pressed
Note:
  • Because of a possible autorepeat the key may be 'pressed' multiple times before the 'OnKeyUp'-function is called

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.

Parameters:
[in]nKeyReleased key
[in]nModifiersModifier keys pressed

Reimplemented from PLGui::WidgetFunctions.


Member Data Documentation

Text that is displayed on the button

Image that is displayed on the button

Size of image (usually 16x16)

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

Is the button currently pressed?

Is the mouse inside the button?

Is there currently a mouse button pressed?

Timer for repeated clicks


The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:18
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported