Fix spelling and punctuation errors in comments and documentation

Fix several occurrences of misspelling "trivial" as "trival"; use "from"
rather than "than"; add missing articles and commas.

Closes https://github.com/wxWidgets/wxWidgets/pull/874
This commit is contained in:
Blake-Eryx
2018-08-14 17:15:39 +02:00
committed by Vadim Zeitlin
parent de1322a02d
commit e1a7f56040
24 changed files with 47 additions and 47 deletions

View File

@@ -15,11 +15,11 @@ variables in a portable way. They are currently implemented under Win32 and
POSIX-like systems (Unix). POSIX-like systems (Unix).
Remember that these functions add/change/delete environment variables of the Remember that these functions add/change/delete environment variables of the
current process only. Child processes copy the environment variables of the parent current process only. Child processes copy the environment variables of the parent,
but do not share them (a wxSetEnv() in the parent process won't change the value but do not share them (a wxSetEnv() in the parent process won't change the value
returned by wxGetEnv() in the child process and viceversa). returned by wxGetEnv() in the child process and vice versa).
For more evoluted interprocess communication tecniques see @ref overview_ipc. For more advanced interprocess communication techniques see @ref overview_ipc.
*/ */

View File

@@ -90,7 +90,7 @@ some simple explanations of things.
sizers when determining what the requirements of each item in the sizer is, sizers when determining what the requirements of each item in the sizer is,
and is used for calculating the overall minimum needs of the sizer. and is used for calculating the overall minimum needs of the sizer.
@li wxWindow::SetInitialSize(): this is a little different than the typical size @li wxWindow::SetInitialSize(): this is a little different from the typical size
setters. Rather than just setting an "initial size" attribute it actually sets setters. Rather than just setting an "initial size" attribute it actually sets
the minimal size to the value passed in, blends that value with the best size, the minimal size to the value passed in, blends that value with the best size,
and then sets the size of the widget to be the result. and then sets the size of the widget to be the result.

View File

@@ -1349,7 +1349,7 @@ must be of wxMDIChildFrame type.
wxMDIChildFrame supports the same properties that @ref xrc_wxfrane and wxMDIChildFrame supports the same properties that @ref xrc_wxfrane and
@ref xrc_wxmdiparentframe do. @ref xrc_wxmdiparentframe do.
wxMDIChildFrame can only be used as as immediate child of @ref wxMDIChildFrame can only be used as immediate child of @ref
xrc_wxmdiparentframe. xrc_wxmdiparentframe.
wxMDIChildFrame may have optional children: either exactly one wxMDIChildFrame may have optional children: either exactly one

View File

@@ -182,7 +182,7 @@ protected:
wxFont m_useFont; wxFont m_useFont;
//wxString m_stringValue; // displayed text (may be different than m_strings[m_value]) //wxString m_stringValue; // displayed text (may be different from m_strings[m_value])
int m_value; // selection int m_value; // selection
int m_itemHover; // on which item the cursor is int m_itemHover; // on which item the cursor is
int m_itemHeight; // default item height (calculate from font size int m_itemHeight; // default item height (calculate from font size

View File

@@ -582,7 +582,7 @@ enum wxPG_INTERNAL_FLAGS
wxPG_FL_VALUE_CHANGE_IN_EVENT = 0x10000000, wxPG_FL_VALUE_CHANGE_IN_EVENT = 0x10000000,
// Editor control width should not change on resize // Editor control width should not change on resize
wxPG_FL_FIXED_WIDTH_EDITOR = 0x20000000, wxPG_FL_FIXED_WIDTH_EDITOR = 0x20000000,
// Width of panel can be different than width of grid // Width of panel can be different from width of grid
wxPG_FL_HAS_VIRTUAL_WIDTH = 0x40000000, wxPG_FL_HAS_VIRTUAL_WIDTH = 0x40000000,
// Prevents RecalculateVirtualSize re-entrancy // Prevents RecalculateVirtualSize re-entrancy
wxPG_FL_RECALCULATING_VIRTUAL_SIZE = 0x80000000 wxPG_FL_RECALCULATING_VIRTUAL_SIZE = 0x80000000

View File

@@ -670,9 +670,9 @@ public:
This macro declares a new object array class named @a name and containing This macro declares a new object array class named @a name and containing
the elements of type @e T. the elements of type @e T.
An exported array is used when compiling wxWidgets as a DLL under Windows An exported array is used when compiling wxWidgets as a DLL under Windows,
and the array needs to be visible outside the DLL. An user exported array and the array needs to be visible outside the DLL. A user-exported array
needed for exporting an array from a user DLL. is needed for exporting an array from a user DLL.
Example: Example:
@@ -681,8 +681,8 @@ public:
WX_DECLARE_OBJARRAY(MyClass, wxArrayOfMyClass); // note: not "MyClass *"! WX_DECLARE_OBJARRAY(MyClass, wxArrayOfMyClass); // note: not "MyClass *"!
@endcode @endcode
You must use WX_DEFINE_OBJARRAY() macro to define the array class, You must use the WX_DEFINE_OBJARRAY() macro to define the array class;
otherwise you would get link errors. otherwise, you will get link errors.
*/ */
#define WX_DECLARE_OBJARRAY(T, name) #define WX_DECLARE_OBJARRAY(T, name)
#define WX_DECLARE_EXPORTED_OBJARRAY(T, name) #define WX_DECLARE_EXPORTED_OBJARRAY(T, name)
@@ -695,8 +695,8 @@ public:
elements of type @a T. elements of type @a T.
An exported array is used when compiling wxWidgets as a DLL under Windows An exported array is used when compiling wxWidgets as a DLL under Windows
and the array needs to be visible outside the DLL. An user exported array and the array needs to be visible outside the DLL. A user-exported array
needed for exporting an array from a user DLL. is needed for exporting an array from a user DLL.
Example: Example:
@@ -728,8 +728,8 @@ public:
destructor will not be called. destructor will not be called.
An exported array is used when compiling wxWidgets as a DLL under Windows An exported array is used when compiling wxWidgets as a DLL under Windows
and the array needs to be visible outside the DLL. An user exported array and the array needs to be visible outside the DLL. A user-exported array
needed for exporting an array from a user DLL. is needed for exporting an array from a user DLL.
Example of usage: Example of usage:
@@ -760,8 +760,8 @@ public:
the elements of type @e T. the elements of type @e T.
An exported array is used when compiling wxWidgets as a DLL under Windows An exported array is used when compiling wxWidgets as a DLL under Windows
and the array needs to be visible outside the DLL. An user exported array and the array needs to be visible outside the DLL. A user-exported array
needed for exporting an array from a user DLL. is needed for exporting an array from a user DLL.
Example: Example:

View File

@@ -749,7 +749,7 @@ public:
Returns @true if the font is a fixed width (or monospaced) font, Returns @true if the font is a fixed width (or monospaced) font,
@false if it is a proportional one or font is invalid. @false if it is a proportional one or font is invalid.
Note that this function under some platforms is different than just testing Note that this function under some platforms is different from just testing
for the font family being equal to @c wxFONTFAMILY_TELETYPE because native for the font family being equal to @c wxFONTFAMILY_TELETYPE because native
platform-specific functions are used for the check (resulting in a more platform-specific functions are used for the check (resulting in a more
accurate return value). accurate return value).

View File

@@ -4645,7 +4645,7 @@ protected:
/** /**
Get the minimal width of the given column/row. Get the minimal width of the given column/row.
The value returned by this function may be different than that returned The value returned by this function may be different from that returned
by GetColMinimalAcceptableWidth() if SetColMinimalWidth() had been by GetColMinimalAcceptableWidth() if SetColMinimalWidth() had been
called for this column. called for this column.
*/ */
@@ -4664,7 +4664,7 @@ protected:
/** /**
Returns the minimal size for the given column. Returns the minimal size for the given column.
The value returned by this function may be different than that returned The value returned by this function may be different from that returned
by GetRowMinimalAcceptableHeight() if SetRowMinimalHeight() had been by GetRowMinimalAcceptableHeight() if SetRowMinimalHeight() had been
called for this row. called for this row.
*/ */

View File

@@ -86,7 +86,7 @@
wxIntegerEqual, wxIntegerEqual,
MyHash ); MyHash );
// using an user-defined class for keys // using a user-defined class for keys
class MyKey { ... }; class MyKey { ... };
// hashing function // hashing function

View File

@@ -73,7 +73,7 @@
wxIntegerEqual, wxIntegerEqual,
MySet ); MySet );
// using an user-defined class for keys // using a user-defined class for keys
class MyKey { ... }; class MyKey { ... };
// hashing function // hashing function

View File

@@ -143,7 +143,7 @@ public:
@event{EVT_HTML_CELL_HOVER(id, func)} @event{EVT_HTML_CELL_HOVER(id, func)}
The mouse passed over a wxHtmlCell. The mouse passed over a wxHtmlCell.
@event{EVT_HTML_LINK_CLICKED(id, func)} @event{EVT_HTML_LINK_CLICKED(id, func)}
A wxHtmlCell which contains an hyperlink was clicked. A wxHtmlCell which contains a hyperlink was clicked.
@endEventTable @endEventTable
@library{wxhtml} @library{wxhtml}
@@ -555,7 +555,7 @@ wxEventType wxEVT_HTML_LINK_CLICKED;
@beginEventTable{wxHtmlLinkEvent} @beginEventTable{wxHtmlLinkEvent}
@event{EVT_HTML_LINK_CLICKED(id, func)} @event{EVT_HTML_LINK_CLICKED(id, func)}
User clicked on an hyperlink. User clicked on a hyperlink.
@endEventTable @endEventTable
@library{wxhtml} @library{wxhtml}

View File

@@ -10,7 +10,7 @@
wxHtmlListBox is an implementation of wxVListBox which shows HTML content in wxHtmlListBox is an implementation of wxVListBox which shows HTML content in
the listbox rows. This is still an abstract base class and you will need to the listbox rows. This is still an abstract base class and you will need to
derive your own class from it (see htlbox sample for the example) but you will derive your own class from it (see htlbox sample for the example), but you will
only need to override a single wxHtmlListBox::OnGetItem function. only need to override a single wxHtmlListBox::OnGetItem function.
@beginEventEmissionTable{wxHtmlCellEvent,wxHtmlLinkEvent} @beginEventEmissionTable{wxHtmlCellEvent,wxHtmlLinkEvent}
@@ -19,7 +19,7 @@
@event{EVT_HTML_CELL_HOVER(id, func)} @event{EVT_HTML_CELL_HOVER(id, func)}
The mouse passed over a wxHtmlCell. The mouse passed over a wxHtmlCell.
@event{EVT_HTML_LINK_CLICKED(id, func)} @event{EVT_HTML_LINK_CLICKED(id, func)}
A wxHtmlCell which contains an hyperlink was clicked. A wxHtmlCell which contains a hyperlink was clicked.
@endEventTable @endEventTable
@library{wxhtml} @library{wxhtml}
@@ -191,7 +191,7 @@ protected:
@event{EVT_HTML_CELL_HOVER(id, func)} @event{EVT_HTML_CELL_HOVER(id, func)}
The mouse passed over a wxHtmlCell. See wxHtmlCellEvent. The mouse passed over a wxHtmlCell. See wxHtmlCellEvent.
@event{EVT_HTML_LINK_CLICKED(id, func)} @event{EVT_HTML_LINK_CLICKED(id, func)}
A wxHtmlCell which contains an hyperlink was clicked. See wxHtmlLinkEvent A wxHtmlCell which contains a hyperlink was clicked. See wxHtmlLinkEvent
@endEventTable @endEventTable
@library{wxhtml} @library{wxhtml}

View File

@@ -18,7 +18,7 @@
@beginEventTable{wxHyperlinkEvent} @beginEventTable{wxHyperlinkEvent}
@event{EVT_HYPERLINK(id, func)} @event{EVT_HYPERLINK(id, func)}
User clicked on an hyperlink. User clicked on a hyperlink.
@endEventTable @endEventTable
@library{wxadv} @library{wxadv}

View File

@@ -245,7 +245,7 @@ public:
wxBitmapType GetType() const; wxBitmapType GetType() const;
/** /**
Loads a image from a stream, putting the resulting data into @a image. Loads an image from a stream, putting the resulting data into @a image.
If the image file contains more than one image and the image handler is If the image file contains more than one image and the image handler is
capable of retrieving these individually, @a index indicates which image capable of retrieving these individually, @a index indicates which image
@@ -269,7 +269,7 @@ public:
bool verbose = true, int index = -1); bool verbose = true, int index = -1);
/** /**
Saves a image in the output stream. Saves an image in the output stream.
@param image @param image
The image object which is to be affected by this operation. The image object which is to be affected by this operation.

View File

@@ -59,7 +59,7 @@ template <class C>
class wxSystemThemedControl : public C class wxSystemThemedControl : public C
{ {
public: public:
/// Trival default constructor. /// Trivial default constructor.
wxSystemThemedControl(); wxSystemThemedControl();
/** /**

View File

@@ -150,11 +150,11 @@ public:
The date part of @a dt is ignored, only the time part is displayed in The date part of @a dt is ignored, only the time part is displayed in
the control. The @a dt object must however be valid. the control. The @a dt object must however be valid.
In particular notice that it is a bad idea to use default wxDateTime In particular, notice that it is a bad idea to use default wxDateTime
constructor from hour, minute and second values as it uses the today constructor from hour, minute and second values as it uses the today
date for the date part which means that some times can be invalid if date for the date part, which means that some values can be invalid if
today happens to be the day of DST change. For example, when switching today happens to be the day of DST change. For example, when switching
to summer time the time 2:00 typically doesn't exist as the clocks jump to summer time, the time 2:00 typically doesn't exist as the clocks jump
directly to 3:00. To avoid this problem, use a fixed date on which DST directly to 3:00. To avoid this problem, use a fixed date on which DST
is known not to change (e.g. Jan 1, 2012) for the date part of the is known not to change (e.g. Jan 1, 2012) for the date part of the
argument or use SetTime(). argument or use SetTime().

View File

@@ -598,11 +598,11 @@ public:
Set the format of the archive. Set the format of the archive.
The normal zip format is limited to single files and the complete The normal zip format is limited to single files and the complete
archive smaller than 4GB with less then 65k files. If any of these archive smaller than 4GB with less than 65k files. If any of these
limits are exceeded, this class will automatically create a ZIP64 file, limits are exceeded, this class will automatically create a ZIP64 file,
so in most situations calling SetFormat() is not necessary. so in most situations calling SetFormat() is not necessary.
However to support single entries with more than 4GB of data However, to support single entries with more than 4GB of data
(compressed or original) whose sizes are unknown when adding the (compressed or original) whose sizes are unknown when adding the
entry with PutNextEntry(), the format has to be set to entry with PutNextEntry(), the format has to be set to
wxZIP_FORMAT_ZIP64 before adding such entries. wxZIP_FORMAT_ZIP64 before adding such entries.

View File

@@ -3855,7 +3855,7 @@ void TestRichMessageDialog::AddAdditionalTextOptions(wxSizer *sizer)
wxSizer * const sizerMsgs = new wxStaticBoxSizer(wxVERTICAL, this, wxSizer * const sizerMsgs = new wxStaticBoxSizer(wxVERTICAL, this,
"&Additional Elements"); "&Additional Elements");
// add a option to show a check box. // add an option to show a check box.
wxSizer * const sizerCheckBox = new wxBoxSizer(wxHORIZONTAL); wxSizer * const sizerCheckBox = new wxBoxSizer(wxHORIZONTAL);
sizerCheckBox->Add(new wxStaticText(this, wxID_ANY, "&Check box:"), sizerCheckBox->Add(new wxStaticText(this, wxID_ANY, "&Check box:"),
wxSizerFlags().Centre().Border(wxRIGHT)); wxSizerFlags().Centre().Border(wxRIGHT));

View File

@@ -54,7 +54,7 @@ wxAddRemoveCtrl::Create(wxWindow* parent,
return false; return false;
// We don't do anything here, the buttons are created when we're given the // We don't do anything here, the buttons are created when we're given the
// adaptor to use them with in SetAdaptor(). // adaptor to use them with SetAdaptor().
return true; return true;
} }

View File

@@ -177,7 +177,7 @@ bool wxGIFDecoder::ConvertToImage(unsigned int frame, wxImage *image) const
} }
else if ( transparency == wxIMAGE_OPTION_GIF_TRANSPARENCY_UNCHANGED ) else if ( transparency == wxIMAGE_OPTION_GIF_TRANSPARENCY_UNCHANGED )
{ {
// Leave the GIF exactly as as it was, just adjust (in the least // Leave the GIF exactly as it was, just adjust (in the least
// noticeable way, by just flipping a single bit) non-transparent // noticeable way, by just flipping a single bit) non-transparent
// pixels colour, // pixels colour,
for (i = 0; i < GetNcolours(frame); i++) for (i = 0; i < GetNcolours(frame); i++)

View File

@@ -2378,7 +2378,7 @@ void wxBoxSizer::RecalcSizes()
wxCoord maxMajor = GetSizeInMajorDir(item->GetMaxSizeWithBorder()); wxCoord maxMajor = GetSizeInMajorDir(item->GetMaxSizeWithBorder());
// must be nonzero, fixed-size items were dealt with in previous loop // must be nonzero, fixed-size items were dealt with in the previous loop
const int propItem = item->GetProportion(); const int propItem = item->GetProportion();
// is the desired size of this item small enough? // is the desired size of this item small enough?

View File

@@ -281,7 +281,7 @@ inline wxUint64 wxZipHeader::Read64()
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Stored input stream // Stored input stream
// Trival decompressor for files which are 'stored' in the zip file. // Trivial decompressor for files which are 'stored' in the zip file.
class wxStoredInputStream : public wxFilterInputStream class wxStoredInputStream : public wxFilterInputStream
{ {
@@ -328,7 +328,7 @@ size_t wxStoredInputStream::OnSysRead(void *buffer, size_t size)
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Stored output stream // Stored output stream
// Trival compressor for files which are 'stored' in the zip file. // Trivial compressor for files which are 'stored' in the zip file.
class wxStoredOutputStream : public wxFilterOutputStream class wxStoredOutputStream : public wxFilterOutputStream
{ {

View File

@@ -66,14 +66,14 @@ bool wxGenericHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id,
if (!wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name)) if (!wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name))
return false; return false;
// set to non empty strings both the url and the label // set to non-empty strings both the url and the label
SetURL(url.empty() ? label : url); SetURL(url.empty() ? label : url);
SetLabel(label.empty() ? url : label); SetLabel(label.empty() ? url : label);
Init(); Init();
SetForegroundColour(m_normalColour); SetForegroundColour(m_normalColour);
// by default the font of an hyperlink control is underlined // by default the font of a hyperlink control is underlined
wxFont f = GetFont(); wxFont f = GetFont();
f.SetUnderlined(true); f.SetUnderlined(true);
SetFont(f); SetFont(f);
@@ -84,7 +84,7 @@ bool wxGenericHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id,
// connect our event handlers: // connect our event handlers:
// NOTE: since this class is the base class of the GTK+'s native implementation // NOTE: since this class is the base class of the GTK+'s native implementation
// of wxHyperlinkCtrl, we cannot use the static macros in wxBEGIN/wxEND_EVENT_TABLE // of wxHyperlinkCtrl, we cannot use the static macros in wxBEGIN/wxEND_EVENT_TABLE
// blocks, otherwise the GTK+'s native impl of wxHyperlinkCtrl would not // blocks; otherwise, the GTK+'s native impl of wxHyperlinkCtrl would not
// behave correctly (as we intercept events doing things which interfere // behave correctly (as we intercept events doing things which interfere
// with GTK+'s native handling): // with GTK+'s native handling):

View File

@@ -796,7 +796,7 @@ TRET wxPropertyGridInterface::GetPropertyValueAs##BIGNAME( wxPGPropArg id ) cons
return (TRET)value.Get##BIGNAME(); \ return (TRET)value.Get##BIGNAME(); \
} }
// String is different than others. // String is different from others.
wxString wxPropertyGridInterface::GetPropertyValueAsString( wxPGPropArg id ) const wxString wxPropertyGridInterface::GetPropertyValueAsString( wxPGPropArg id ) const
{ {
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxEmptyString) wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxEmptyString)