Haiku API Bindings
StringItem
Not logged in

Documentation | InterfaceKit | StringItem

SYNOPSIS

Perl

use HaikuR1::StringItem;

my $item = HaikuR1::StringItem->new();
$listview->AddItem($item);

Python

from HaikuR1.SupportKit import StringItem

item = StringItem()
listview.AddItem(item)

DESCRIPTION

Exposes the BStringItem object.

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

METHODS

Constructor

Creates a StringItem.

Perl

HaikuR1::StringItem->new($text, $outlineLevel, $expanded);
HaikuR1::StringItem->new($archive);

Python

StringItem(text, outlineLevel, expanded)
StringItem(archive)

Text

SetText

Gets or sets the text. SetText can also be called as a hook.

Perl

$stringitem->Text();
$stringitem->SetText($text);

Python

stringitem.Text()
stringitem.SetText(text)

BaselineOffset

Returns the offset from the bottom of the frame to the baseline for the font, as a floating point number. Meant to be called from SetText.

Perl

$stringitem->BaselineOffset();

Python

stringitem.BaselineOffset()

ARCHIVABLE INTERFACE

StringItem inherits the methods and hooks of Archivable.

LISTITEM INTERFACE

StringItem inherits the methods and hooks of ListItem.