CButton Class Reference

This class is basic button class. More...

#include <Button.h>

Inheritance diagram for CButton:

Inheritance graph
[legend]
Collaboration diagram for CButton:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CButton ()
 Basic button constructor.
 ~CButton ()
 Basic button destructor.
virtual bool Init (RECT box, bool visible, bool enabled, WCHAR *caption, RECT textBox, IDirectSound8 *pDS, LPWSTR clickSoundFilename, LPWSTR focusSoundFilename, int type)
 Initialize button object.
virtual bool OnEvent (UINT uMsg, WPARAM wParam, LPARAM lParam)
 OnEvent should handle events like mouse click and mouse over. For button to handle these events, button class must contain info about button position, size, etc.
virtual void OnRender (LPDIRECT3DDEVICE9 pd3dDevice)
 OnRender is stub for basic button class, it is implemented in classes who inherit CButton. (Should be declared virutal).
virtual void OnFrameMove (LPDIRECT3DDEVICE9 pd3dDevice, float fElapsedTime)
 OnFrameMove is stub for basic button class, it is implemented in classes who inherit CButton. (Should be declared virutal).
void SetFocus (bool focus)
 This function sets focus on button.
void OnButtonPress ()
 Button press function.


Detailed Description

This class is basic button class.

All other button classes inherit functionality from this basic button class.

Author:
Petar Bajic
Date:
January, 16 2007.

Constructor & Destructor Documentation

CButton::CButton (  ) 

Basic button constructor.

Author:
Petar Bajic
Date:
January, 16 2007.

CButton::~CButton (  ) 

Basic button destructor.

Author:
Petar Bajic
Date:
January, 16 2007.


Member Function Documentation

bool CButton::Init ( RECT  box,
bool  visible,
bool  enabled,
WCHAR *  caption,
RECT  textBox,
IDirectSound8 *  pDS,
LPWSTR  clickSoundFilename,
LPWSTR  focusSoundFilename,
int  type 
) [virtual]

Initialize button object.

Parameters:
type MPE_BUTTON_TYPE enum variable.
Author:
Petar Bajic
Date:
January, 16 2007.

bool CButton::OnEvent ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
) [virtual]

OnEvent should handle events like mouse click and mouse over. For button to handle these events, button class must contain info about button position, size, etc.

Author:
Petar Bajic
Date:
January, 16 2007.

Reimplemented in C2DButton.

void CButton::OnRender ( LPDIRECT3DDEVICE9  pd3dDevice  )  [virtual]

OnRender is stub for basic button class, it is implemented in classes who inherit CButton. (Should be declared virutal).

Parameters:
pd3dDevice DirectX 3D device.
Author:
Petar Bajic
Date:
January, 16 2007.

void CButton::OnFrameMove ( LPDIRECT3DDEVICE9  pd3dDevice,
float  fElapsedTime 
) [virtual]

OnFrameMove is stub for basic button class, it is implemented in classes who inherit CButton. (Should be declared virutal).

Parameters:
fElapsedTime time between two frames
Author:
Petar Bajic
Date:
January, 16 2007.

Reimplemented in C2DButton.

void CButton::SetFocus ( bool  focus  ) 

This function sets focus on button.

Parameters:
focus true if button is selected.
Author:
Petar Bajic
Date:
January, 16 2007.

void CButton::OnButtonPress (  ) 

Button press function.

Author:
Petar Bajic
Date:
January, 16 2007.


The documentation for this class was generated from the following files:
Generated on Wed Mar 26 16:00:54 2008 for Turtle Shepherd by  doxygen 1.5.3