Skip to content

Commit

Permalink
polish the language in the documentation
Browse files Browse the repository at this point in the history
also big thanks to grammarly.com
  • Loading branch information
dk committed Sep 26, 2023
1 parent 5ac4d60 commit 0a8cc89
Show file tree
Hide file tree
Showing 41 changed files with 5,579 additions and 5,849 deletions.
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ include/win32/win32guts.h
pod/prima-gencls.pod
pod/vb-large.png
pod/Prima/aa.gif
pod/Prima/aa2.gif
pod/Prima/altspinbutton.gif
pod/Prima/buttons.gif
pod/Prima/calendar.gif
Expand Down
2 changes: 1 addition & 1 deletion Prima.pm
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ L<Prima::PodView> - POD browser widget
L<Prima::ScrollBar> - scroll bars
L<Prima::Sliders> - sliding bars, spin buttons and input lines, dial widget etc.
L<Prima::Sliders> - sliding bars, spin buttons, dial widget etc.
L<Prima::Spinner> - spinner animation
Expand Down
2 changes: 1 addition & 1 deletion Prima/Buttons.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ Default value: 0
=item text STRING
The text that is drawn in the button. If STRING contains ~ ( tilde ) character,
the following character is treated as a hot key, and the character is
the following character is treated as a hotkey, and the character is
underlined. If the user presses the corresponding character key then
L<Click> event is called. This is true even when the button is out of focus.
Expand Down
41 changes: 22 additions & 19 deletions Prima/Const.pm
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,11 @@ See L<Prima::Application/get_system_info>
See L<Prima::Window/borderIcons>
bi::SystemMenu - system menu button and/or close button
( usually with icon ) is shown
bi::SystemMenu - the system menu button and/or close button
( usually with the icon )
bi::Minimize - minimize button
bi::Maximize - maximize ( and eventual restore )
bi::TitleBar - window title
bi::Maximize - maximize/restore button
bi::TitleBar - the window title
bi::All - all of the above
=head2 bs:: - border styles
Expand All @@ -362,7 +362,7 @@ See L<Prima::Window/borderStyle>
bs::None - no border
bs::Single - thin border
bs::Dialog - thick border
bs::Sizeable - thick border with interactive resize capabilities
bs::Sizeable - border that can be resized
=head2 ci:: - color indices
Expand Down Expand Up @@ -537,6 +537,9 @@ See L<Prima::Widget/pointerType>
cr::DragCopy pointer to indicate that a dnd::Copy action can be accepted
cr::DragMove pointer to indicate that a dnd::Move action can be accepted
cr::DragLink pointer to indicate that a dnd::Link action can be accepted
cr::Crosshair the crosshair pointer
cr::UpArrow arrow directed upwards
cr::QuestionArrow question mark pointer
cr::User user-defined icon
=head2 dbt:: - device bitmap types
Expand Down Expand Up @@ -591,10 +594,10 @@ See L<Prima::Utils/query_drive_type>
dt::Left - text is aligned to the left boundary
dt::Right - text is aligned to the right boundary
dt::Center - text is aligned horizontally in center
dt::Center - text is aligned horizontally in the center
dt::Top - text is aligned to the upper boundary
dt::Bottom - text is aligned to the lower boundary
dt::VCenter - text is aligned vertically in center
dt::VCenter - text is aligned vertically in the center
dt::DrawMnemonic - tilde-escapement and underlining is used
dt::DrawSingleChar - sets tw::BreakSingle option to
Prima::Drawable::text_wrap call
Expand All @@ -609,7 +612,7 @@ See L<Prima::Utils/query_drive_type>
dt::UseExternalLeading- text lines positioned vertically with respect to
the font external leading
dt::UseClip - assign ::clipRect property to the boundary rectangle
dt::QueryLinesDrawn - calculates and returns number of lines drawn
dt::QueryLinesDrawn - calculates and returns the number of lines drawn
( contrary to dt::QueryHeight )
dt::QueryHeight - if set, calculates and returns vertical extension
of the lines drawn
Expand Down Expand Up @@ -767,7 +770,7 @@ See L<Prima::Widget/growMode>
horizontal axis
gm::YCenter widget is kept in center on its owner's
vertical axis
gm::DontCare widgets origin is maintained constant relative
gm::DontCare widgets origin is constant relative
to the screen
=item Derived or aliased constants
Expand Down Expand Up @@ -912,10 +915,10 @@ See L<Prima::Image/type>.
See L<Prima::Image/conversion>.
ict::None - no dithering, with static palette or palette optimized by source palette
ict::Posterization - no dithering, with optimized palette by source pixels
ict::None - no dithering, with static palette or palette optimized by the source palette
ict::Posterization - no dithering, with palette optimized by the source pixels
ict::Ordered - 8x8 ordered halftone dithering
ict::ErrorDiffusion - error diffusion dithering with static palette
ict::ErrorDiffusion - error diffusion dithering with a static palette
ict::Optimized - error diffusion dithering with optimized palette
Their values are combinations of C<ictp::> and C<ictd::> constants, see below.
Expand Down Expand Up @@ -951,22 +954,22 @@ See L<Prima::Image/stats>.
is::Mean - mean value
is::Variance - variance
is::StdDev - standard deviation
is::Sum - sum of pixel values
is::Sum2 - sum of squares of pixel values
is::Sum - the sum of pixel values
is::Sum2 - the sum of squares of pixel values
=head2 ist:: - image scaling types
ist::None - image stripped or padded with zeros
ist::Box - image will be scaled using simple box transform
ist::Box - image will be scaled using a simple box transform
ist::BoxX - columns behave as ist::None, rows as ist::Box
ist::BoxY - rows behave as in ist::None, columns as ist::Box
ist::AND - shrunken pixels AND-end together (black on white)
ist::OR - shrunken pixels OR-end together (white on black)
ist::AND - shrunken pixels AND-end together (black-on-white images)
ist::OR - shrunken pixels OR-end together (white-on-black images)
ist::Triangle - bilinear interpolation
ist::Quadratic - 2rd order (quadratic) B-Spline approximation of Gaussian
ist::Quadratic - 2rd order (quadratic) B-Spline approximation of the Gaussian
ist::Sinc - sine function
ist::Hermite - B-Spline interpolation
ist::Cubic - 3rd order (cubic) B-Spline approximation of Gaussian
ist::Cubic - 3rd order (cubic) B-Spline approximation of the Gaussian
ist::Gaussian - Gaussian transform with gamma=0.5
See L<Prima::Image/scaling>.
Expand Down
2 changes: 1 addition & 1 deletion Prima/DetailedList.pm
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ sub autoWidth { 0;}
=head1 NAME
Prima::DetailedList - a multi-column list viewer with controlling
Prima::DetailedList - a multi-column list viewer with a controlling
header widget.
=head1 SYNOPSIS
Expand Down
6 changes: 4 additions & 2 deletions Prima/Dialog/ImageDialog.pm
Original file line number Diff line number Diff line change
Expand Up @@ -491,15 +491,17 @@ sub save
}

