Package motherhamster :: Module cheekpouches :: Class AssetBase

Class AssetBase



object --+
         |
        AssetBase
Known Subclasses:
imageassets.ImageAsset, prettytext.FontAsset, prettytext.GlyphSet, soundassets.SoundAsset, surfacefilters.SurfaceFilterABC, surfacefilters.SurfaceFilters

a base class for assets - all assets should inherit from it

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__getinitargs__(self)
 
__reduce__(self)
helper for pickle
 
asset_get_properties(self)
Returns a dictionary of the attributes which are asset properties
 
asset_is_writable(self)
Returns whether you will be able to write the asset to disk
 
asset_set_path(self, path, pouch)
 
asset_save(self)
Asks the cheekpouch for this asset to save it, returns False if we are not writable
 
asset_editor_image(self)
Returns an image representation of the asset as a pygame surface
 
asset_monitor_changes(self, object_to_call)
Registers an object to be called when the asset is modified
 
asset_lose_monitor(self, object_to_call)
removes an object from the registry
 
asset_report_property_change(self, key, value)
call to tell the asset you changed it, if you want monitors to know about it
 
asset_set_property(self, key, value)
A function the editor calls to change a property the editor should never edit an asset any other way

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__reduce__(self)

 
helper for pickle
Overrides: object.__reduce__
(inherited documentation)