Exponent::GUI::Controls::CLatchingButton Interface Reference

Inheritance diagram for Exponent::GUI::Controls::CLatchingButton:

Exponent::GUI::Controls::CControl Exponent::GUI::Controls::IControl Exponent::GUI::Controls::CPopupButton List of all members.

Detailed Description

A button that changes state on each click of the mouse.

Date:
28/03/2005
Author:
Paul Chana
Version:
1.0.0 Initial version
Note:
All contents of this source code are copyright 2005 Exp Digital Uk.
This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
Certain sections of this code may come from other sources. They are credited where applicable.
If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk
Id
CLatchingButton.hpp,v 1.7 2007/02/08 21:07:54 paul Exp

Definition at line 32 of file CLatchingButton.hpp.

Public Member Functions

Protected Attributes


Constructor & Destructor Documentation

Exponent::GUI::Controls::CLatchingButton::CLatchingButton ( IControlRoot root,
const long  uniqueId,
const CRect &  area,
IActionListener *  listener = NULL 
)

Construction

Parameters:
root The root control that this control is being added to
uniqueId The unique Identifier of this control or CCONTROL_NO_ID_REQUIRED if no id is required
area The area of this control relative to the root controls top left
listener The action listener

virtual Exponent::GUI::Controls::CLatchingButton::~CLatchingButton (  )  [virtual]

Destruction


Member Function Documentation

virtual void Exponent::GUI::Controls::CLatchingButton::drawControl ( CGraphics &  graphics  )  [virtual]

Draw the control

Parameters:
graphics The graphics context

Reimplemented from Exponent::GUI::Controls::CControl.

virtual void Exponent::GUI::Controls::CLatchingButton::handleLeftButtonDown ( CMouseEvent &  event  )  [virtual]

Handle left button being clicked

Parameters:
event The event to handle

Reimplemented from Exponent::GUI::Controls::CControl.

virtual void Exponent::GUI::Controls::CLatchingButton::handleLeftButtonUp ( CMouseEvent &  event  )  [virtual]

Handle left button being released

Parameters:
event The event to handle

Reimplemented from Exponent::GUI::Controls::CControl.

Implemented in Exponent::GUI::Controls::CPopupButton.

virtual void Exponent::GUI::Controls::CLatchingButton::handleMouseMovement ( CMouseEvent &  event  )  [virtual]

Handle mouse movement

Parameters:
event The event to handle

Reimplemented from Exponent::GUI::Controls::CControl.

virtual bool Exponent::GUI::Controls::CLatchingButton::isOn (  )  const [inline, virtual]

Is the button on or off?

Return values:
bool True if button is on, false otheriwse

Definition at line 70 of file CLatchingButton.hpp.

References m_state.

virtual void Exponent::GUI::Controls::CLatchingButton::setDownImage ( IImage *  theImage  )  [virtual]

Set the off image

Parameters:
theImage The image to use when the button is turned off

void Exponent::GUI::Controls::CLatchingButton::setLabelText ( const CString &  text  )  [inline]

Set the label text

Parameters:
text The text to display on the button if there is no image

Definition at line 119 of file CLatchingButton.hpp.

References m_labelText.

virtual void Exponent::GUI::Controls::CLatchingButton::setValue ( const double  value  )  [virtual]

Set the vlaue of the control

Parameters:
value In range of 0 - 1 with >= 0.5 Being on

Reimplemented from Exponent::GUI::Controls::CControl.

virtual void Exponent::GUI::Controls::CLatchingButton::useCursorChange ( const bool  use = true  )  [inline, virtual]

Should we use cursor change?

Parameters:
use If true then when mouse over occurs mouse is changed to hand cursor
Note:
Not recommended on mac, cos it looks messy!

Definition at line 77 of file CLatchingButton.hpp.

References m_cursorChange.


Member Data Documentation

bool Exponent::GUI::Controls::CLatchingButton::m_cursorChange [protected]

Should the cursor change

Definition at line 129 of file CLatchingButton.hpp.

Referenced by useCursorChange().

IImage* Exponent::GUI::Controls::CLatchingButton::m_downImage [protected]

The off image

Definition at line 127 of file CLatchingButton.hpp.

CString Exponent::GUI::Controls::CLatchingButton::m_labelText [protected]

Text drawn on the face of the button if no image is set

Definition at line 130 of file CLatchingButton.hpp.

Referenced by setLabelText().

bool Exponent::GUI::Controls::CLatchingButton::m_state [protected]

The current state (on or off)

Definition at line 128 of file CLatchingButton.hpp.

Referenced by isOn().


Infinity API - Exponent::GUI::Controls::CLatchingButton Interface Reference generated on 7 Mar 2007