Haiku API Bindings
ColorControl
Not logged in

Documentation | InterfaceKit | ColorControl

SYNOPSIS

Perl

use HaikuR1::ColorControl [];

my $color_control = HaikuR1::ColorControl->new(
    start => $start,
    layout => $layout,
    cellSize => $cellSize,
    name => $name,
    message => $message,
    useOffscreen => $useOffscreen,
);
$window->AddChild($color_control);

Python

import HaikuR1.ColorControl []

color_control = ColorControl(
    start = start,
    layout = layout,
    cellSize = cellSize,
    name = name,
    message = message,
    useOffscreen = useOffscreen,
)
window.AddChild(button)

DESCRIPTION

Exposes the BColorControl object.

For more information on ColorControl, see the Be Book class description, the Be Book overview, and the Haiku Book class description.

METHODS

Constructor

Creates a ColorControl.

Perl

HaikuR1::ColorControl->new(
    start => $start,
    layout => $layout,
    cellSize => $cellSize,
    name => $name,
    message => $message,
    useOffscreen => $useOffscreen,
);
HaikuR1::ColorControl->new($archive);

Python

ColorControl(
    start = start,
    layout = layout,
    cellSize = cellSize,
    name = name,
    message = message,
    useOffscreen = useOffscreen,
)
ColorControl(archive)

CellSize

SetCellSize

Gets or sets the cell size.

Perl

$colorcontrol->CellSize();
$colorcontrol->SetCellSize($size);

Python

colorcontrol.CellSize()
colorcontrol.SetCellSize(size)

Layout

Gets the current layout, as an integer layout constant.

Perl

$colorcontrol->Layout();

Python

colorcontrol.Layout()

ValueAsColor

Gets the value as an rgb_color.

Perl

$colorcontrol->ValueAsColor();

Python

colorcontrol.ValueAsColor()

ARCHIVABLE INTERFACE

ColorControl inherits the methods and hooks of Archivable.

HANDLER INTERFACE

ColorControl inherits the methods and hooks of Handler.

VIEW INTERFACE

ColorControl inherits the methods and hooks of View.

The following differs from the View version:

SetLayout

Takes either a Layout object (like the View version) or a layout constant. Both versions can be called as hooks.

Perl

$colorcontrol->SetLayout($layout);

Python

colorcontrol.SetLayout(layout)

CONTROL INTERFACE

ColorControl inherits the methods and hooks of Control.

The following differs from the Control version:

SetValue

Takes either an integer value (like the Control version) or an rgb_color. Only the integer version can be called as a hook.

Perl

$colorcontrol->SetValue($value);

Python

colorcontrol.SetValue(value)

CONSTANTS

Cell layout

Perl

use HaikuR1::ColorControl qw(:layout)

Python

Python does not support export tags.

SCRIPTING SUITE

Button inherits the following suites: