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)
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 View's internal name.
textA string, the text to be displayed.
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.)
archiveA Message, contains an archived version of the StringView.
Alignment
SetAlignment
Gets or sets the alignment for the StringView.
Perl
$stringview->Alignment(); $stringview->SetAlignment($flag);
Python
stringview.Alignment() stringview.SetAlignment(flag)
flagOne of the alignment constants.
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)
bordersAn integer combination of the ControlLook border constants.
Text
SetText
Gets or sets the text.
Perl
$stringview->Text(); $stringview->SetText($string);
Python
stringview.Text() stringview.SetText(string)
stringA string, the new display text.
Truncation
SetTruncation
Gets or sets the truncation mode for the StringView.
Perl
$stringview->Truncation(); $stringview->SetTruncation($flag);
Python
stringview.Truncation() stringview.SetTruncation(flag)
flagOne of the truncation mode constants.
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.
Properties
AlignmentB_GET_PROPERTY, `B_SET_PROPERTYAn integer, the alignment value
TextB_GET_PROPERTY,B_SET_PROPERTYA string, the display text
StringView also inherits the following suites: