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)
frameA 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.
nameA string, the Button's internal name.
resizingModeAn integer, the resizing mode. (See the resizing mode constants.) Should only be specified when there is a frame. Defaults to
B_FOLLOW_NONE.flagsAn integer, view flags. (See the view flag constants.)
borderOne of the border style constants.
childA View that will be added to the Box.
archiveA 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)
borderAn 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)
stringA string, the new label.
viewLabelA 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: