Docstring updates

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-05-12 22:46:53 +00:00
parent 948ee5ea30
commit 4e5d278c12
9 changed files with 615 additions and 542 deletions
+3
View File
@@ -20,6 +20,9 @@
# o Many ehnacements
#
"""
`AnalogClockWindow` is a simple analog clock class.
"""
import math
import sys
+5 -1
View File
@@ -1,5 +1,5 @@
#----------------------------------------------------------------------
# Name: wx.lib.aanalogclockopts
# Name: wx.lib.analogclockopts
# Purpose: An analog clock window - setup frame
#
# Author: E. A. Tacao
@@ -10,6 +10,10 @@
# Originally generated by wx.Glade 0.3.1 on Wed Feb 18 00:05:35 2004
# Converted to wx namespace by Peter Damoc
"""
A configuration dialog (frame actually) for the AnalogClockWindow
"""
import wx
import wx.lib.colourselect as csel
+4
View File
@@ -15,6 +15,10 @@
# o Updated for wx namespace
# o Tested with updated demo
#
"""
`LayoutAnchors` is a class that implements Delphi's Anchors using
`wx.LayoutConstraints`.
"""
import wx
+13 -13
View File
@@ -18,18 +18,9 @@
"""
This module implements various forms of generic buttons, meaning that
they are not built on native controls but are self-drawn.
The GenButton is the base. It acts like a normal button but you
are able to better control how it looks, bevel width, colours, etc.
GenBitmapButton is a button with one or more bitmaps that show
the various states the button can be in.
GenToggleButton stays depressed when clicked, until clicked again.
GenBitmapToggleButton the same but with bitmaps.
they are not built on native controls but are self-drawn. They act
like normal buttons but you are able to better control how they look,
bevel width, colours, etc.
"""
import wx
@@ -39,6 +30,7 @@ import imageutils
#----------------------------------------------------------------------
class GenButtonEvent(wx.PyCommandEvent):
"""Event sent from the generic buttons when the button is activated. """
def __init__(self, eventType, ID):
wx.PyCommandEvent.__init__(self, eventType, ID)
self.isDown = False
@@ -60,6 +52,8 @@ class GenButtonEvent(wx.PyCommandEvent):
#----------------------------------------------------------------------
class GenButton(wx.PyControl):
"""A generic button, and base class for the other generic buttons."""
labelDelta = 1
def __init__(self, parent, ID, label,
@@ -356,6 +350,8 @@ class GenButton(wx.PyControl):
#----------------------------------------------------------------------
class GenBitmapButton(GenButton):
"""A generic bitmap button."""
def __init__(self, parent, ID, bitmap,
pos = wx.DefaultPosition, size = wx.DefaultSize,
style = 0, validator = wx.DefaultValidator,
@@ -429,7 +425,8 @@ class GenBitmapButton(GenButton):
#----------------------------------------------------------------------
class GenBitmapTextButton(GenBitmapButton): # generic bitmapped button with Text Label
class GenBitmapTextButton(GenBitmapButton):
"""A generic bitmapped button with text label"""
def __init__(self, parent, ID, bitmap, label,
pos = wx.DefaultPosition, size = wx.DefaultSize,
style = 0, validator = wx.DefaultValidator,
@@ -550,12 +547,15 @@ class __ToggleMixin:
class GenToggleButton(__ToggleMixin, GenButton):
"""A generic toggle button"""
pass
class GenBitmapToggleButton(__ToggleMixin, GenBitmapButton):
"""A generic toggle bitmap button"""
pass
class GenBitmapTextToggleButton(__ToggleMixin, GenBitmapTextButton):
"""A generic toggle bitmap button with text label"""
pass
#----------------------------------------------------------------------
+5 -1
View File
@@ -12,16 +12,19 @@
#----------------------------------------------------------------------
"""
Load color names/values from the rgb.txt file on my system...
Load addition color names/values into the wx colour database. These
names and values originally came from the rgb.txt file on my system...
"""
def getColourList():
"""Returns a list of just the colour names used by this module."""
return [ x[0] for x in getColourInfoList() ]
def getColourInfoList():
"""Returns the list of colour name/value tuples used by this module."""
return [
("SNOW", 255, 250, 250),
("GHOST WHITE", 248, 248, 255),
@@ -659,6 +662,7 @@ def getColourInfoList():
_haveUpdated = False
def updateColourDB():
"""Updates the wx colour database by adding new colour names and RGB values."""
global _haveUpdated
if not _haveUpdated:
import wx
+6
View File
@@ -32,6 +32,12 @@
# o Updated for 2.5 compatability.
#
"""
Provides a `ColourSelect` button that, when clicked, will display a
colour selection dialog. The selected colour is displayed on the
button itself.
"""
#----------------------------------------------------------------------------
import wx
+301 -284
View File
File diff suppressed because it is too large Load Diff
+7 -4
View File
@@ -17,20 +17,20 @@
#
"""
A module that allows multiple handlers to respond to single wxWindows
A module that allows multiple handlers to respond to single wxWidgets
events. This allows true NxN Observer/Observable connections: One
event can be received by multiple handlers, and one handler can
receive multiple events.
There are two ways to register event handlers. The first way is
similar to standard wxPython handler registration:
similar to standard wxPython handler registration::
from wxPython.lib.evtmgr import eventManager
from wx.lib.evtmgr import eventManager
eventManager.Register(handleEvents, EVT_BUTTON, win=frame, id=101)
There's also a new object-oriented way to register for events. This
invocation is equivalent to the one above, but does not require the
programmer to declare or track control ids or parent containers:
programmer to declare or track control ids or parent containers::
eventManager.Register(handleEvents, EVT_BUTTON, myButton)
@@ -64,14 +64,17 @@ class EventManager:
Registers a listener function (or any callable object) to
receive events of type event coming from the source window.
For example::
eventManager.Register(self.OnButton, EVT_BUTTON, theButton)
Alternatively, the specific window where the event is
delivered, and/or the ID of the event source can be specified.
For example::
eventManager.Register(self.OnButton, EVT_BUTTON, win=self, id=ID_BUTTON)
or::
eventManager.Register(self.OnButton, EVT_BUTTON, theButton, self)
"""
File diff suppressed because it is too large Load Diff