PixelLightAPI  .
Public Member Functions | Protected Member Functions
PLGui::Button Class Reference

Standard command button. More...

#include <Button.h>

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

List of all members.

Public Member Functions

PLGUI_API Button (Widget *pParent=nullptr)
 Constructor.
virtual PLGUI_API ~Button ()
 Destructor.

Protected Member Functions

virtual PLGUI_API void OnButtonClicked () override
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 OnMouseEnter () override
 Called when the mouse has entered the widget.
virtual PLGUI_API void OnMouseLeave () override
 Called when the mouse has left the widget.

Detailed Description

Standard command button.


Constructor & Destructor Documentation

PLGUI_API PLGui::Button::Button ( Widget pParent = nullptr)

Constructor.

Parameters:
[in]pParentPointer to the parent widget
virtual PLGUI_API PLGui::Button::~Button ( ) [virtual]

Destructor.


Member Function Documentation

virtual PLGUI_API void PLGui::Button::OnButtonClicked ( ) [override, protected, virtual]

Reimplemented from PLGui::AbstractButton.

virtual PLGUI_API void PLGui::Button::OnDraw ( Graphics cGraphics) [override, protected, virtual]

Called to draw the widget.

Parameters:
[in]cGraphicsGraphics object used for painting

Reimplemented from PLGui::WidgetFunctions.

virtual PLGUI_API PLMath::Vector2i PLGui::Button::OnPreferredSize ( const PLMath::Vector2i vRefSize) const [override, protected, virtual]

Called when the widget is to calculate it's preferred size.

Parameters:
[in]vRefSizePrecalculated reference size, can be (-1, -1) if no reference size is available
Returns:
Preferred size
Remarks:
If the widget returns -1 in a component (X/Y), it means that there is no preferred size in that direction. A layout will in that case use 'as much space as possible', while the FitSize() functions will use the current size.

Reimplemented from PLGui::Widget.

virtual PLGUI_API void PLGui::Button::OnMouseEnter ( ) [override, protected, virtual]

Called when the mouse has entered the widget.

Reimplemented from PLGui::AbstractButton.

virtual PLGUI_API void PLGui::Button::OnMouseLeave ( ) [override, protected, virtual]

Called when the mouse has left the widget.

Reimplemented from PLGui::AbstractButton.


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


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:33
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported