~ubuntu-branches/ubuntu/trusty/python-traitsui/trusty

« back to all changes in this revision

Viewing changes to traitsui/wx/value_editor.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-07-09 13:57:39 UTC
  • Revision ID: james.westby@ubuntu.com-20110709135739-x5u20q86huissmn1
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#------------------------------------------------------------------------------
 
2
#
 
3
#  Copyright (c) 2006, Enthought, Inc.
 
4
#  All rights reserved.
 
5
#
 
6
#  This software is provided without warranty under the terms of the BSD
 
7
#  license included in enthought/LICENSE.txt and may be redistributed only
 
8
#  under the conditions described in the aforementioned license.  The license
 
9
#  is also available online at http://www.enthought.com/licenses/BSD.txt
 
10
#
 
11
#  Thanks for using Enthought open source!
 
12
#
 
13
#  Author: David C. Morrill
 
14
#  Date:   01/05/2006
 
15
#
 
16
#------------------------------------------------------------------------------
 
17
 
 
18
""" Defines the tree-based Python value editor and the value editor factory,
 
19
    for the wxPython user interface toolkit.
 
20
"""
 
21
 
 
22
#-------------------------------------------------------------------------------
 
23
#  Imports:
 
24
#-------------------------------------------------------------------------------
 
25
 
 
26
# FIXME: ToolkitEditorFactory is a proxy class defined here just for backward
 
27
# compatibility. The class has been moved to the
 
28
# traitsui.editors.value_editor file.
 
29
from traitsui.editors.value_editor \
 
30
    import _ValueEditor, ToolkitEditorFactory
 
31
 
 
32
from editor import Editor
 
33
 
 
34
class SimpleEditor( _ValueEditor, Editor):
 
35
    """ Returns the editor to use for simple style views.
 
36
    """
 
37
 
 
38
    # Override the value of the readonly trait.
 
39
    readonly = False
 
40
 
 
41
class ReadonlyEditor( _ValueEditor, Editor):
 
42
    """ Returns the editor to use for readonly style views.
 
43
    """
 
44
 
 
45
    # Override the value of the readonly trait.
 
46
    readonly = True
 
47
 
 
48
### EOF #######################################################################