~ubuntu-branches/ubuntu/utopic/python-traitsui/utopic

« back to all changes in this revision

Viewing changes to traitsui/editors/key_binding_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) 2008, 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:   10/21/2004
 
15
#
 
16
#------------------------------------------------------------------------------
 
17
""" Defines the key binding editor for use with the KeyBinding class. This is a
 
18
specialized editor used to associate a particular key with a control (i.e., the
 
19
key binding editor).
 
20
"""
 
21
 
 
22
#-------------------------------------------------------------------------------
 
23
#  Imports:
 
24
#-------------------------------------------------------------------------------
 
25
 
 
26
from __future__ import absolute_import
 
27
 
 
28
# FIXME: Import from the api.py file when it has been added.
 
29
from ..basic_editor_factory import BasicEditorFactory
 
30
 
 
31
from ..toolkit import toolkit_object
 
32
 
 
33
# Callable which returns the editor to use in the ui.
 
34
def key_binding_editor(*args, **traits):
 
35
    return toolkit_object('key_binding_editor:KeyBindingEditor')(*args,
 
36
                                                                 **traits)
 
37
 
 
38
#-------------------------------------------------------------------------------
 
39
#  Create the editor factory object:
 
40
#-------------------------------------------------------------------------------
 
41
KeyBindingEditor = ToolkitEditorFactory = BasicEditorFactory(klass = key_binding_editor)
 
42
 
 
43
### EOF ------------------------------------------------------------------------