Haiku API Bindings
Box
Not logged in

Documentation | InterfaceKit | Box

SYNOPSIS

Perl

use HaikuR1::Box;

my $box = HaikuR1::Box->new(
    frame => $frame,
    name => $name,
    resizingMode => $resizingMode,
    flags => $flags,
    border => $border,
);
$window->AddChild($box);

Python

from HaikuR1.InterfaceKit import Box

box = Box(
    frame = frame,
    name = name,
    label = label,
    flags = flags,
    border = border,
)
window.AddChild(box)

DESCRIPTION

Exposes the BBox object.

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

METHODS

Constructor

Creates a Box. The box has no label; use SetLabel to assign one.

Perl

HaikuR1::Box->new(
    frame => $frame,
    name => $name,
    resizingMode => $resizingMode,
    flags => $flags,
    border => $border,
    child => $child,
);
HaikuR1::Box->new($archive);

Python

Box(
    frame = frame,
    name = name,
    resizingMode = resizingMode,
    flags = flags,
    border = border,
    child => child,
)
Box(archive)

Border

SetBorder

Gets or sets the border style.

Perl

$box->Border();
$box->SetBorder($border);

Python

box.Border()
box.SetBorder(border)

InnerFrame

When using Layouts, this will return the inner frame Rect.

Perl

$box->InnerFrame();

Python

box.InnerFrame()

Label

LabelView

SetLabel

Gets or sets the label, either as a string or as a View.

Perl

$box->Label();
$box->LabelView();
$box->SetLabel($string);
$box->SetLabel($labelView);

Python

box.Label()
box.LabelView()
box.SetLabel(string)
box.SetLabel(labelView)

TopBorderOffset

When using Layouts, this will return the top coordinate of the border.

Perl

$box->TopBorderOffset();

Python

box.TopBorderOffset()

ARCHIVABLE INTERFACE

Box inherits the methods and hooks of Archivable.

HANDLER INTERFACE

Box inherits the methods and hooks of Handler.

VIEW INTERFACE

Box inherits the methods and hooks of View.

SCRIPTING SUITE

Box inherits the following suites: