Skip to content

Commit

Permalink
polish some pods
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Oct 22, 2023
1 parent 1989451 commit c9dfdb0
Show file tree
Hide file tree
Showing 7 changed files with 270 additions and 291 deletions.
6 changes: 3 additions & 3 deletions Prima.pm
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ L<Prima::Menus> - menu widgets
L<Prima::Label> - static text widget
L<Prima::Lists> - user-selectable item list widgets
L<Prima::Lists> - list widgets
L<Prima::MDI> - top-level windows emulation classes
Expand All @@ -414,9 +414,9 @@ L<Prima::Spinner> - spinner animation
L<Prima::TextView> - rich text browser widget
L<Prima::Widget::Date> - standard date picker widget
L<Prima::Widget::Date> - date picker widget
L<Prima::Widget::Time> - standard time input widget
L<Prima::Widget::Time> - time input widget
=item Standard dialogs
Expand Down
59 changes: 29 additions & 30 deletions Prima/IniFile.pm
Original file line number Diff line number Diff line change
Expand Up @@ -524,12 +524,11 @@ Prima::IniFile - support of Windows-like initialization files
=head1 DESCRIPTION
The module contains a class, that provides mapping of text initialization file to
a two-level hash structure. The first level
is called sections, which groups the second level hashes, called items.
Sections must have unique keys. The items hashes values are arrays of
text strings. The methods, operated on these arrays are L<get_values>,
L<set_values>, L<add_values> and L<replace_values>.
The module provides mapping of a text initialization file to a two-level hash
structure. The first level is I<sections>, which groups the second level
hashes, I<items>. Sections must have unique keys. The values of the I<items> hashes are
arrays of text strings. The methods that operate on these arrays are
L<get_values>, L<set_values>, L<add_values>, and L<replace_values>.
=head1 SYNOPSIS
Expand Down Expand Up @@ -583,33 +582,33 @@ Cleans all internal data in the object, including the name of the file.
=item create PROFILE
Creates an instance of the class. The PROFILE is treated partly as
an array, partly as a hash. If PROFILE consists of a single item,
the item is treated as a filename. Otherwise, PROFILE is treated as a hash,
where the following keys are allowed:
Creates an instance of the class. The PROFILE is treated partly as an array,
and partly as a hash. If PROFILE consists of a single item, the item is treated as
a filename. Otherwise, PROFILE is treated as a hash, where the following keys
are allowed:
=over
=item file FILENAME
Selects name of file.
Selects the name of the file.
=item default %VALUES
Selects the initial values for the file, where VALUES is a two-level
hash of sections and items. It is passed to L<read>, where it is merged
with the file data.
Selects the initial values for the file, where VALUES is a two-level hash of
sections and items. It is passed to L<read>, where it is merged with the file
data.
=back
=item get_values SECTION, ITEM
Returns array of values for ITEM in SECTION. If called in scalar context,
and there is more than one value, the first value in list is returned.
Returns an array of values for ITEM in SECTION. If called in scalar context
and there is more than one value, the first value in the list is returned.
=item items SECTION [ HINTS ]
Returns items in SECTION. HINTS parameters is used to tell if a multiple-valued
Returns items in SECTION. HINTS parameters are used to tell if a multiple-valued
item must be returned as several items of the same name;
HINTS can be supplied in the following forms:
Expand All @@ -622,25 +621,24 @@ Same as L<create>.
=item nvalues SECTION, ITEM
Returns number of values in ITEM in SECTION.
Returns the number of values in ITEM in SECTION.
=item read FILENAME, %PROFILE
Flushes the old content and opens new file. FILENAME is a text string,
PROFILE is a two-level hash of default values for the new file. PROFILE is
merged with the data from file, and the latter keep the precedence.
Does not return any success values but, warns if any error
is occurred.
Flushes the old content and opens a new file. FILENAME is a text string, PROFILE
is a two-level hash of default values for the new file. PROFILE is merged with
the data from the file, and the latter keeps the precedence. Does not return
any success values but warns if any error is occurred.
=item replace_values SECTION, ITEM, @VALUES
Removes all values form ITEM in SECTION and assigns it to the new
Removes all values from ITEM in SECTION and assigns it to the new
list of VALUES.
=item section SECTION
Returns a tied hash for SECTION. All its read and write operations are reflected
in the caller object, which allows the following syntax:
in the caller object which allows the following syntax:
my $section = $inifile-> section( 'Sample section');
$section-> {Item1} = 'Value1';
Expand All @@ -651,18 +649,19 @@ which is identical to
=item sections
Returns array of section names.
Returns an array of section names.
=item set_values SECTION, ITEM, @VALUES
Assigns VALUES to ITEM in SECTION. If number of new values are equal or greater
than the number of the old, the method is same as L<replace_values>. Otherwise,
Assigns VALUES to ITEM in SECTION. If the number of new values is equal to or greater
than the number of the old, the method is the same as L<replace_values>. Otherwise,
the values with indices higher than the number of new values are not touched.
=item write
Rewrites the file with the object content. The object keeps an internal modification flag
under name C<{changed}>; in case it is C<undef>, no actual write is performed.
Rewrites the file with the object content. The object keeps an internal
modification flag C<{changed}>; in case it is C<undef>, no actual write is
performed.
=back
Expand Down
68 changes: 33 additions & 35 deletions Prima/InputLine.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ sub blink
=head1 NAME
Prima::InputLine - standard input line widget
Prima::InputLine - input line widget
=head2 SYNOPSIS
Expand All @@ -1228,10 +1228,9 @@ Prima::InputLine - standard input line widget
=head1 DESCRIPTION
The class provides basic functionality of an input line,
including hidden input, read-only state, selection, and
clipboard operations. The input line text data is
contained in L<text> property.
The class provides the basic functionality of an input line, including hidden
input, read-only state, selection, and clipboard operations. The input line
text data is stored in the L<text> property.
=head1 API
Expand All @@ -1242,12 +1241,12 @@ contained in L<text> property.
=item Change
The notification is called when the L<text> property is changed, either
interactively or as a result of direct call.
interactively or as a result of a direct call.
=item Validate TEXT_REF
The notification is called right before the L<text> property is changed, either
interactively or as a result of direct call. The custom code has a chance to
interactively or as a result of a direct call. The custom code has a chance to
validate the text and/or provide some sort of interactive feedback.
See also: L</blink>
Expand Down Expand Up @@ -1282,34 +1281,32 @@ Default value: 1
=item autoTab BOOLEAN
If 1, the keyboard C<kb::Left> and C<kb::Right> commands, if received
when the cursor is at the beginning or at the end of text, and cannot be
mover farther, not processed. The result of this is that the default handler
moves focus to a neighbor widget, in a way as if the Tab key
was pressed.
If 1, ignores the keyboard C<kb::Left> and C<kb::Right> commands, when these
are received when the cursor is at the beginning or the end of text and
cannot be moved farther. The result of this is that the default handler moves
focus to a neighbor widget, in a way as if the Tab key was pressed.
Default value: 0
=item borderWidth INTEGER
Width of 3d-shade border around the widget.
Width of the border around the widget.
Default value: 2
Default value: depends on the skin
=item charOffset INTEGER
charOffset gets the current position of the cursor
charOffset N sets the cursor at position N
Managets the current position of the cursor
=item firstChar
Selects the first visible cluster of text
=item insertMode BOOLEAN
Governs the typing mode - if 1, the typed text is inserted, if 0, the text overwrites
the old text. When C<insertMode> is 0, the cursor shape is thick and covers the whole
character; when 1, it is of default width.
Manages the typing mode - if 1, the typed text is inserted, if 0, the text overwrites
the old text. When C<insertMode> is 0 the cursor shape is thick and covers the whole
character; when 1, it is of the default width.
Default toggle key: Insert
Expand Down Expand Up @@ -1338,11 +1335,11 @@ clusters. A case with no selection is when START equals END.
=item selStart INTEGER
Selects the start of text selection.
Selects the start of the text selection.
=item selEnd INTEGER
Selects the end of text selection.
Selects the end of the text selection.
=item textDirection BOOLEAN
Expand All @@ -1351,17 +1348,17 @@ If set, indicates RTL text input.
=item textLigation BOOLEAN
If set, text may be rendered at better quality with ligation and kerning,
however that comes with a price that some ligatures may be indivisible and form
clusters (f.ex. I<ff> or I<ffi> ligatures). Cursor cannot go inside of such
clusters, and thus one can only select them, delete as whole, or press
however, that comes with a price that some ligatures may be indivisible and form
clusters (f.ex. I<ff> or I<ffi> ligatures). The cursor cannot go inside such
clusters, and thus one can only select them, delete them as a whole, or press
Del/Backspace on the cluster's edge.
Toggle during runtime with Ctrl+Shift+L.
=item wordDelimiters STRING
Contains string of character that are used for locating a word break.
Default STRING value consists of punctuation marks, space and tab characters,
Contains the string of characters that are used for locating a word break.
Default STRING value consists of punctuation marks, space, tab,
and C<\xff> character.
=item writeOnly BOOLEAN
Expand All @@ -1379,9 +1376,9 @@ Default value: 0
=item blink %options
Produces a short blink by setting background to red color.
Can be used to signal invalid input, f ex from C<on_validate>.
C<%options> allows C<backColor> and C<color> entries.
Produces a short blink by setting the background to red color.
Can be used to signal an invalid input, f ex from C<on_validate>.
C<%options> allows the C<backColor> and C<color> entries.
=item copy
Expand Down Expand Up @@ -1416,17 +1413,18 @@ Selects all text
=head2 Bi-directional input and output
When working on bidirectional texts, or text represented by complex script
shaping, methods C<firstChar>, C<charOffset>, C<selection> etc cannot be used
to calculate text offsets f.ex. via C<substr>. Note that these values are in
clusters, not in characters (see L<Prima::Drawable::Glyphs> for the
description>. Also, selection ranges of bidi text become not straighforward.
Use the following methods whenever text manipulations are needed:
shaping, values returned from the methods C<firstChar>, C<charOffset>,
C<selection>, etc cannot be used to calculate text offsets f.ex. via C<substr>.
Note that these values are in clusters, not in characters (see
L<Prima::Drawable::Glyphs> for the description>. Also, the selection ranges of
bidi text become not straightforward. Use the following methods whenever text
manipulations are needed:
=over
=item char_at OFFSET
Returns character at OFFSET
Returns character at cluster OFFSET
=item selection_strpos
Expand Down
Loading

0 comments on commit c9dfdb0

Please sign in to comment.