API Reference for Enthought Tool Suite 3.2.0
Defines the ImageLibrary object used to manage Traits UI image libraries.
Names of files that should not be copied when ceating a new library copy:
dont_copy_list = ('image_volume.py', 'image_info.py', 'license.txt')
The image_cache root directory:
image_cache_path = join(traits_home(), 'image_cache')
Standard image file extensions:
ImageFileExts = ('.png', '.gif', '.jpg', 'jpeg')
Template for creating an ImageInfo object:
ImageInfoTemplate = """ ImageInfo(
name = %(name)s,
image_name = %(image_name)s,
description = %(description)s,
category = %(category)s,
keywords = %(keywords)s,
width = %(width)d,
height = %(height)d,
border = Border( %(bleft)d, %(bright)d, %(btop)d, %(bbottom)d ),
content = Margin( %(cleft)d, %(cright)d, %(ctop)d, %(cbottom)d ),
label = Margin( %(lleft)d, %(lright)d, %(ltop)d, %(lbottom)d ),
alignment = %(alignment)s
)"""
Template for creating an ImageVolume 'images' list:
ImageVolumeImagesTemplate = """from enthought.traits.ui.image.image import ImageInfo
from enthought.traits.ui.ui_traits import Margin, Border
images = [
%s
]"""
Template for creating an ImageVolumeInfo object:
ImageVolumeInfoCodeTemplate = """ ImageVolumeInfo(
description = %(description)s,
copyright = %(copyright)s,
license = %(license)s,
image_names = %(image_names)s
)"""
Template for creating an ImageVolumeInfo license text:
ImageVolumeInfoTextTemplate = """Description:
%s
Copyright:
%s
License:
%s
Applicable Images:
%s"""
Template for creating an ImageVolume object:
ImageVolumeTemplate = """from enthought.traits.ui.image.image import ImageVolume, ImageVolumeInfo
volume = ImageVolume(
category = %(category)s,
keywords = %(keywords)s,
aliases = %(aliases)s,
time_stamp = %(time_stamp)s,
info = [
%(info)s
]
)"""
Create the singleton image object:
ImageLibrary = ImageLibrary()
Adds all traits from a specified object to a dictionary with a specified name prefix.
Returns the value of a Python symbol loaded from a specified source code string.
Joins a specified volume_name and file_name into an image name, and return the resulting image name.
Returns the contents of the specified file_name.
Splits a specified image_name into its constituent volume and file names and returns a tuple of the form: ( volume_name, file_name ).
Returns a specified time as a text string.
Writes the specified data to the specified file.
© Copyright 2002-2009 Enthought, Inc.