Pyrogenesis  trunk
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes | List of all members
IGUIButtonBehavior Class Reference

Appends button behaviours to the IGUIObject. More...

#include <IGUIButtonBehavior.h>

Inheritance diagram for IGUIButtonBehavior:
Inheritance graph
[legend]
Collaboration diagram for IGUIButtonBehavior:
Collaboration graph
[legend]

Public Member Functions

 IGUIButtonBehavior (IGUIObject &pObject)
 
virtual ~IGUIButtonBehavior ()
 
virtual void HandleMessage (SGUIMessage &Message)
 
const CGUISpriteInstanceGetButtonSprite (const CGUISpriteInstance &sprite, const CGUISpriteInstance &sprite_over, const CGUISpriteInstance &sprite_pressed, const CGUISpriteInstance &sprite_disabled) const
 This is a function that lets a button being drawn, it regards if it's over, disabled, pressed and such. More...
 

Protected Member Functions

virtual void ResetStates ()
 

Protected Attributes

bool m_Pressed
 Everybody knows how a button works, you don't simply press it, you have to first press the button, and then release it... More...
 
bool m_PressedRight
 
CGUISimpleSetting< CStrW > m_SoundDisabled
 
CGUISimpleSetting< CStrW > m_SoundEnter
 
CGUISimpleSetting< CStrW > m_SoundLeave
 
CGUISimpleSetting< CStrW > m_SoundPressed
 
CGUISimpleSetting< CStrW > m_SoundReleased
 

Static Protected Attributes

static const CStr EventNamePress = "Press"
 
static const CStr EventNamePressRight = "PressRight"
 
static const CStr EventNamePressRightDisabled = "PressRightDisabled"
 
static const CStr EventNameDoublePress = "DoublePress"
 
static const CStr EventNameDoublePressRight = "DoublePressRight"
 
static const CStr EventNameRelease = "Release"
 
static const CStr EventNameReleaseRight = "ReleaseRight"
 

Private Member Functions

 NONCOPYABLE (IGUIButtonBehavior)
 

Private Attributes

IGUIObjectm_pObject
 Reference to the IGUIObject. More...
 

Detailed Description

Appends button behaviours to the IGUIObject.

Can be used with multiple inheritance alongside IGUISettingsObject and such.

Constructor & Destructor Documentation

◆ IGUIButtonBehavior()

IGUIButtonBehavior::IGUIButtonBehavior ( IGUIObject pObject)

◆ ~IGUIButtonBehavior()

IGUIButtonBehavior::~IGUIButtonBehavior ( )
virtual

Member Function Documentation

◆ GetButtonSprite()

const CGUISpriteInstance & IGUIButtonBehavior::GetButtonSprite ( const CGUISpriteInstance sprite,
const CGUISpriteInstance sprite_over,
const CGUISpriteInstance sprite_pressed,
const CGUISpriteInstance sprite_disabled 
) const

This is a function that lets a button being drawn, it regards if it's over, disabled, pressed and such.

Parameters
spriteSprite drawn when not pressed, hovered or disabled
sprite_overSprite drawn when m_MouseHovering is true
sprite_pressedSprite drawn when m_Pressed is true
sprite_disabledSprite drawn when "enabled" is false

◆ HandleMessage()

void IGUIButtonBehavior::HandleMessage ( SGUIMessage Message)
virtual

◆ NONCOPYABLE()

IGUIButtonBehavior::NONCOPYABLE ( IGUIButtonBehavior  )
private

◆ ResetStates()

void IGUIButtonBehavior::ResetStates ( )
protectedvirtual
See also
IGUIObject::ResetStates()

Reimplemented in CSlider, CButton, and CCheckBox.

Member Data Documentation

◆ EventNameDoublePress

const CStr IGUIButtonBehavior::EventNameDoublePress = "DoublePress"
staticprotected

◆ EventNameDoublePressRight

const CStr IGUIButtonBehavior::EventNameDoublePressRight = "DoublePressRight"
staticprotected

◆ EventNamePress

const CStr IGUIButtonBehavior::EventNamePress = "Press"
staticprotected

◆ EventNamePressRight

const CStr IGUIButtonBehavior::EventNamePressRight = "PressRight"
staticprotected

◆ EventNamePressRightDisabled

const CStr IGUIButtonBehavior::EventNamePressRightDisabled = "PressRightDisabled"
staticprotected

◆ EventNameRelease

const CStr IGUIButtonBehavior::EventNameRelease = "Release"
staticprotected

◆ EventNameReleaseRight

const CStr IGUIButtonBehavior::EventNameReleaseRight = "ReleaseRight"
staticprotected

◆ m_pObject

IGUIObject& IGUIButtonBehavior::m_pObject
private

Reference to the IGUIObject.

Private, because we don't want to inherit it in multiple classes.

◆ m_Pressed

bool IGUIButtonBehavior::m_Pressed
protected

Everybody knows how a button works, you don't simply press it, you have to first press the button, and then release it...

in between those two steps you can actually leave the button area, as long as you release it within the button area... Anyway this lets us know we are done with step one (clicking).

◆ m_PressedRight

bool IGUIButtonBehavior::m_PressedRight
protected

◆ m_SoundDisabled

CGUISimpleSetting<CStrW> IGUIButtonBehavior::m_SoundDisabled
protected

◆ m_SoundEnter

CGUISimpleSetting<CStrW> IGUIButtonBehavior::m_SoundEnter
protected

◆ m_SoundLeave

CGUISimpleSetting<CStrW> IGUIButtonBehavior::m_SoundLeave
protected

◆ m_SoundPressed

CGUISimpleSetting<CStrW> IGUIButtonBehavior::m_SoundPressed
protected

◆ m_SoundReleased

CGUISimpleSetting<CStrW> IGUIButtonBehavior::m_SoundReleased
protected

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