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
A string, the test for the item.
outlineLevel
An integer, the outline level (used for OutlineListView.
expanded
A boolean, whether the item should be expanded; defaults to true (used for OutlineListView).
archive
A Message, contains an archived version of the StringItem.
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)
text
A string, the new 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.