Crazy Eddie's GUI System  0.8.4
CEGUI::ColourPicker Class Reference

Base class for the ColourPicker widget. More...

+ Inheritance diagram for CEGUI::ColourPicker:
+ Collaboration diagram for CEGUI::ColourPicker:

List of all members.

Public Member Functions

 ColourPicker (const String &type, const String &name)
 Constructor for ColourPicker class.
 ~ColourPicker (void)
 Destructor for ColourPicker class.
void setColour (const Colour &newColour)
 Set the current colour of the colour picker manually and refresh the ColourPicker elements accordingly.
Colour getColour ()
 Return the current colour of the colour picker.
void initialiseComponents (void)
 Initialises the Window based object ready for use.

Static Public Attributes

static const String EventNamespace
 Namespace for global events.
static const String WidgetTypeName
 Window factory name.
static const String EventOpenedPicker
static const String EventClosedPicker
static const String EventAcceptedColour

Protected Member Functions

void initialiseColourPickerControlsWindow ()
 Initialises the properties for the creation of the ColourPickerControls window and decides if a new window of this type is necessary.
void createColourPickerControlsWindow (const String &colourPickerControlsStyle)
 Creates the ColourPickerControls window.
WindowgetColourRect (void)
 Return a Window pointer to the ColourRect component widget for this ColourPicker.
bool colourRect_ColourRectClickedHandler (const EventArgs &e)
virtual void onColourRectClicked (WindowEventArgs &e)

Protected Attributes

bool d_shareColourPickerControlsWindow
ColourPickerControlsd_colourPickerControlsWindow
Colour d_selectedColour
 selected colour of the ColourPickerControls

Static Protected Attributes

static const String ColourRectName
 Widget name for the open button (colour rect) component.
static std::map< Window *, int > s_colourPickerWindows

Detailed Description

Base class for the ColourPicker widget.


Member Function Documentation

void CEGUI::ColourPicker::createColourPickerControlsWindow ( const String colourPickerControlsStyle) [protected]

Creates the ColourPickerControls window.

Parameters:
colourPickerControlsStyleThe window type of the window that will be created.
Note:
This will be called once during the initialisation of the components.
Window* CEGUI::ColourPicker::getColourRect ( void  ) [protected]

Return a Window pointer to the ColourRect component widget for this ColourPicker.

Returns:
Pointer to a Window object.
Exceptions:
UnknownObjectExceptionThrown if the colour rectangle component does not exist.

Initialises the properties for the creation of the ColourPickerControls window and decides if a new window of this type is necessary.

Note:
This will be called once during the initialisation of the components.
void CEGUI::ColourPicker::initialiseComponents ( void  ) [virtual]

Initialises the Window based object ready for use.

Note:
This must be called for every window created. Normally this is handled automatically by the WindowManager.
Returns:
Nothing

Reimplemented from CEGUI::Window.

void CEGUI::ColourPicker::setColour ( const Colour newColour)

Set the current colour of the colour picker manually and refresh the ColourPicker elements accordingly.

Parameters:
settingnewColour the selected Colour for the ColourPicker

Member Data Documentation

Event fired when a new colour is set and accepted by the colour picker. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Window that triggered this event.

Event fired when the ColourPickerControls window is closed. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Window that triggered this event.

Event fired when the ColourPickerControls window is opened. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Window that triggered this event.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends