Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
traitsui\.qt4.tree\_node\_renderers module
traitsui\.editors\.datetime\_editor module
==========================================

.. automodule:: traitsui.qt4.tree_node_renderers
.. automodule:: traitsui.editors.datetime_editor
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/source/api/traitsui.editors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Submodules
traitsui.editors.csv_list_editor
traitsui.editors.custom_editor
traitsui.editors.date_editor
traitsui.editors.datetime_editor
traitsui.editors.default_override
traitsui.editors.directory_editor
traitsui.editors.dnd_editor
Expand Down
5 changes: 4 additions & 1 deletion docs/source/traitsui_user_manual/adapters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The TreeEditor and TreeNodes
.. _tree-nodes:

.. module:: traitsui.tree_node
:noindex:

The :py:class:`~traitsui.editors.tree_editor.TreeEditor` internally associates
with each node in the tree a pair consisting of the object that is associated
Expand Down Expand Up @@ -305,6 +306,7 @@ The TabularAdapter Class
========================

.. module:: traitsui.tabular_adapter
:noindex:

The power and flexibility of the tabular editor is mostly a result of the
:py:class:`TabularAdapter` class, which is the base class from which all
Expand Down Expand Up @@ -691,7 +693,7 @@ traits, where they can be easily accessed by a trait getter or setter method:
- ``column``: The column id of the table column being accessed (not its index).
- ``item``: The data item for the specified table row (i.e. the item determined
in the first step described above).
- `value``: In the case of a *set_xxx* method, the value to be set; otherwise it
- ``value``: In the case of a *set_xxx* method, the value to be set; otherwise it
is ``None``.

As mentioned previously, the :py:class:`TabularAdapter` class provides trait
Expand Down Expand Up @@ -857,6 +859,7 @@ The ListStrAdapter Class
========================

.. module:: traitsui.list_str_adapter
:noindex:

Although the :py:class:`~traitsui.editors.list_str_editor.ListStrEditor` editor
is frequently used, as might be expected, with lists of strings, it also
Expand Down
2 changes: 1 addition & 1 deletion docs/source/traitsui_user_manual/advanced_view.rst
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ is not defined. Also, avoid extended trait references where one of the
intermediate objects could be None, because there is no way to obtain a valid
reference from None.

Refer to the `Traits User Manual <http://github.enthought.com/traits/index.html>`_, in the chapter on trait
Refer to the `Traits User Manual <http://docs.enthought.com/traits/index.html>`_, in the chapter on trait
notification, for details of the extended trait name syntax.

.. index::
Expand Down
2 changes: 1 addition & 1 deletion docs/source/traitsui_user_manual/custom_view.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ attribute. There are seven possible values of **kind**:
* 'live'
* 'livemodal'
* 'nonmodal'
* 'wizard'
* 'wizard' (wx backend only)
* 'panel'
* 'subpanel'

Expand Down
115 changes: 10 additions & 105 deletions docs/source/traitsui_user_manual/factories_advanced_extra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ factory_function(*window_parent*, *editor*[, \*\ *args*, \*\*\ *kwargs*])
Additional arguments, if any, can be passed as a tuple in the *args* parameter
of CustomEditor().

For an example of using CustomEditor(),examine the implementation of the
NumericModelExplorer class in the enthought.model.numeric_model_explorer module;
CustomEditor() is used to generate the plots in the user interface.


DropEditor()
````````````
Expand Down Expand Up @@ -1267,43 +1263,23 @@ The following have special meaning for the DataFrameEditor():
- **fonts**: either a font for all entries, or a mapping of column id to fonts.


HistoryEditor()
```````````````

:Suitable for:
string traits
:Default for:
(none)
:Optional parameters:
*entries*

HistoryEditor() generates a combo box, which allows the user to either enter a
text string or select a value from a list of previously-entered values. The same
control is used for all editor styles. The *entries* parameter determines how
many entries are preserved in the history list. This type of control is used as
part of the simple style of file editor; see :ref:`fileeditor`.

ImageEditor()
`````````````
DefaultOverride()
`````````````````

:Suitable for:
(any)
:Default for:
(none)
:Optional parameters:
*image*, *scale*, *preserve_aspect_ratio*, *allow_upscaling*,
*allow_clipping*

ImageEditor() generates a read-only display of an image. The image to be
displayed is determined by the *image* parameter, or by the value of the trait
attribute being edited, if *image* is not specified. In either case, the value
must be a PyFace ImageResource (pyface.api.ImageResource), or a string
that can be converted to one. If *image* is specified, then the type and value
of the trait attribute being edited are irrelevant and are ignored.
The DefaultOverride() is a factory that takes the trait's default editor and
customizes it with the specified parameters. This is useful when a trait defines
a default editor using some of its data, e.g. Range or Enum, and you want to
tweak some of the other parameters without having recreate that data.

For example, the default editor for Range(low=0, high=1500) has
'1500' as the upper label. To change it to 'Max' instead, use::

For the Qt backend *scale*, *preserve_aspect_ratio*, *allow_upscaling*, and
*allow_clipping* control whether the image should be scaled or not, and how
to perform that scaling.
View(Item('my_range', editor=DefaultOverride(high_label='Max'))


.. _extra-trait-editor-factories:
Expand All @@ -1329,74 +1305,3 @@ AnimatedGIFEditor()
AnimatedGIFEditor() generates a display of the contents of an animated GIF image
file. The Boolean *playing* parameter determines whether the image is animated
or static.

FlashEditor()
`````````````

:Suitable for:
string traits, Enum(string values)
:Default for:
(none)

FlashEditor() generates a display of an Adobe Flash Video file, using an ActiveX
control (if one is installed on the system). This factory is available only on
Microsoft Windows platforms. The attribute being edited must have a value whose
text representation is the name or URL of a Flash video file. If the value is a
Unicode string, it must contain only characters that are valid for filenames or
URLs.

IEHTMLEditor()
``````````````

:Suitable for:
string traits, Enum(string values)
:Default for:
(none)
:Optional parameters:
*back, forward, home, html, page_loaded, refresh, search, status, stop,*
*title*

IEHTMLEditor() generates a display of a web page, using Microsoft Internet
Explorer (IE) via ActiveX to render the page. This factory is available only on
Microsoft Windows platforms. The attribute being edited must have value whose
text representation is a URL. If the value is a Unicode string, it must contain
only characters that are valid for URLs.

The *back*, *forward*, *home*, *refresh*, *search* and *stop* parameters are
extended names of event attributes that represent the user clicking on the
corresponding buttons in the standard IE interface. The IE buttons are not
displayed by the editor; you must create buttons separately in the View,
if you want the user to be able to actually click buttons.

The *html*, *page_loaded*, *status*, and *title* parameters are the extended
names of string attributes, which the editor updates with values based on its
own state. You can display these attributes elsewhere in the View.

- *html*: The current page content as HTML (as would be displayed by the
:menuselection:`View > Source` command in IE).
- *page_loaded*: The URL of the currently displayed page; this may be different
from the URL represented by the attribute being edited.
- *status*: The text that would appear in the IE status bar.
- *title*: The title of the currently displayed page.

LEDEditor()
```````````

:Suitable for:
numeric traits
:Default for:
(none)
:Optional parameters:
*alignment, format_str*

LEDEditor() generates a display that resembles a "digital" display using
light-emitting diodes. All styles of this editor are the same, and are
read-only.

The *alignment* parameter can be 'left', 'center', or 'right' to indicate how
the value should be aligned within the display. The default is right-alignment.

.. figure:: images/led_editor.png
:alt: LED-like display of 90452

Figure 56: LED Editor with right alignment
Loading