- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::GUI::Controls::CCenterSlider Class Reference

Inheritance diagram for Exponent::GUI::Controls::CCenterSlider:

List of all members.

## Detailed Description

A slider that goes is center detented grpahically around 0.5 - internal value still goes from 0.0 - 1.0.

Date:
  17/04/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
  CCenterSlider.hpp,v 1.6 2007/02/08 21:07:54 paul Exp

Definition at line 39 of file CCenterSlider.hpp.

## Public Member Functions

- CCenterSlider (IControlRoot *root, const long uniqueId, const CRect &area, IActionListener *listener=NULL)
- virtual void drawControl (CGraphics &graphics)
- virtual void handleLeftButtonDown (CMouseEvent &event)
- virtual void handleLeftButtonUp (CMouseEvent &event)
- virtual void handleMouseMovement (CMouseEvent &event)
- virtual void handleMouseScroll (CMouseEvent &event)
- virtual void setColours (CAlphaColour frameColour, CAlphaColour backgroundColour, CAlphaColour handleColour, CAlphaColour handleOverColour, CAlphaColour handleDownColour)
- virtual void setValue (const double value)
- virtual ~CCenterSlider ()

## Protected Member Functions

- void handleMovement (CMouseEvent &event)

## Protected Attributes

- long m_centerPoint
- CAlphaColour m_handleColour
- CAlphaColour m_handleDownColour
- CAlphaColour m_handleOverColour
- bool m_isDragging
- bool m_isVertical
- CRect m_sliderArea
- CRolloverButton::ERolloverState m_state

## Constructor & Destructor Documentation

Exponent::GUI::Controls::CCenterSlider::CCenterSlider | ( | 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::CCenterSlider::~CCenterSlider | ( |  | ) | `[virtual]`

Destruction

## Member Function Documentation

virtual void Exponent::GUI::Controls::CCenterSlider::drawControl | ( | CGraphics & | graphics | ) | `[virtual]`

Draw the control

Parameters:

  | graphics | The graphics context

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

virtual void Exponent::GUI::Controls::CCenterSlider::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::CCenterSlider::handleLeftButtonUp | ( | CMouseEvent & | event | ) | `[virtual]`

Handle left button being released

Parameters:

  | event | The event to handle

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

virtual void Exponent::GUI::Controls::CCenterSlider::handleMouseMovement | ( | CMouseEvent & | event | ) | `[virtual]`

Handle the mouse movement

Parameters:

  | event | The event to handle

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

virtual void Exponent::GUI::Controls::CCenterSlider::handleMouseScroll | ( | CMouseEvent & | event | ) | `[virtual]`

Handle the scroll wheel

Parameters:

  | event | The event to handle

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

void Exponent::GUI::Controls::CCenterSlider::handleMovement | ( | CMouseEvent & | event | ) | `[protected]`

Handle movement

Parameters:

  | event | The event to handle movement from

virtual void Exponent::GUI::Controls::CCenterSlider::setColours | ( | CAlphaColour | frameColour,
|  | CAlphaColour | backgroundColour,
|  | CAlphaColour | handleColour,
|  | CAlphaColour | handleOverColour,
|  | CAlphaColour | handleDownColour |
| ) |  |  | `[virtual]`

Set the colours

Parameters:

  | frameColour | The colour of the outer frame
  | backgroundColour | The background colour
  | handleColour | The colour of the handle the user can grab
  | handleOverColour | The colour of the handle the user can grab when the mouse is over it
  | handleDownColour | The colour of the handle the user can grab when the mouse has grabbed it

virtual void Exponent::GUI::Controls::CCenterSlider::setValue | ( | const double | value | ) | `[virtual]`

Set the value (scaled 0 - 1

Parameters:

  | value | The value of the slider

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

## Member Data Documentation

long Exponent::GUI::Controls::CCenterSlider::m_centerPoint`[protected]`

The center point of this control

Definition at line 131 of file CCenterSlider.hpp.

CAlphaColour Exponent::GUI::Controls::CCenterSlider::m_handleColour`[protected]`

Colour of the slider

Definition at line 133 of file CCenterSlider.hpp.

CAlphaColour Exponent::GUI::Controls::CCenterSlider::m_handleDownColour`[protected]`

Colour of the slider when mouse is down

Definition at line 135 of file CCenterSlider.hpp.

CAlphaColour Exponent::GUI::Controls::CCenterSlider::m_handleOverColour`[protected]`

Colour of the slider when mouse is over

Definition at line 134 of file CCenterSlider.hpp.

bool Exponent::GUI::Controls::CCenterSlider::m_isDragging`[protected]`

Is the user dragging?

Definition at line 142 of file CCenterSlider.hpp.

bool Exponent::GUI::Controls::CCenterSlider::m_isVertical`[protected]`

Is the slider vertical?

Definition at line 141 of file CCenterSlider.hpp.

CRect Exponent::GUI::Controls::CCenterSlider::m_sliderArea`[protected]`

The area of the slider

Definition at line 139 of file CCenterSlider.hpp.

CRolloverButton::ERolloverState Exponent::GUI::Controls::CCenterSlider::m_state`[protected]`

Current state of slider (0 = off : 1 = over : 2 = on)

Definition at line 137 of file CCenterSlider.hpp.