Skip to content

Commit

Permalink
Spelling fixes in wx.lib
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinD42 committed Jul 14, 2020
1 parent d265d13 commit c00b895
Show file tree
Hide file tree
Showing 108 changed files with 359 additions and 359 deletions.
2 changes: 1 addition & 1 deletion samples/doodle/superdoodle.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def __init__(self, parent, ID, doodle):
self.thknsBtns[x] = b
self.thknsBtns[1].SetToggle(True)

# Make a colour indicator window, it is registerd as a listener
# Make a colour indicator window, it is registered as a listener
# with the doodle window so it will be notified when the settings
# change
ci = ColourIndicator(self)
Expand Down
2 changes: 1 addition & 1 deletion wx/lib/agw/advancedsplash.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def OnPaint(self, event):
# Here We Redraw The Bitmap Over The Frame
dc.DrawBitmap(self.bmp, 0, 0, True)

# We Draw The Text Anyway, Wheter It Is Empty ("") Or Not
# We Draw The Text Anyway, Whether It Is Empty ("") Or Not
textcolour = self.GetTextColour()
textfont = self.GetTextFont()
textpos = self.GetTextPosition()
Expand Down
32 changes: 16 additions & 16 deletions wx/lib/agw/artmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ def GetStockBitmap(self, name):
:param string `name`: the bitmap name.
:return: The stock bitmap, if `name` was found in the stock bitmap dictionary.
Othewise, :class:`NullBitmap` is returned.
Otherwise, :class:`NullBitmap` is returned.
"""

return self._bitmaps.get(name, wx.NullBitmap)
Expand Down Expand Up @@ -1160,9 +1160,9 @@ def RandomColour(self):
:return: An instance of :class:`wx.Colour`.
"""

r = random.randint(0, 255) # Random value betweem 0-255
g = random.randint(0, 255) # Random value betweem 0-255
b = random.randint(0, 255) # Random value betweem 0-255
r = random.randint(0, 255) # Random value between 0-255
g = random.randint(0, 255) # Random value between 0-255
b = random.randint(0, 255) # Random value between 0-255

return wx.Colour(r, g, b)

Expand Down Expand Up @@ -1194,7 +1194,7 @@ def TruncateText(self, dc, text, maxWidth):
:param string `text`: the text to be (eventually) truncated;
:param integer `maxWidth`: the maximum width allowed for the text.
:return: A new string containining the (possibly) truncated text.
:return: A new string containing the (possibly) truncated text.
"""

textLen = len(text)
Expand Down Expand Up @@ -1447,7 +1447,7 @@ def DropShadow(self, wnd, drop=True):

def GetBitmapStartLocation(self, dc, rect, bitmap, text="", style=0):
"""
Returns the top left `x` and `y` cordinates of the bitmap drawing.
Returns the top left `x` and `y` coordinates of the bitmap drawing.
:param `dc`: an instance of :class:`wx.DC`;
:param wx.Rect `rect`: the bitmap's client rectangle;
Expand All @@ -1466,7 +1466,7 @@ def GetBitmapStartLocation(self, dc, rect, bitmap, text="", style=0):
``BU_EXT_RIGHT_TO_LEFT_STYLE`` 32 A button suitable for right-to-left languages
============================== ======= ================================
:return: A tuple containining the top left `x` and `y` cordinates of the bitmap drawing.
:return: A tuple containing the top left `x` and `y` coordinates of the bitmap drawing.
"""

alignmentBuffer = self.GetAlignBuffer()
Expand Down Expand Up @@ -1495,7 +1495,7 @@ def GetBitmapStartLocation(self, dc, rect, bitmap, text="", style=0):
# get the truncated text. The text may stay as is, it is not a must that is will be trancated
fixedText = self.TruncateText(dc, text, maxWidth)

# get the fixed text dimentions
# get the fixed text dimensions
fixedTextWidth, fixedTextHeight = dc.GetTextExtent(fixedText)

# calculate the start location
Expand All @@ -1513,7 +1513,7 @@ def GetBitmapStartLocation(self, dc, rect, bitmap, text="", style=0):
# get the truncated text. The text may stay as is, it is not a must that is will be trancated
fixedText = self.TruncateText(dc, text, maxWidth)

# get the fixed text dimentions
# get the fixed text dimensions
fixedTextWidth, fixedTextHeight = dc.GetTextExtent(fixedText)

if maxWidth > fixedTextWidth:
Expand All @@ -1535,7 +1535,7 @@ def GetBitmapStartLocation(self, dc, rect, bitmap, text="", style=0):

def GetTextStartLocation(self, dc, rect, bitmap, text, style=0):
"""
Returns the top left `x` and `y` cordinates of the text drawing.
Returns the top left `x` and `y` coordinates of the text drawing.
In case the text is too long, the text is being fixed (the text is cut and
a '...' mark is added in the end).
Expand All @@ -1545,7 +1545,7 @@ def GetTextStartLocation(self, dc, rect, bitmap, text, style=0):
:param string `text`: the button label;
:param integer `style`: the button style.
:return: A tuple containining the top left `x` and `y` cordinates of the text drawing, plus
:return: A tuple containing the top left `x` and `y` coordinates of the text drawing, plus
the truncated version of the input `text`.
:see: :meth:`~ArtManager.GetBitmapStartLocation` for a list of valid button styles.
Expand All @@ -1563,7 +1563,7 @@ def GetTextStartLocation(self, dc, rect, bitmap, text, style=0):

fixedText = self.TruncateText(dc, text, maxWidth)

# get the fixed text dimentions
# get the fixed text dimensions
fixedTextWidth, fixedTextHeight = dc.GetTextExtent(fixedText)
startLocationY = (rect.height - fixedTextHeight) / 2 + rect.y

Expand Down Expand Up @@ -1648,7 +1648,7 @@ def DrawTextAndBitmap(self, dc, rect, text, enable=True, font=wx.NullFont,
location, labelOnly = self.GetAccelIndex(text)
startLocationX, startLocationY, fixedText = self.GetTextStartLocation(dc, rect, bitmap, labelOnly, style)

# after all the caculations are finished, it is time to draw the text
# after all the calculations are finished, it is time to draw the text
# underline the first letter that is marked with a '&'
if location == -1 or font.GetUnderlined() or location >= len(fixedText):
# draw the text
Expand Down Expand Up @@ -1781,9 +1781,9 @@ def GetAccelIndex(self, label):
Returns the mnemonic index of the label and the label stripped of the ampersand mnemonic
(e.g. 'lab&el' ==> will result in 3 and labelOnly = label).
:param string `label`: a string containining an ampersand.
:param string `label`: a string containing an ampersand.
:return: A tuple containining the mnemonic index of the label and the label
:return: A tuple containing the mnemonic index of the label and the label
stripped of the ampersand mnemonic.
"""

Expand Down Expand Up @@ -1843,7 +1843,7 @@ def GetMenuTheme(self):
"""
Returns the currently used menu theme.
:return: A string containining the currently used theme for the menu.
:return: A string containing the currently used theme for the menu.
"""

return self._menuTheme
Expand Down
4 changes: 2 additions & 2 deletions wx/lib/agw/aui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def OnClose(self, event):
- wxAuiManager & wxToolBar - ToolBar Of Size Zero: http://trac.wxwidgets.org/ticket/9724
- wxAuiNotebook doesn't behave properly like a container as far as...: http://trac.wxwidgets.org/ticket/9911
- Serious layout bugs in wxAUI: http://trac.wxwidgets.org/ticket/10620
- wAuiDefaultTabArt::Clone() should just use copy contructor: http://trac.wxwidgets.org/ticket/11388
- wAuiDefaultTabArt::Clone() should just use copy constructor: http://trac.wxwidgets.org/ticket/11388
- Drop down button for check tool on wxAuiToolbar: http://trac.wxwidgets.org/ticket/11139
Plus the following features:
Expand Down Expand Up @@ -201,7 +201,7 @@ def OnClose(self, event):
enough outside of the notebook to become floating pages;
(k) Implementation of the style ``AUI_NB_DRAW_DND_TAB`` (on by default), which draws an image
representation of a tab while dragging;
(l) Implementation of the `AuiNotebook` unsplit functionality, which unsplit a splitted AuiNotebook
(l) Implementation of the `AuiNotebook` unsplit functionality, which unsplit a split AuiNotebook
when double-clicking on a sash;
(m) Possibility to hide all the tabs by calling `HideAllTAbs`;
(n) wxPython controls can now be added inside page tabs by calling `AddControlToPage`, and they can be
Expand Down
2 changes: 1 addition & 1 deletion wx/lib/agw/aui/aui_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def CreateBitmap(self, notebook, page, button_state, tabArt):

memory.SelectObject(wx.NullBitmap)

# Gtk and Windows unfortunatly don't do so well with transparent
# Gtk and Windows unfortunately don't do so well with transparent
# drawing so this hack corrects the image to have a transparent
# background.
if wx.Platform != '__WXMAC__':
Expand Down
8 changes: 4 additions & 4 deletions wx/lib/agw/aui/auibar.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ def GetAlignment(self):
class AuiDefaultToolBarArt(object):
"""
Toolbar art provider code - a tab provider provides all drawing functionality to the :class:`AuiToolBar`.
This allows the :class:`AuiToolBar` to have a plugable look-and-feel.
This allows the :class:`AuiToolBar` to have a pluggable look-and-feel.
By default, a :class:`AuiToolBar` uses an instance of this class called :class:`AuiDefaultToolBarArt`
which provides bitmap art and a colour scheme that is adapted to the major platforms'
Expand Down Expand Up @@ -1028,7 +1028,7 @@ def DrawButton(self, dc, wnd, item, rect):

elif item_state & AUI_BUTTON_STATE_CHECKED:

# it's important to put this code in an else statment after the
# it's important to put this code in an else statement after the
# hover, otherwise hovers won't draw properly for checked items
dc.SetPen(wx.Pen(self._highlight_colour))
dc.SetBrush(wx.Brush(StepColour(self._highlight_colour, 170)))
Expand Down Expand Up @@ -1107,7 +1107,7 @@ def DrawDropDownButton(self, dc, wnd, item, rect):
dc.DrawRectangle(dropdown_rect)

elif item_state & AUI_BUTTON_STATE_CHECKED:
# it's important to put this code in an else statment after the
# it's important to put this code in an else statement after the
# hover, otherwise hovers won't draw properly for checked items
dc.SetPen(wx.Pen(self._highlight_colour))
dc.SetBrush(wx.Brush(StepColour(self._highlight_colour, 170)))
Expand Down Expand Up @@ -1705,7 +1705,7 @@ def GetAGWWindowStyleFlag(self):
def SetArtProvider(self, art):
"""
Instructs :class:`AuiToolBar` to use art provider specified by parameter `art`
for all drawing calls. This allows plugable look-and-feel features.
for all drawing calls. This allows pluggable look-and-feel features.
:param `art`: an art provider.
Expand Down
12 changes: 6 additions & 6 deletions wx/lib/agw/aui/auibook.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ def __init__(self, auiNotebook):
def SetArtProvider(self, art):
"""
Instructs :class:`AuiTabContainer` to use art provider specified by parameter `art`
for all drawing calls. This allows plugable look-and-feel features.
for all drawing calls. This allows pluggable look-and-feel features.
:param `art`: an art provider.
Expand Down Expand Up @@ -2490,7 +2490,7 @@ def StopTooltipTimer(self):

def OnEnterWindow(self, event):
"""
Handles the ``wx.EVT_ENTER_WINDOW`` event fof :class:`AuiTabCtrl`.
Handles the ``wx.EVT_ENTER_WINDOW`` event of :class:`AuiTabCtrl`.
:param `event`: a :class:`MouseEvent` event to be processed.
"""
Expand Down Expand Up @@ -3390,7 +3390,7 @@ def SetUniformBitmapSize(self, size):
def UpdateTabCtrlHeight(self, force=False):
"""
:meth:`UpdateTabCtrlHeight` does the actual tab resizing. It's meant
to be used interally.
to be used internally.
:param bool `force`: ``True`` to force the tab art to repaint.
"""
Expand Down Expand Up @@ -3843,7 +3843,7 @@ def HideAllTabs(self, hidden=True):

def SetSashDClickUnsplit(self, unsplit=True):
"""
Sets whether to unsplit a splitted :class:`AuiNotebook` when double-clicking on a sash.
Sets whether to unsplit a split :class:`AuiNotebook` when double-clicking on a sash.
:param bool `unsplit`: ``True`` to unsplit on sash double-clicking, ``False`` otherwise.
"""
Expand All @@ -3853,7 +3853,7 @@ def SetSashDClickUnsplit(self, unsplit=True):

def GetSashDClickUnsplit(self):
"""
Returns whether a splitted :class:`AuiNotebook` can be unsplitted by double-clicking
Returns whether a split :class:`AuiNotebook` can be unsplitted by double-clicking
on the splitter sash.
"""

Expand Down Expand Up @@ -4716,7 +4716,7 @@ def UnSplit(self):
self.RemovePage(idx)
# re-add in the same position so it will tab
self.InsertPage(idx, win, title, False, bmp)
# restore orignial selected tab
# restore original selected tab
self.SetSelection(nowSelected)

self.Thaw()
Expand Down
4 changes: 2 additions & 2 deletions wx/lib/agw/aui/dockart.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#----------------------------------------------------------------------------
"""
Dock art provider code - a dock provider provides all drawing functionality to
the AUI dock manager. This allows the dock manager to have a plugable look-and-feel.
the AUI dock manager. This allows the dock manager to have a pluggable look-and-feel.
By default, a :class:`~wx.lib.agw.aui.framemanager` uses an instance of this class called :mod:`~wx.lib.agw.aui.dockart`
which provides bitmap art and a colour scheme that is adapted to the major platforms'
Expand Down Expand Up @@ -52,7 +52,7 @@
class AuiDefaultDockArt(object):
"""
Dock art provider code - a dock provider provides all drawing functionality to the AUI dock manager.
This allows the dock manager to have a plugable look-and-feel.
This allows the dock manager to have a pluggable look-and-feel.
By default, a :class:`~wx.lib.agw.aui.framemanager.AuiManager` uses an instance of this class called
:class:`AuiDefaultDockArt` which provides bitmap art and a colour scheme that is adapted to the major
Expand Down
12 changes: 6 additions & 6 deletions wx/lib/agw/aui/framemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4674,7 +4674,7 @@ def CanUseModernDockArt(self):
def SetArtProvider(self, art_provider):
"""
Instructs :class:`AuiManager` to use art provider specified by the parameter
`art_provider` for all drawing calls. This allows plugable look-and-feel
`art_provider` for all drawing calls. This allows pluggable look-and-feel
features.
:param `art_provider`: a AUI dock art provider.
Expand All @@ -4697,7 +4697,7 @@ def SetArtProvider(self, art_provider):
def AddPane(self, window, arg1=None, arg2=None, target=None):
"""
Tells the frame manager to start managing a child window. There
are four versions of this function. The first verison allows the full spectrum
are four versions of this function. The first version allows the full spectrum
of pane parameter possibilities (:meth:`AddPane1`). The second version is used for
simpler user interfaces which do not require as much configuration (:meth:`AddPane2`).
The :meth:`AddPane3` version allows a drop position to be specified, which will determine
Expand Down Expand Up @@ -4809,7 +4809,7 @@ def AddPane1(self, window, pane_info):
# so use GetBestSize()
pinfo.best_size = pinfo.window.GetBestSize()

# this is needed for Win2000 to correctly fill toolbar backround
# this is needed for Win2000 to correctly fill toolbar background
# it should probably be repeated once system colour change happens
if wx.Platform == "__WXMSW__" and pinfo.window.UseBgCol():
pinfo.window.SetBackgroundColour(self.GetArtProvider().GetColour(AUI_DOCKART_BACKGROUND_COLOUR))
Expand Down Expand Up @@ -6343,7 +6343,7 @@ def LayoutAll(self, panes, docks, uiparts, spacer_only=False, oncheck=True):
def SetDockSizeConstraint(self, width_pct, height_pct):
"""
When a user creates a new dock by dragging a window into a docked position,
often times the large size of the window will create a dock that is unwieldly
often times the large size of the window will create a dock that is unwieldy
large.
:class:`AuiManager` by default limits the size of any new dock to 1/3 of the window
Expand Down Expand Up @@ -10309,7 +10309,7 @@ def RemoveCaption():
self.GetPane(notebook).CaptionVisible(False).PaneBorder(False)
self.Update()

# it seems the notebook isnt created by this stage, so remove
# it seems the notebook isn't created by this stage, so remove
# the caption a moment later
wx.CallAfter(RemoveCaption)
return True
Expand Down Expand Up @@ -10744,7 +10744,7 @@ def Update(self):
not pane.IsFloating() and pane.IsShown() for pane in self.GetAllPanes())
if haveCenterPane:
if self.hasDummyPane:
# there's our dummy pane and also another center pane, therefor let's remove our dummy
# there's our dummy pane and also another center pane, therefore let's remove our dummy
def do():
self._destroyDummyPane()
self.Update()
Expand Down
8 changes: 4 additions & 4 deletions wx/lib/agw/aui/tabart.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""
Tab art provider code - a tab provider provides all drawing functionality to
the :class:`~wx.lib.agw.aui.auibook.AuiNotebook`. This allows the
:class:`~wx.lib.agw.aui.auibook.AuiNotebook` to have a plugable look-and-feel.
:class:`~wx.lib.agw.aui.auibook.AuiNotebook` to have a pluggable look-and-feel.
By default, a :class:`~wx.lib.agw.aui.auibook.AuiNotebook` uses an instance of this class
called :class:`AuiDefaultTabArt` which provides bitmap art and a colour scheme that is
Expand Down Expand Up @@ -113,7 +113,7 @@ def ProcessEvent(self, event):
class AuiDefaultTabArt(object):
"""
Tab art provider code - a tab provider provides all drawing functionality to the :class:`~wx.lib.agw.aui.auibook.AuiNotebook`.
This allows the :class:`~wx.lib.agw.aui.auibook.AuiNotebook` to have a plugable look-and-feel.
This allows the :class:`~wx.lib.agw.aui.auibook.AuiNotebook` to have a pluggable look-and-feel.
By default, a :class:`~wx.lib.agw.aui.auibook.AuiNotebook` uses an instance of this class called
:class:`AuiDefaultTabArt` which provides bitmap art and a colour scheme that is adapted to the major platforms'
Expand Down Expand Up @@ -2115,7 +2115,7 @@ def DrawTabBackground(self, dc, rect, focus, upperTabs):
bottomStartColour = topEndColour
bottomEndColour = topEndColour

# Incase we use bottom tabs, switch the colours
# In case we use bottom tabs, switch the colours
if upperTabs:
if focus:
dc.GradientFillLinear(top, topStartColour, topEndColour, wx.SOUTH)
Expand Down Expand Up @@ -2289,7 +2289,7 @@ def DrawTab(self, dc, wnd, page, in_rect, close_button_state, paint_control=Fals
dc.DrawPolygon(tabPoints)

if page.active:
# Delete the bottom line (or the upper one, incase we use wxBOTTOM)
# Delete the bottom line (or the upper one, in case we use wxBOTTOM)
dc.SetPen(wx.WHITE_PEN)
dc.DrawLine(tabPoints[0].x, tabPoints[0].y, tabPoints[6].x, tabPoints[6].y)

Expand Down
2 changes: 1 addition & 1 deletion wx/lib/agw/aui/tabmdi.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def Init(self):
# before Create() (as is customary on some ports with wxFrame-type
# windows), or wx.MINIMIZE can be passed in the style flags. Note that
# AuiMDIChildFrame is not really derived from wxFrame, as MDIChildFrame
# is, but those are the expected symantics. No style flag is passed
# is, but those are the expected semantics. No style flag is passed
# onto the panel underneath.

self._activate_on_create = True
Expand Down
Loading

0 comments on commit c00b895

Please sign in to comment.