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

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

# Exponent::GUI::Controls::CKnob Interface Reference

Inheritance diagram for Exponent::GUI::Controls::CKnob:

List of all members.

## Detailed Description

An rotary knob.

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

Definition at line 37 of file CKnob.hpp.

## Public Member Functions

- CKnob (IControlRoot *root, const long uniqueId, const CRect &area, IActionListener *listener=NULL)
- virtual void handleDoubleClick (CMouseEvent &event)
- virtual void handleLeftButtonDown (CMouseEvent &event)
- virtual void handleLeftButtonUp (CMouseEvent &event)
- virtual void handleMouseMovement (CMouseEvent &event)
- virtual void handleMouseScroll (CMouseEvent &event)
- virtual void setDefaultValue (const double value)
- virtual void setDeltaCoefficient (const double coefficient)
- virtual ~CKnob ()

## Protected Attributes

- double m_coefficient
- double m_defaultValue
- bool m_drag
- CPoint m_dragStartPoint
- double m_dragStartValue

## Constructor & Destructor Documentation

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

Destruction

## Member Function Documentation

virtual void Exponent::GUI::Controls::CKnob::handleDoubleClick | ( | CMouseEvent & | event | ) | `[virtual]`

Handle a double click on the left button

Parameters:

  | event | The event to handle

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

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

Handle the scroll wheel

Parameters:

  | event | The event to handle

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

virtual void Exponent::GUI::Controls::CKnob::setDefaultValue | ( | const double | value | ) | `[inline, virtual]`

Set the default value

Parameters:

  | value | The default value that is returned to on a double click

Definition at line 101 of file CKnob.hpp.

References m_defaultValue.

virtual void Exponent::GUI::Controls::CKnob::setDeltaCoefficient | ( | const double | coefficient | ) | `[inline, virtual]`

Set the coefficient

Parameters:

  | coefficient | Changes to this value result infasteror slower knob movement. Good default is 0.005

Definition at line 107 of file CKnob.hpp.

References m_coefficient.

## Member Data Documentation

double Exponent::GUI::Controls::CKnob::m_coefficient`[protected]`

Coefficient for movement

Definition at line 117 of file CKnob.hpp.

Referenced by setDeltaCoefficient().

double Exponent::GUI::Controls::CKnob::m_defaultValue`[protected]`

Default value

Definition at line 115 of file CKnob.hpp.

Referenced by setDefaultValue().

bool Exponent::GUI::Controls::CKnob::m_drag`[protected]`

Are we dragging

Definition at line 118 of file CKnob.hpp.

CPoint Exponent::GUI::Controls::CKnob::m_dragStartPoint`[protected]`

Where did they start click-dragging

Definition at line 119 of file CKnob.hpp.

double Exponent::GUI::Controls::CKnob::m_dragStartValue`[protected]`

Starting drag value to determine move amount

Definition at line 116 of file CKnob.hpp.