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)
frame
A Rect that indicates where on the parent Window the View should be. You should not specify a frame on a View that will be added to a parent which uses a Layout.
name
A string, the Button's internal name.
resizingMode
An integer, the resizing mode. (See the resizing mode constants.) Should only be specified when there is a frame. Defaults to
B_FOLLOW_NONE
.flags
An integer, view flags. (See the view flag constants.)
border
One of the border style constants.
child
A View that will be added to the Box.
archive
A Message, contains an archived version of the Box.
Border
SetBorder
Gets or sets the border style.
Perl
$box->Border(); $box->SetBorder($border);
Python
box.Border() box.SetBorder(border)
border
An integer, one of the border style constants.
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)
string
A string, the new label.
viewLabel
A View to use in place of a label.
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: