Haiku API Bindings
StringView
Not logged in

Documentation | InterfaceKit | StringView

SYNOPSIS

Perl

use HaikuR1::StringView [];

my $string_view = HaikuR1::StringView->new(
    frame => $frame,
    name => $name,
    text => $text,
    resizingMode => $resizingMode,
    flags => $flags,
)

$window->AddChild($string_view);

Python

from HaikuR1.InterfaceKit import StringView, 

string_view = StringView(
    frame = frame,
    name = name,
    text = text,
    resizingMode = resizingMode,
    flags = flags,
)

window->AddChild(string_view)

DESCRIPTION

Exposes the BStringView object.

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

METHODS

Constructor

Creates a StringView.

Perl

HaikuR1::StringView->new(
    frame => $frame,
    name => $name,
    text => $text,
    resizingMode => $resizingMode,
    flags => $flags,
);
HaikuR1::StringView->new(
    name => $name,
    text => $text,
    flags => $flags,
);
HaikuR1::StringView->new($archive);

Python

StringView(
    frame = frame,
    name = name,
    text = text,
    resizingMode = resizingMode,
    flags = flags,
)
StringView(
    name = name,
    text = text,
    flags = flags,
)
StringView(archive)

Alignment

SetAlignment

Gets or sets the alignment for the StringView.

Perl

$stringview->Alignment();
$stringview->SetAlignment($flag);

Python

stringview.Alignment()
stringview.SetAlignment(flag)

Borders

SetBorders

Gets or sets the borders for the MenuBar; this method is used with Layout-enabled StringViews.

Perl

$menubar->Borders();
$menubar->SetBorders($borders);

Python

menubar.Borders()
menubar.SetBorders(borders)

Text

SetText

Gets or sets the text.

Perl

$stringview->Text();
$stringview->SetText($string);

Python

stringview.Text()
stringview.SetText(string)

Truncation

SetTruncation

Gets or sets the truncation mode for the StringView.

Perl

$stringview->Truncation();
$stringview->SetTruncation($flag);

Python

stringview.Truncation()
stringview.SetTruncation(flag)

ARCHIVABLE INTERFACE

StringView inherits the methods and hooks of Archivable.

HANDLER INTERFACE

StringView inherits the methods and hooks of Handler.

VIEW INTERFACE

StringView inherits the methods and hooks of View.

SCRIPTING SUITE

The name of StringView's scripting suite is suite/vnd.Be-string-view.

StringView also inherits the following suites: