Haiku API Bindings
StatusBar
Not logged in

Documentation | InterfaceKit | StatusBar

SYNOPSIS

Perl

use HaikuR1::StatusBar;

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

Python

from HaikuR1.InterfaceKit import HaikuR1.StatusBar

StatusBar(
    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

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

Python

StatusBar(
    frame = frame,
    name = name,
    label => [ $label, $trailingLabel ],
)
StatusBar(
    name = name,
    label => [ $label, $trailingLabel ],
)
StatusBar(archive)

CurrentValue

Returns the current value of the StatusBar

Perl

$statusbar->CurrentValue();

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

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

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

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

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

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

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

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

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

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

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

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

Python

statusbar.Update(delta, text, trailingText)
statusbar.SetTo(value, text, trailingText)

SCRIPTING SUITE

Box inherits the following suites: