mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-15 17:20:07 +01:00
Docs: fix various minor sphinx parsing issues
This commit is contained in:
@@ -71,7 +71,7 @@ wxWidgets implementation of the :class:`ThumbnailCtrl` control. Andrea Gavana
|
||||
notes that :class:`ThumbnailCtrl` wouldn't have been so fast and complete
|
||||
without the suggestions and hints from Peter Damoc.
|
||||
|
||||
Usage:
|
||||
Usage
|
||||
=====
|
||||
|
||||
Usage example::
|
||||
|
||||
@@ -117,7 +117,7 @@ mask
|
||||
X Allow string.letters, string.punctuation, string.digits
|
||||
& Allow string.punctuation only (doesn't include all unicode symbols)
|
||||
\* Allow any visible character
|
||||
| explicit field boundary (takes no space in the control; allows mix
|
||||
\| Explicit field boundary (takes no space in the control; allows mix
|
||||
of adjacent mask characters to be treated as separate fields,
|
||||
eg: '&|###' means "field 0 = '&', field 1 = '###'", but there's
|
||||
no fixed characters in between.
|
||||
@@ -189,59 +189,67 @@ defaultEncoding
|
||||
formatcodes
|
||||
These other properties can be passed to the class when instantiating it:
|
||||
Formatcodes are specified as a string of single character formatting
|
||||
codes that modify behavior of the control::
|
||||
codes that modify behavior of the control:
|
||||
|
||||
_ Allow spaces
|
||||
! Force upper
|
||||
^ Force lower
|
||||
R Right-align field(s)
|
||||
r Right-insert in field(s) (implies R)
|
||||
< Stay in field until explicit navigation out of it
|
||||
======= ==========================================================
|
||||
_ Allow spaces
|
||||
! Force upper
|
||||
^ Force lower
|
||||
R Right-align field(s)
|
||||
r Right-insert in field(s) (implies R)
|
||||
< Stay in field until explicit navigation out of it
|
||||
|
||||
> Allow insert/delete within partially filled fields (as
|
||||
opposed to the default "overwrite" mode for fixed-width
|
||||
masked edit controls.) This allows single-field controls
|
||||
or each field within a multi-field control to optionally
|
||||
behave more like standard text controls.
|
||||
(See EMAIL or phone number autoformat examples.)
|
||||
> Allow insert/delete within partially filled fields (as
|
||||
opposed to the default "overwrite" mode for fixed-width
|
||||
masked edit controls.) This allows single-field controls
|
||||
or each field within a multi-field control to optionally
|
||||
behave more like standard text controls.
|
||||
(See EMAIL or phone number autoformat examples.)
|
||||
|
||||
*Note: This also governs whether backspace/delete operations
|
||||
shift contents of field to right of cursor, or just blank the
|
||||
erased section.
|
||||
.. note::
|
||||
|
||||
Also, when combined with 'r', this indicates that the field
|
||||
or control allows right insert anywhere within the current
|
||||
non-empty value in the field. (Otherwise right-insert behavior
|
||||
is only performed to when the entire right-insertable field is
|
||||
selected or the cursor is at the right edge of the field.*
|
||||
This also governs whether backspace/delete operations
|
||||
shift contents of field to right of cursor, or just blank
|
||||
the erased section.
|
||||
|
||||
Also, when combined with 'r', this indicates that the field
|
||||
or control allows right insert anywhere within the current
|
||||
non-empty value in the field. (Otherwise right-insert behavior
|
||||
is only performed to when the entire right-insertable field is
|
||||
selected or the cursor is at the right edge of the field.
|
||||
|
||||
|
||||
, Allow grouping character in integer fields of numeric controls
|
||||
and auto-group/regroup digits (if the result fits) when leaving
|
||||
such a field. (If specified, .SetValue() will attempt to
|
||||
auto-group as well.)
|
||||
',' is also the default grouping character. To change the
|
||||
grouping character and/or decimal character, use the groupChar
|
||||
and decimalChar parameters, respectively.
|
||||
Note: typing the "decimal point" character in such fields will
|
||||
clip the value to that left of the cursor for integer
|
||||
fields of controls with "integer" or "floating point" masks.
|
||||
If the ',' format code is specified, this will also cause the
|
||||
resulting digits to be regrouped properly, using the current
|
||||
grouping character.
|
||||
- Prepend and reserve leading space for sign to mask and allow
|
||||
signed values (negative #s shown in red by default.) Can be
|
||||
used with argument useParensForNegatives (see below.)
|
||||
0 integer fields get leading zeros
|
||||
D Date[/time] field
|
||||
T Time field
|
||||
F Auto-Fit: the control calculates its size from
|
||||
the length of the template mask
|
||||
V validate entered chars against validRegex before allowing them
|
||||
to be entered vs. being allowed by basic mask and then having
|
||||
the resulting value just colored as invalid.
|
||||
(See USSTATE autoformat demo for how this can be used.)
|
||||
S select entire field when navigating to new field
|
||||
, Allow grouping character in integer fields of numeric controls
|
||||
and auto-group/regroup digits (if the result fits) when leaving
|
||||
such a field. (If specified, .SetValue() will attempt to
|
||||
auto-group as well.)
|
||||
',' is also the default grouping character. To change the
|
||||
grouping character and/or decimal character, use the groupChar
|
||||
and decimalChar parameters, respectively.
|
||||
|
||||
.. note::
|
||||
|
||||
Typing the "decimal point" character in such fields will
|
||||
clip the value to that left of the cursor for integer
|
||||
fields of controls with "integer" or "floating point" masks.
|
||||
|
||||
If the ',' format code is specified, this will also cause the
|
||||
resulting digits to be regrouped properly, using the current
|
||||
grouping character.
|
||||
\- Prepend and reserve leading space for sign to mask and allow
|
||||
signed values (negative #s shown in red by default.) Can be
|
||||
used with argument useParensForNegatives (see below.)
|
||||
0 Integer fields get leading zeros
|
||||
D Date[/time] field
|
||||
T Time field
|
||||
F Auto-Fit: the control calculates its size from
|
||||
the length of the template mask
|
||||
V Validate entered chars against validRegex before allowing them
|
||||
to be entered vs. being allowed by basic mask and then having
|
||||
the resulting value just colored as invalid.
|
||||
(See USSTATE autoformat demo for how this can be used.)
|
||||
S Select entire field when navigating to new field
|
||||
======= ==========================================================
|
||||
|
||||
fillChar
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ masked.NumCtrl:
|
||||
emptyBackgroundColour = "White",
|
||||
validBackgroundColour = "White",
|
||||
invalidBackgroundColour = "Yellow",
|
||||
autoSize = True
|
||||
autoSize = True,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -7,10 +7,14 @@
|
||||
demo.py
|
||||
=======
|
||||
|
||||
This is a demo showing some of the capabilities of the :mod:`wx.lib.plot`
|
||||
package. It is intended to be run as a standalone script via::
|
||||
.. highlight:: shell
|
||||
|
||||
user@host:.../site-packages/wx/lib/plot$ python examples/demo.py
|
||||
This is a demo showing some of the capabilities of the :mod:`wx.lib.plot`
|
||||
package.
|
||||
|
||||
It is intended to be run as a standalone script via::
|
||||
|
||||
user@host:.../site-packages/wx/lib/plot$ python examples/demo.py
|
||||
|
||||
"""
|
||||
__docformat__ = "restructuredtext en"
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
.. highlight:: shell
|
||||
|
||||
A simple example showing how to use lib.plot from wxPython.
|
||||
|
||||
It is intended to be run as a standalone script via::
|
||||
|
||||
user@host:.../site-packages/wx/lib/plot$ python examples/simple_example.py
|
||||
user@host:.../site-packages/wx/lib/plot$ python examples/simple_example.py
|
||||
|
||||
"""
|
||||
__docformat__ = "restructuredtext en"
|
||||
|
||||
@@ -120,7 +120,7 @@ class PolyPoints(object):
|
||||
:type: tuple of bool, length 2
|
||||
:raises ValueError: when setting an invalid value
|
||||
|
||||
.. notes::
|
||||
.. note::
|
||||
|
||||
This is a simplified example of how SymLog works::
|
||||
|
||||
@@ -163,7 +163,7 @@ class PolyPoints(object):
|
||||
:type: tuple of float, length 2
|
||||
:raises ValueError: when setting an invalid value
|
||||
|
||||
.. notes::
|
||||
.. note::
|
||||
|
||||
This is a simplified example of how SymLog works::
|
||||
|
||||
@@ -221,7 +221,7 @@ class PolyPoints(object):
|
||||
:setter: Sets the value of points.
|
||||
:type: list of `(x, y)` pairs
|
||||
|
||||
.. Note::
|
||||
.. note::
|
||||
|
||||
Only set unscaled points - do not perform the log, abs, or symlog
|
||||
adjustments yourself.
|
||||
@@ -1010,17 +1010,10 @@ class PolyBoxPlot(PolyPoints):
|
||||
|
||||
outliers are outside of 1.5 * IQR
|
||||
|
||||
Parameters
|
||||
----------
|
||||
data : array-like
|
||||
The data to plot
|
||||
|
||||
Returns
|
||||
-------
|
||||
bpdata : collections.namedtuple
|
||||
Descriptive statistics for data:
|
||||
:param array-like data: The data to plot
|
||||
:return bpdata: Descriptive statistics for data:
|
||||
(min_data, low_whisker, q25, median, q75, high_whisker, max_data)
|
||||
|
||||
:rtype: collections.namedtuple
|
||||
"""
|
||||
data = self._clean_data(data)
|
||||
|
||||
@@ -1066,20 +1059,20 @@ class PolyBoxPlot(PolyPoints):
|
||||
"""
|
||||
Draws a box plot on the DC.
|
||||
|
||||
Notes
|
||||
-----
|
||||
The following draw order is required:
|
||||
.. note::
|
||||
|
||||
1. First the whisker line
|
||||
2. Then the IQR box
|
||||
3. Lasly the median line.
|
||||
The following draw order is required:
|
||||
|
||||
This is because
|
||||
1. First the whisker line
|
||||
2. Then the IQR box
|
||||
3. Lasly the median line.
|
||||
|
||||
+ The whiskers are drawn as single line rather than two lines
|
||||
+ The median line must be visible over the box if the box has a fill.
|
||||
This is because
|
||||
|
||||
Other than that, the draw order can be changed.
|
||||
+ The whiskers are drawn as single line rather than two lines
|
||||
+ The median line must be visible over the box if the box has a fill.
|
||||
|
||||
Other than that, the draw order can be changed.
|
||||
"""
|
||||
self._draw_whisker(dc, printerScale)
|
||||
self._draw_iqr_box(dc, printerScale)
|
||||
|
||||
Reference in New Issue
Block a user