Haiku API Bindings
StatusBar
Not logged in

Documentation | InterfaceKit | StatusBar

SYNOPSIS

Perl

Python

use HaikuR1::StatusBar;

HaikuR1::StatusBar->new(
    frame => $frame,
    name => $name,
    label => [ $label, $trailingLabel ],
);

DESCRIPTION

Exposes the BStatusBar object.

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

METHODS

Constructor

Creates a StatusBar.

Perl

Python

HaikuR1::StatusBar->new(
    frame => $frame,
    name => $name,
    label => [ $label, $trailingLabel ],
);
HaikuR1::StatusBar->new(
    name => $name,
    label => [ $label, $trailingLabel ],
);
HaikuR1::StatusBar->new($archive);

CurrentValue

Returns the current value of the StatusBar

Perl

Python

$statusbar->CurrentValue();

BarColor

SetBarColor

Gets or sets the bar color. (The default value when the object is created is 50, 150, 255.)

SetBarColor can also be called as a hook.

Perl

Python

$statusbar->BarColor();
$statusbar->SetBarColor($color);

BarHeight

SetBarHeight

Gtes or sets the bar height. (The default value when the object is created is calculated from the font.)

SetBarHeight can also be called as a hook.

Perl

Python

$statusbar->BarHeight();
$statusbar->SetBarHeight($height);

Label

TrailingLabel

Reset

Gets or sets the label(s) for the object.

Reset can also be called as a hook.

Perl

Python

$statusbar->Label();
$statusbar->TrailingLabel();
$statusbar->Reset($label, $trailingLabel);

MaxValue

SetMaxValue

Gets or sets the maximum value for the StatusBar. (The default value when the object is created is 100.)

SetMaxValue can also be called as a hook.

Perl

Python

$statusbar->MaxValue();
$statusbar->SetMaxValue($max);

Text

TrailingText

SetText

SetTrailingText

Gets or sets the specified text string. (Defaults to an empty string when the object is created.)

SetText and SetTrailingText can also be called as hooks.

Perl

Python

$statusbar->Text();
$statusbar->TrailingText();
$statusbar->SetText($string);
$statusbar->SetTrailingText($string);

Update

SetTo

Change the StatusBar's value and text strings. Update will increase the current value by the given amount; SetTo will replace the current value

Perl

Python

$statusbar->Update($delta, $text, $trailingText);
$statusbar->SetTo($value, $text, $trailingText);

SCRIPTING SUITE

Box inherits the following suites: