Prima::Label(3)
β¨ NAME β¨
Prima::Label β static text widget
π¦ DESCRIPTION π¦
Okay bestie, welcome to Prima::Label(3), straight from the User Contributed Perl Documentation. This class is designed for the display of text and provides no user interaction. Its text output capabilities include wrapping, horizontal and vertical alignment, and automatic widget resizing to match text extensions. If the text contains a tilde-escaped (hot) character, the label can explicitly focus the specified widget upon pressing of the character key; this feature is useful for the design of dialogs. π
Labels can display rich text with links. See Prima::Drawable::Markup for more.
π SYNOPSIS π
use Prima qw(Label InputLine Application);
my $w = Prima::MainWindow->new;
$w->insert( 'Prima::Label',
text => 'Enter ~name:',
focusLink => 'InputLine1',
alignment => ta::Center,
pack => { fill => 'x', side => 'top', pad => 10 },
);
$w->insert(
'Prima::InputLine',
text => '',
pack => { fill => 'x', side => 'top', pad => 10 },
);
run Prima;
π API π
πΈ Properties πΈ
alignment(INTEGER) β One of the followingta::XXXconstants:ta::Left,ta::Center,ta::Right. Selects the horizontal text alignment. Default value:ta::Left.autoHeight(BOOLEAN) β If1, the widget height is automatically changed as text extensions change. Default value:0.autoWidth(BOOLEAN) β If1, the widget width is automatically changed as text extensions change. Default value:1.focusLink(WIDGET) β Points to a widget or a widget name (it has to be a sibling widget), which is explicitly focused when the user presses the combination of the hotkey with theAltkey.Prima::Labeldoes not provide a separate property to access the hotkey value from the tilde-escaped string, however, it can be read from the{accel}variable. Default value:undef.hotKey(CHAR) β A key (defined byCHAR) that the label will react to if pressed if the label has the focus. The combinationALT+ Key works always whether the label has the focus or not.linkColor(COLOR) β The color of text in links. The default value is taken fromPrima::Widget::Linkand is currently hardcoded as green. So far there is no support for the system link color.showAccelChar(BOOLEAN) β If0, the tilde (~) character is collapsed from the text, and the hot character is underlined. When the user presses the combination of the escaped character with theAltkey, thefocusLinkwidget is explicitly focused. If1, the text is shown as is, and no hot character is underlined. Key combinations with theAltkey are not recognized. See also:hotKey. Default value:0.showPartial(BOOLEAN) β Used to determine if the last line of text should be drawn if it can not be vertically fit in the widget interior. If1, the last line is shown even if not visible in full. If0, only full lines are drawn. Default value:1.textJustify($BOOL | { letter => 0, word => 0, kashida => 0, min_kashida => 0 } | %VALUES) β If set, justifies wrapped text according to the option passed in the hash (seearabic_justifyinPrima::Drawable::Glyphsandinterspace_justifyinPrima::Drawable::Glyphs). Can accept three forms:- If an anonymous hash is used, it overwrites all the currently defined options.
- If
$BOOLis used, it is treated as a shortcut for{ letter => $BOOL, word => $BOOL, kashida => $BOOL }; consequent get-calls return a full hash, not the$BOOLvalue. - If the
%VALUESform is used, it overwrites only values found in%VALUES.
Only actual when wordWrap is set.
textDirection(BOOLEAN) β If set, indicates RTL text direction.wordWrap(BOOLEAN) β If0, the text is not wrapped unless new line characters are present in the text. If1, the text is wrapped if it can not be fit horizontally in the widget interior. The text is also wrapped over new lines. Default value:0.valignment(INTEGER) β One of the followingta::XXXconstants:ta::Top,ta::Middleorta::Center,ta::Bottom. Selects the vertical text alignment.
β οΈ Note: theta::Middlevalue is not equal tota::Center's, however, both constants produce an equal effect here.
Default value: ta::Top.
π AUTHOR π
This icon right here wrote it: Dmitry Karasik, <dmitry@karasik.eu.org>.
π₯ SEE ALSO π₯
PrimaPrima::WidgetPrima::Drawable::MarkupPrima::Widget::Linkexamples/label.pl
Okay thatβs the whole vibe! This page is from perl v5.42.0, dated 2024-08-20, and it is the Prima::Label(3) manpage β periodt. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms