File: api.py

package info (click to toggle)
python-traitsui 8.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,232 kB
  • sloc: python: 58,982; makefile: 113
file content (146 lines) | stat: -rw-r--r-- 4,255 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# (C) Copyright 2004-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!

""" API for traitsui.editors subpackage.

Note that the following are also available from :mod:`traitsui.api`, which
is the preferred module for imports.

- :attr:`~.ArrayEditor`
- :attr:`~.BooleanEditor`
- :attr:`~.ButtonEditor`
- :attr:`~.CheckListEditor`
- :attr:`~.CodeEditor`
- :func:`~.ColorEditor`
- :attr:`~.CompoundEditor`
- :class:`~.CSVListEditor`
- :attr:`~.CustomEditor`
- :class:`~.DateEditor`
- :class:`~.DatetimeEditor`
- :attr:`~.DateRangeEditor`
- :class:`~.DefaultOverride`
- :attr:`~.DirectoryEditor`
- :attr:`~.DNDEditor`
- :attr:`~.DropEditor`
- :attr:`~.EnumEditor`
- :attr:`~.FileEditor`
- :func:`~.FontEditor`
- :attr:`~.HistoryEditor`
- :attr:`~.HTMLEditor`
- :attr:`~.KeyBindingEditor`
- :class:`~.ImageEditor`
- :attr:`~.ImageEnumEditor`
- :attr:`~.InstanceEditor`
- :attr:`~.ListEditor`
- :class:`~.ListStrEditor`
- :attr:`~.NullEditor`
- :class:`~.PopupEditor`
- :attr:`~.ProgressEditor`
- :attr:`~.RangeEditor`
- :func:`~.RGBColorEditor`
- :class:`~.ScrubberEditor`
- :class:`~.SearchEditor`
- :attr:`~.SetEditor`
- :attr:`~.ShellEditor`
- :attr:`~.StyledDateEditor`
- :attr:`~.TableEditor`
- :class:`~.TabularEditor`
- :attr:`~.TextEditor`
- :class:`~.TimeEditor`
- :attr:`~.TitleEditor`
- :attr:`~.TreeEditor`
- :attr:`~.TupleEditor`
- :attr:`~.ValueEditor`

Tree Editor Actions / Traits
----------------------------
- :attr:`~.CopyAction`
- :attr:`~.CutAction`
- :attr:`~.DeleteAction`
- :attr:`~.IconSize`
- :attr:`~.NewAction`
- :attr:`~.PasteAction`
- :attr:`~.RenameAction`

"""

from ..toolkit import toolkit


try:
    from .array_editor import ArrayEditor
except ImportError:
    # check if failure is due to missing numpy, otherwise re-raise
    try:
        import numpy
    except ImportError:
        import warnings

        warnings.warn(
            "ArrayEditor is not available due to missing numpy", ImportWarning
        )
    else:
        del numpy
        raise

from .boolean_editor import BooleanEditor
from .button_editor import ButtonEditor
from .check_list_editor import CheckListEditor
from .code_editor import CodeEditor
from .color_editor import ColorEditor
from .compound_editor import CompoundEditor
from .csv_list_editor import CSVListEditor
from .custom_editor import CustomEditor
from .date_editor import DateEditor
from .datetime_editor import DatetimeEditor
from .date_range_editor import DateRangeEditor
from .styled_date_editor import StyledDateEditor
from .default_override import DefaultOverride
from .directory_editor import DirectoryEditor
from .dnd_editor import DNDEditor
from .drop_editor import DropEditor
from .enum_editor import EnumEditor
from .file_editor import FileEditor
from .font_editor import FontEditor
from .key_binding_editor import KeyBindingEditor
from .image_editor import ImageEditor
from .image_enum_editor import ImageEnumEditor
from .instance_editor import InstanceEditor
from .list_editor import ListEditor
from .list_str_editor import ListStrEditor
from .null_editor import NullEditor
from .range_editor import RangeEditor
from .rgb_color_editor import RGBColorEditor
from .set_editor import SetEditor
from .text_editor import TextEditor
from .table_editor import TableEditor
from .time_editor import TimeEditor
from .title_editor import TitleEditor
from .tree_editor import TreeEditor
from .tuple_editor import TupleEditor
from .history_editor import HistoryEditor
from .html_editor import HTMLEditor
from .popup_editor import PopupEditor
from .value_editor import ValueEditor
from .shell_editor import ShellEditor
from .scrubber_editor import ScrubberEditor
from .tabular_editor import TabularEditor
from .progress_editor import ProgressEditor
from .search_editor import SearchEditor

from traitsui.editors.tree_editor import (
    CopyAction,
    CutAction,
    DeleteAction,
    IconSize,
    NewAction,
    PasteAction,
    RenameAction,
)