Skip to content

Commit

Permalink
Merge pull request #232 from gferreira/master
Browse files Browse the repository at this point in the history
updating representation docs, converting lists of notifications to lists (WIP)
  • Loading branch information
benkiel committed May 6, 2019
2 parents 3268030 + c8ed89d commit 14f7b94
Show file tree
Hide file tree
Showing 22 changed files with 172 additions and 244 deletions.
16 changes: 6 additions & 10 deletions Lib/defcon/objects/anchor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@ class Anchor(BaseDictObject):
**This object posts the following notifications:**
========================
Name
========================
Anchor.Changed
Anchor.XChanged
Anchor.YChanged
Anchor.NameChanged
Anchor.ColorChanged
Anchor.IdentifierChanged
========================
- Anchor.Changed
- Anchor.XChanged
- Anchor.YChanged
- Anchor.NameChanged
- Anchor.ColorChanged
- Anchor.IdentifierChanged
During initialization an anchor dictionary can be passed. If so,
the new object will be populated with the data from the dictionary.
Expand Down
14 changes: 5 additions & 9 deletions Lib/defcon/objects/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ class BaseObject(object):
**This object posts the following notifications:**
====================
Name
====================
BaseObject.Changed
BaseObject.BeginUndo
BaseObject.EndUndo
BaseObject.BeginRedo
BaseObject.EndRedo
====================
- BaseObject.Changed
- BaseObject.BeginUndo
- BaseObject.EndUndo
- BaseObject.BeginRedo
- BaseObject.EndRedo
Keep in mind that subclasses will not post these same notifications.
Expand Down
15 changes: 6 additions & 9 deletions Lib/defcon/objects/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ class Component(BaseObject):
**This object posts the following notifications:**
===============================
Name
===============================
Component.Changed
Component.BaseGlyphChanged
Component.BaseGlyphDataChanged
Component.TransformationChanged
Component.IdentifierChanged
===============================
- Component.Changed
- Component.BaseGlyphChanged
- Component.BaseGlyphDataChanged
- Component.TransformationChanged
- Component.IdentifierChanged
"""

changeNotificationName = "Component.Changed"
Expand Down
12 changes: 4 additions & 8 deletions Lib/defcon/objects/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ class Contour(BaseObject):
**This object posts the following notifications:**
===============================
Name
===============================
Contour.Changed
Contour.WindingDirectionChanged
Contour.PointsChanged
Contour.IdentifierChanged
===============================
- Contour.Changed
- Contour.WindingDirectionChanged
- Contour.PointsChanged
- Contour.IdentifierChanged
The Contour object has list like behavior. This behavior allows you to interact
with point data directly. For example, to get a particular point::
Expand Down
6 changes: 1 addition & 5 deletions Lib/defcon/objects/dataSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ class DataSet(BaseObject):
**This object posts the following notifications:**
===============
Name
===============
DataSet.Changed
===============
- DataSet.Changed
"""

Expand Down
17 changes: 7 additions & 10 deletions Lib/defcon/objects/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@ class Features(BaseObject):
**This object posts the following notifications:**
================
Name
================
Features.Changed
Features.BeginUndo
Features.EndUndo
Features.BeginRedo
Features.EndRedo
Features.TextChanged
================
- Features.Changed
- Features.BeginUndo
- Features.EndUndo
- Features.BeginRedo
- Features.EndRedo
- Features.TextChanged
"""

changeNotificationName = "Features.Changed"
Expand Down
14 changes: 5 additions & 9 deletions Lib/defcon/objects/font.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,11 @@ class Font(BaseObject):
**This object posts the following notifications:**
======================
Name
======================
Font.Changed
Font.ReloadedGlyphs
Font.GlyphOrderChanged
Font.GuidelinesChanged
Font.GuidelineWillBeDeleted
======================
- Font.Changed
- Font.ReloadedGlyphs
- Font.GlyphOrderChanged
- Font.GuidelinesChanged
- Font.GuidelineWillBeDeleted
The Font object has some dict like behavior. For example, to get a glyph::
Expand Down
60 changes: 28 additions & 32 deletions Lib/defcon/objects/glyph.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,38 +33,34 @@ class Glyph(BaseObject):
**This object posts the following notifications:**
============================
Name
============================
Glyph.Changed
Glyph.BeginUndo
Glyph.EndUndo
Glyph.BeginRedo
Glyph.EndRedo
Glyph.NameWillChange
Glyph.NameChanged
Glyph.UnicodesChanged
Glyph.WidthChanged
Glyph.HeightChanged
Glyph.NoteChanged
Glyph.LibChanged
Glyph.ImageChanged
Glyph.ImageWillBeDeleted
Glyph.ContourWillBeAdded
Glyph.ContourWillBeDeleted
Glyph.ContoursChanged
Glyph.ComponentWillBeAdded
Glyph.ComponentWillBeDeleted
Glyph.ComponentsChanged
Glyph.AnchorWillBeAdded
Glyph.AnchorWillBeDeleted
Glyph.AnchorsChanged
Glyph.GuidelineWillBeAdded
Glyph.GuidelineWillBeDeleted
Glyph.GuidelinesChanged
Glyph.MarkColorChanged
Glyph.VerticalOriginChanged
============================
- Glyph.Changed
- Glyph.BeginUndo
- Glyph.EndUndo
- Glyph.BeginRedo
- Glyph.EndRedo
- Glyph.NameWillChange
- Glyph.NameChanged
- Glyph.UnicodesChanged
- Glyph.WidthChanged
- Glyph.HeightChanged
- Glyph.NoteChanged
- Glyph.LibChanged
- Glyph.ImageChanged
- Glyph.ImageWillBeDeleted
- Glyph.ContourWillBeAdded
- Glyph.ContourWillBeDeleted
- Glyph.ContoursChanged
- Glyph.ComponentWillBeAdded
- Glyph.ComponentWillBeDeleted
- Glyph.ComponentsChanged
- Glyph.AnchorWillBeAdded
- Glyph.AnchorWillBeDeleted
- Glyph.AnchorsChanged
- Glyph.GuidelineWillBeAdded
- Glyph.GuidelineWillBeDeleted
- Glyph.GuidelinesChanged
- Glyph.MarkColorChanged
- Glyph.VerticalOriginChanged
The Glyph object has list like behavior. This behavior allows you to interact
with contour data directly. For example, to get a particular contour::
Expand Down
22 changes: 9 additions & 13 deletions Lib/defcon/objects/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,15 @@ class Groups(BaseDictObject):
**This object posts the following notifications:**
===================
Name
===================
Groups.Changed
Groups.BeginUndo
Groups.EndUndo
Groups.BeginRedo
Groups.EndRedo
Groups.GroupSet
Groups.GroupDeleted
Groups.Cleared
Groups.Updated
===================
- Groups.Changed
- Groups.BeginUndo
- Groups.EndUndo
- Groups.BeginRedo
- Groups.EndRedo
- Groups.GroupSet
- Groups.GroupDeleted
- Groups.Cleared
- Groups.Updated
This object behaves like a dict. The keys are group names and the
values are lists of glyph names::
Expand Down
16 changes: 6 additions & 10 deletions Lib/defcon/objects/guideline.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@ class Guideline(BaseDictObject):
**This object posts the following notifications:**
===========================
Name
===========================
Guideline.Changed
Guideline.XChanged
Guideline.YChanged
Guideline.AngleChanged
Guideline.NameChanged
Guideline.IdentifierChanged
===========================
- Guideline.Changed
- Guideline.XChanged
- Guideline.YChanged
- Guideline.AngleChanged
- Guideline.NameChanged
- Guideline.IdentifierChanged
During initialization a guideline dictionary, following the format defined
in the UFO spec, can be passed. If so, the new object will be populated
Expand Down
14 changes: 5 additions & 9 deletions Lib/defcon/objects/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@ class Image(BaseDictObject):
**This object posts the following notifications:**
===========================
Name
===========================
Image.Changed
Image.FileNameChanged
Image.TransformationChanged
Image.ColorChanged
Image.ImageDataChanged
===========================
- Image.Changed
- Image.FileNameChanged
- Image.TransformationChanged
- Image.ColorChanged
- Image.ImageDataChanged
During initialization an image dictionary, following the format defined
in the UFO spec, can be passed. If so, the new object will be populated
Expand Down
18 changes: 7 additions & 11 deletions Lib/defcon/objects/imageSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ class ImageSet(BaseObject):
**This object posts the following notifications:**
===========================
Name
===========================
ImageSet.Changed
ImageSet.FileNamesChanged
ImageSet.ImageChanged
ImageSet.ImageWillBeAdded
ImageSet.ImageAdded
ImageSet.ImageWillBeDeleted
ImageSet.ImageDeleted
===========================
- ImageSet.Changed
- ImageSet.FileNamesChanged
- ImageSet.ImageChanged
- ImageSet.ImageWillBeAdded
- ImageSet.ImageAdded
- ImageSet.ImageWillBeDeleted
- ImageSet.ImageDeleted
This object behaves like a dict. For example, to get the
raw image data for a particular image::
Expand Down
16 changes: 6 additions & 10 deletions Lib/defcon/objects/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,12 @@ class Info(BaseObject):
**This object posts the following notifications:**
===========================
Name
===========================
Info.Changed
Info.BeginUndo
Info.EndUndo
Info.BeginRedo
Info.EndRedo
Info.ValueChanged
===========================
- Info.Changed
- Info.BeginUndo
- Info.EndUndo
- Info.BeginRedo
- Info.EndRedo
- Info.ValueChanged
**Note:** The documentation strings here were automatically generated
from the `UFO specification <http://unifiedfontobject.org/filestructure/fontinfo.html>`_.
Expand Down
22 changes: 9 additions & 13 deletions Lib/defcon/objects/kerning.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,15 @@ class Kerning(BaseDictObject):
**This object posts the following notifications:**
===================
Name
===================
Kerning.Changed
Kerning.BeginUndo
Kerning.EndUndo
Kerning.BeginRedo
Kerning.EndRedo
Kerning.PairSet
Kerning.PairDeleted
Kerning.Cleared
Kerning.Updated
====================
- Kerning.Changed
- Kerning.BeginUndo
- Kerning.EndUndo
- Kerning.BeginRedo
- Kerning.EndRedo
- Kerning.PairSet
- Kerning.PairDeleted
- Kerning.Cleared
- Kerning.Updated
This object behaves like a dict. For example, to get a list of all kerning pairs::
Expand Down

0 comments on commit 14f7b94

Please sign in to comment.