1
#------------------------------------------------------------------------------
3
# Copyright (c) 2008, Enthought, Inc.
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
11
# Thanks for using Enthought open source!
13
# Author: Judah De Paula
16
#------------------------------------------------------------------------------
18
""" A Traits UI editor that wraps a WX timer control.
21
from __future__ import absolute_import
23
from traits.api import Str
24
from ..editor_factory import EditorFactory
25
from ..ui_traits import AView
28
class TimeEditor(EditorFactory):
29
""" Editor factory for time editors. Generates _TimeEditor()s.
32
#---------------------------------------------------------------------------
34
#---------------------------------------------------------------------------
36
#-- ReadonlyEditor traits --------------------------------------------------
38
# Message to show when Time is None.
39
message = Str('Undefined')
41
# The string representation of the time to show. Uses time.strftime format.
42
strftime = Str('%I:%M:%S %p')
44
# An optional view to display when a read-only text editor is clicked: