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
|
#-------------------------------------------------------------------------------
#
# Classes and functions used to define feature metadata values or options.
#
# Written by: David C. Morrill
#
# Date: 07/21/2006
#
# (c) Copyright 2006 by David C. Morrill
#
#-------------------------------------------------------------------------------
""" Copyright 2006 by David C. Morrill """
#-------------------------------------------------------------------------------
# Imports:
#-------------------------------------------------------------------------------
from enthought.traits.api \
import HasStrictTraits, List, Str, false
#-------------------------------------------------------------------------------
# Metadata filters:
#-------------------------------------------------------------------------------
def is_not_none ( value ):
return (value is not None)
#-------------------------------------------------------------------------------
# 'DropFile' class:
#-------------------------------------------------------------------------------
class DropFile ( HasStrictTraits ):
#---------------------------------------------------------------------------
# Trait definitions:
#---------------------------------------------------------------------------
# List of valid droppable file extensions:
extensions = List( Str )
# Is the trait also draggable?
draggable = false
# The tooltip to use for the feature:
tooltip = Str
|