GMColorPicker:
Filter:
GraphicalModule/Classes (extension) | GUI > Graphical Module

GMColorPicker
ExtensionExtension

A color picker for creating graphical interfaces

Description

GMColorPicker is a graphical interface that allows to select a color .

It is not optimized and might respond slowly depending on your hardware capacities. This can be mitigated by reducing the view size.

It only responds to mouse down clicks, and does not discriminate button identifiers.

Class Methods

.new

Creates a new instance of GMColorPicker.

Its graphical properties are defined by its associated GMStyle.

Returns:

a GMColorPicker instance.

Instance Methods

.action

Sets or gets the Function to be triggered when the color is changed. This Function takes the new color as argument.

Arguments:

aFunction

A Function with one argument, the newly picked color.

.setColor

Sets the currently selected color. This doesn't evaluate the associated action.

Internal Methods

.draw

The function associated to the View's drawFunc. Shouldn't be modified.

.hsvToColor

.prGetInput

.prDrawAlphaHelper

.prDrawAlphaPicker

.prDrawColorHelper

.prDrawHueHelper

.prDrawHuePicker

.prDrawSVGradient

.prDrawSaturationHelper

Examples