if ( $self->useBase64) {
my ($ok, $error) = $dup-> save_stream;
if ( $ok ) {
my $error;
my $ok = $dup-> save_stream;
if (defined $ok) {
my $f;
my $r_ok = open $f, ">", $self->fileName;
$error = "$!", goto FAIL unless $r_ok;
$error = "$!", goto FAIL unless print $f $ok;
$error = "$!", goto FAIL unless close $f;
$ret = 1;
} else {
$error = "$@";
FAIL:
Prima::MsgBox::message("Error saving " . $self-> fileName . ":$error");
}
Expand Down
2 changes: 1 addition & 1 deletion Prima/Docks.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2050,7 +2050,7 @@ not allow tiling, and can reshape the dock widget and rearrange
the docked widgets if necessary.
C<Prima::LinearWidgetDocker> is orientation-dependent; its main axis,
governed by C<vertical> property, is used to align docked widgets in
managed by C<vertical> property, is used to align docked widgets in
'lines', which in turn are aligned by the opposite axis ( 'major' and 'minor' terms
are used in the code for the axes ).
Expand Down
4 changes: 2 additions & 2 deletions Prima/Drawable/Gradient.pm
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,13 @@ Returns a list of gradient colors for each step from 1 to BREADTH.
=item ellipse X, Y, DIAM_X, DIAM_Y
Draws a filled ellipse with center in (X,Y) and diameters (DIAM_X,DIAM_Y)
Draws a filled ellipse with the center in (X,Y) and diameters (DIAM_X,DIAM_Y)
Context used: fillPattern, rop, rop2
=item sector X, Y, DIAM_X, DIAM_Y, START_ANGLE, END_ANGLE
Draws a filled sector with center in (X,Y) and diameters (DIAM_X,DIAM_Y) from START_ANGLE to END_ANGLE
Draws a filled sector with the center in (X,Y) and diameters (DIAM_X,DIAM_Y) from START_ANGLE to END_ANGLE
Context used: fillPattern, rop, rop2
Expand Down
4 changes: 2 additions & 2 deletions Prima/Grids.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2479,7 +2479,7 @@ Default value: 0,0,0,0
=item clipCells INTEGER
A three-state integer property, that governs the way clipping is applied
A three-state integer property, that manages the way clipping is applied
when cells are drawn. Depending on kind of graphic in cells, the clipping
may be necessary, or unnecessary.
Expand Down Expand Up @@ -2618,7 +2618,7 @@ If C<constantCellHeight> is defined, the property is used as its alias.
=item selection X1, Y1, X2, Y2
If C<multiSelect> is 1, governs the extents of a rectangular area, that
If C<multiSelect> is 1, manages the extents of a rectangular area, that
contains selected cells. If no such area is present, selection
is (-1,-1,-1,-1), and C<has_selection> returns 0 .
Expand Down
4 changes: 2 additions & 2 deletions Prima/Label.pm
Original file line number Diff line number Diff line change
Expand Up @@ -578,11 +578,11 @@ Default value: 1
=item focusLink WIDGET
Points to a widget or a widget name (has to be a sibling widget), which is
explicitly focused when the user presses the combination of a hot key with the
explicitly focused when the user presses the combination of a hotkey with the
C<Alt> key.
Prima::Label does not provide a separate property to access the
hot key value, however it can be read from the C<{accel}> variable.
hotkey value, however it can be read from the C<{accel}> variable.
Default value: C<undef>.
Expand Down
4 changes: 2 additions & 2 deletions Prima/MDI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ Create-only property.
=item dragMode SCALAR
A three-state variable, which governs the visual feedback style when the user
A three-state variable, which manages the visual feedback style when the user
moves or resizes a window. If 1, the window is moved or resized simultaneously
with the user mouse or keyboard actions. If 0, a marquee rectangle is drawn,
which is moved or resized as the user sends the commands; the window is
Expand Down Expand Up @@ -1495,7 +1495,7 @@ Default value: 0
=item windowState STATE
A three-state property, that governs the state of a window.
A three-state property, that manages the state of a window.
STATE can be one of three C<ws::XXX> constants:
ws::Normal
Expand Down
2 changes: 1 addition & 1 deletion Prima/Outlines.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2297,7 +2297,7 @@ Width of an item in pixels.
=back
The indices above 3 should not be used, because eventual changes to the
The indices above 3 should not be used because eventual changes to the
implementation of the class may use these. It should be enough item 0 to store
any value.
Expand Down
2 changes: 1 addition & 1 deletion Prima/PodView.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2185,7 +2185,7 @@ on this stage.
=head2 Topics
Prima::PodView provides the C<::topicView> property, which governs whether
Prima::PodView provides the C<::topicView> property, which manages whether
the man page is viewed by topics or as a whole. When it is viewed as topics,
C<{modelRange}> array selects the model blocks that include the topic.
Thus, having a single model loaded, text blocks change dynamically.
Expand Down
2 changes: 1 addition & 1 deletion Prima/Sliders.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,7 @@ sub Timer_Tick { shift-> next_tick }
=head1 NAME
Prima::Sliders - sliding bars, spin buttons and input lines, dial widget etc.
Prima::Sliders - sliding bars, spin buttons, dial widget, etc.
=head1 DESCRIPTION
Expand Down
2 changes: 1 addition & 1 deletion Prima/VB/VB.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2863,7 +2863,7 @@ =head2 Object inspector window
interface.
The full explanation of properties and events is not provided here. It is
not even the goal of this document, because the builder can work with the
not even the goal of this document because the builder can work with the
widgets irrespective of their property or event capabilities; this information
is extracted by native toolkit functionality. To read on what each property or
event means, use the documentation on the class of interest; L<Prima::Widget> is a good
Expand Down
2 changes: 1 addition & 1 deletion Prima/Widget/Link.pm
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ font size etc. C<%DEFAULTS> is sent internally to C<tb::block_walk> that might
need eventual default parameters.
Scans BLOCKS and add monotonically increasing LINK_ID to new
link rectanges. Return new LINK_ID.
link rectangles. Return new LINK_ID.
=item clear_positions
Expand Down
2 changes: 1 addition & 1 deletion Prima/Widget/RubberBand.pm
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ Hides the band, if drawn
=item has_clip_rect
Checks whether clipRect contains an actual clippring rectange or it is empty.
Checks whether clipRect contains an actual clippring rectangle or it is empty.
=item set %profile
Expand Down
14 changes: 7 additions & 7 deletions include/apricot.h
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ ConstTable_##package Prima_Autoload_##package##_constants[] = {
static SV* newSVstring( char *s); \
XS(prima_autoload_##package##_constant) \
{ \
static PHash table = nil; \
static PHash table = NULL; \
dXSARGS; \
char *name; \
unsigned int i; \
Expand Down Expand Up @@ -1396,9 +1396,9 @@ prima_sv_bool(SV *sv);
#define pexist( key) hv_exists( profile, # key, (I32) strlen( #key))
#define pdelete( key) (void) hv_delete( profile, # key, (I32) strlen( #key), G_DISCARD)
#define dPROFILE SV ** temporary_prf_Sv
#define pget_sv( key) ((( temporary_prf_Sv = hv_fetch( profile, # key, (I32) strlen( # key), 0)) == nil) ? \
#define pget_sv( key) ((( temporary_prf_Sv = hv_fetch( profile, # key, (I32) strlen( # key), 0)) == NULL) ? \
croak( "Panic: bad profile key (``%s'') requested in ``%s'', line %d\n", # key, __FILE__, __LINE__ ), &PL_sv_undef : *temporary_prf_Sv)
#define pget_sv_void( key) ((( temporary_prf_Sv = hv_fetch( profile, # key, (I32) strlen( # key), 0)) == nil) ? \
#define pget_sv_void( key) ((( temporary_prf_Sv = hv_fetch( profile, # key, (I32) strlen( # key), 0)) == NULL) ? \
croak( "Panic: bad profile key (``%s'') requested in ``%s'', line %d\n", # key, __FILE__, __LINE__ ) : (void)NULL)
#define pget_i( key) ( pget_sv_void( key), SvIV( *temporary_prf_Sv))
#define pget_f( key) ( pget_sv_void( key), SvNV( *temporary_prf_Sv))
Expand Down Expand Up @@ -2135,7 +2135,7 @@ typedef struct {
/* pack */
Point pad; /* border padding */
Point ipad; /* size increase */
Handle order; /* if non-nil, BEFORE or AFTER a widget */
Handle order; /* if non-NULL, BEFORE or AFTER a widget */
/* place */
int x, y;
float relX, relY;
Expand Down Expand Up @@ -2552,9 +2552,9 @@ typedef struct _MenuItemReg { /* Menu item registration record */
int key; /* accelerator key, kbXXX */
int id; /* unique id */
char * perlSub; /* sub name */
Handle bitmap; /* bitmap if not nil */
SV * code; /* code if not nil */
SV * options; /* use options if not nil */
Handle bitmap; /* bitmap if not NULL */
SV * code; /* code if not NULL */
SV * options; /* use options if not NULL */
Handle icon; /* custom checked bitmap */
int group; /* radio group */
struct _MenuItemReg* down; /* pointer to submenu */
Expand Down
Loading

0 comments on commit 0a8cc89

Please sign in to comment.