[Scribus] SoC idea: structured layout through sequences and spacers
Mon Mar 26 19:53:21 CEST 2007
Here are some more parts that could go in my application. What do the
potential mentors think of my proposal? Should I file an application this
afternoon, there's still time before the deadline this evening.
I'd like to implement a general framework to support structured
relationships between objects or text elements in scribus. The relationships
could be either fixed (place this element 2 points to the right of that one)
or dynamic (center this element within this group). The primary advantage of
such a system would be to allow layout styles which position and format
structured content in a specific way. A layout style would place elements in
a specific way as well as apply specific formatting styles to each one.
This would eventually be usable both for text content within a text frame
and for layout of frames in a document, and would support an extremely
diverse array of uses, ranging from sophisticated layout templates for
content from a CMS (as discussed in the related Scribus proposal) to native
styles for advanced text layout, including equations and native rendering of
latex code, etc. (not included in this proposal, however).
The core functionality would be developed as a self-contained c++ class
library usable by both Scribus and other apps, and would be integrated into
Scribus to provide support for specific applications, focusing on layout of
frames in the document. Basic support for object clones would be available
as part of the implemented functionality.
Additional use case
* layout templates for an entire document, usable from Scribus directly or
though a CMS interface if developed
* integration of sequences with the Scribus group structure, allowing proper
display in the outline, etc.
* add support for layout styles to the existing Scribus style system
All code would be c++. Outline of class library functionality:
- classes for spacers, selectors, sequences, and sequence styles
- methods to return objects referenced by a spacer or selector object,
specified elements in a sequence, etc.
- methods to return the absolute position and attributes of objects
determined by spacers or sequences, so that they can be rendered using the
existing rendering code with just a hook to call my code
- methods to validate a style against content for styles that require a
particular content structure
- all references to individual objects and styles would be generic (though
templates/subclassing/other...?) so that the library need not know the
details of the attributes supported by a Scribus object (I would write the
glue code for the specific applications in Scribus outlined above)
- ideally, sequences would be able to intersect, so that different
properties (x and y position, size, rotation, etc.) could be controlled by
different sequences. However, I would probably also support constraints to
disallow this or other more complex features to support use in simpler apps.
I would likely not implement the more complex cases for this project, but
design the API to allow them.
View this message in context: http://www.nabble.com/SoC-idea%3A-structured-layout-through-sequences-and-spacers-tf3464574.html#a9678104
Sent from the Scribus mailing list archive at Nabble.com.
More information about the scribus