GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Prima::Dialog::ColorDialog(3) User Contributed Perl Documentation Prima::Dialog::ColorDialog(3)

Prima::Dialog::ColorDialog - standard color selection facilities

        use Prima qw(Dialog::ColorDialog Application);

        my $p = Prima::Dialog::ColorDialog-> create(
                quality => 1,
        );
        printf "color: %06x", $p-> value if $p-> execute == mb::OK;

The module contains two packages, "Prima::Dialog::ColorDialog" and "Prima::ColorComboBox", used as standard tools for interactive color selection. "Prima::ColorComboBox" is a modified combo widget, which provides selecting from predefined palette but also can invoke "Prima::Dialog::ColorDialog" window.

quality BOOLEAN
Used to increase visual quality of the dialog if run on paletted displays.

Default value: 0

value COLOR
Selects the color, represented by the color wheel and other dialog controls.

Default value: "cl::White"

hsv2rgb HUE, SATURATION, LUMINOSITY
Converts color from HSV to RGB format and returns three integer values, red, green, and blue components.
rgb2hsv RED, GREEN, BLUE
Converts color from RGB to HSV format and returns three numerical values, hue, saturation, and luminosity components.
xy2hs X, Y, RADIUS
Maps X and Y coordinate values onto a color wheel with RADIUS in pixels. The code uses RADIUS = 119 for mouse position coordinate mapping. Returns three values, - hue, saturation and error flag. If error flag is set, the conversion has failed.
hs2xy HUE, SATURATION
Maps hue and saturation onto 256-pixel wide color wheel, and returns X and Y coordinates of the corresponding point.
create_wheel SHADES, BACK_COLOR
Creates a color wheel with number of SHADES given, drawn on a BACK_COLOR background, and returns a "Prima::DeviceBitmap" object.
create_wheel_shape SHADES
Creates a circular 1-bit mask, with radius derived from SHAPES. SHAPES must be same as passed to create_wheel. Returns "Prima::Image" object.

BeginDragColor $PROPERTY
Called when the user starts dragginh a color from the color wheel by with left mouse button and combination of Alt, Ctrl, and Shift keys. $PROPERTY is one of "Prima::Widget" color properties, and depends on combination of keys:

        Alt              backColor
        Ctrl             color
        Alt+Shift        hiliteBackColor
        Ctrl+Shift       hiliteColor
        Ctrl+Alt         disabledColor
        Ctrl+Alt+Shift   disabledBackColor
    

Default action reflects the property to be changes in the dialog title

Change
The notification is called when the value property is changed, either interactively or as a result of direct call.
EndDragColor $PROPERTY, $WIDGET
Called when the user releases the mouse drag over a Prima widget. Default action sets "$WIDGET->$PROPERTY" to the current color value.

$colorWheel
Contains cached result of create_wheel call.
$colorWheelShape
Contains cached result of create_wheel_shape call.

Colorify INDEX, COLOR_PTR
"nt::Action" callback, designed to map combo palette index into a RGB color. INDEX is an integer from 0 to colors - 1, COLOR_PTR is a reference to a result scalar, where the notification is expected to write the resulting color.

colors INTEGER
Defines amount of colors in the fixed palette of the combo box.
value COLOR
Contains the color selection as 24-bit integer value.

Prima, Prima::ComboBox, examples/cv.pl.

Dmitry Karasik, <dmitry@karasik.eu.org>.
2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.