# WoopsiUI::ColourPicker Class Reference

`#include <colourpicker.h>`

Inheritance diagram for WoopsiUI::ColourPicker:

List of all members.

## Public Member Functions
| ColourPicker (s16 x, s16 y, u16 width, u16 height, const WoopsiString &title, u16 colour, u32 flags, GadgetStyle *style=NULL)
virtual u16 | getColour () const
virtual void | setColour (u16 colour)
virtual void | handleReleaseEvent (const GadgetEventArgs &e)
virtual void | handleValueChangeEvent (const GadgetEventArgs &e)
## Protected Member Functions
virtual void | onResize (u16 width, u16 height)
virtual | ~ColourPicker ()
| ColourPicker (const ColourPicker &colourPicker)
## Protected Attributes
Button * | _okButton
Button * | _cancelButton
Button * | _colourButton
SliderHorizontal * | _redSlider
SliderHorizontal * | _greenSlider
SliderHorizontal * | _blueSlider

## Detailed Description

Provides a window with RGB colour selection sliders.

## Constructor & Destructor Documentation

WoopsiUI::ColourPicker::ColourPicker | ( | s16 | x,
|  | s16 | y,
|  | u16 | width,
|  | u16 | height,
|  | const WoopsiString & | title,
|  | u16 | colour,
|  | u32 | flags,
|  | GadgetStyle * | style = `NULL` |
| ) |  |  |

Constructor.

Parameters:

  | x | The x co-ordinate of the window.
  | y | The y co-ordinate of the window.
  | width | The width of the window.
  | height | The height of the window.
  | title | The title of the window.
  | flags | Standard flags.
  | style | Optional gadget style.

virtual WoopsiUI::ColourPicker::~ColourPicker | ( |  | ) | `[inline, protected, virtual]`

Destructor.

WoopsiUI::ColourPicker::ColourPicker | ( | const ColourPicker & | colourPicker | ) | `[inline, protected]`

Copy constructor is protected to prevent usage.

## Member Function Documentation

virtual u16 WoopsiUI::ColourPicker::getColour | ( |  | ) | const`[virtual]`

Get the colour currently shown by the gadget.

Returns:
  The colour currently shown by the gadget.

virtual void WoopsiUI::ColourPicker::handleReleaseEvent | ( | const GadgetEventArgs & | e | ) | `[virtual]`

Handles events raised by its sub-gadgets.

Parameters:

  | e | Event arguments.

Reimplemented from WoopsiUI::AmigaWindow.

virtual void WoopsiUI::ColourPicker::handleValueChangeEvent | ( | const GadgetEventArgs & | e | ) | `[virtual]`

Handles events raised by its sub-gadgets.

Parameters:

  | e | Event arguments.

Reimplemented from WoopsiUI::GadgetEventHandler.

virtual void WoopsiUI::ColourPicker::onResize | ( | u16 | width,
|  | u16 | height |
| ) |  |  | `[protected, virtual]`

Resize the textbox to the new dimensions.

Parameters:

  | width | The new width.
  | height | The new height.

Reimplemented from WoopsiUI::AmigaWindow.

virtual void WoopsiUI::ColourPicker::setColour | ( | u16 | colour | ) | `[virtual]`

Sets the colour shown by the gadget.

Parameters:

  | colour | The new colour to display.

## Member Data Documentation

SliderHorizontal* WoopsiUI::ColourPicker::_blueSlider`[protected]`

Pointer to the Blue value slider

Button* WoopsiUI::ColourPicker::_cancelButton`[protected]`

Pointer to the cancel button.

Button* WoopsiUI::ColourPicker::_colourButton`[protected]`

Displays the current colour.

SliderHorizontal* WoopsiUI::ColourPicker::_greenSlider`[protected]`

Pointer to the Green value slider

Button* WoopsiUI::ColourPicker::_okButton`[protected]`

Pointer to the OK button.

SliderHorizontal* WoopsiUI::ColourPicker::_redSlider`[protected]`

Pointer to the Red value slider

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

- colourpicker.h