doc: updated Lua bindings link in README.xml
[adg.git] / docs / gnu / TODO.xml
blob00d781041d3eb9acf31eb5f4b27e3a014e61bc26
1 <?xml version="1.0"?>
2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3                          "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
5 <chapter id="TODO">
6 <title>Planned features</title>
7 <subtitle>Indicative roadmap of ADG features implementation</subtitle>
9 <para>The following list is roughly in reversed implementation order. All the
10 improvements must be reflected in the demo programs, where applicable.</para>
12 <simplesect id="TODO.unknown">
13 <title>Road to unknown</title>
15 <para>This is the collection of TODOs that could be applied also after the
16 1.0.0 version has been released. They are usually non-blocking and hard
17 to implement.</para>
19 <itemizedlist mark="circle">
20    <listitem>Actually the AdgPath code is simplified to execute binary actions
21    only when the two operands are properly defined primitives. Anyway
22    those actions could be chained up in a lot of situations. For example,
23    it is quite common to have a chamfer followed by a fillet.</listitem>
24    <listitem override="disc">Hide the CPML APIs accessible from the CpmlPrimitive interface: use
25    a private struct of function pointers to delegate the job to the
26    different primitives.</listitem>
27    <listitem>Check if the decentralization of the quote is applicable to the
28    angular dimensions too and if it is worth the effort.</listitem>
29    <listitem>The ARROW and TRIANGLE markers should follow the director path that
30    could be a curve. Use the METAPOST solution suggested by John Hobby
31    in its METAPOST manual, that is given <parameter>angle</parameter> and <parameter>size</parameter>, rotate the
32    path by half <parameter>angle</parameter> in both directions, cut it with a circle centered
33    at the end of the director path with radius <parameter>size</parameter> and close the
34    resulting path (eventually filling it).</listitem>
35    <listitem>Investigate the use of <ulink url="http://www.gnome-db.org">libgda</ulink> as a sample
36    data provider and check if it is worth to add custom methods to
37    AdgModel to improve the interoperatibility between adg and libgda.</listitem>
38    <listitem override="disc">Implement AdgText, a generic text management, using pango.</listitem>
39    <listitem>Add a specialized GTK+ widget that allows the customization of the
40    rendering process. This should be a tree widget that provides
41    hierarchical access to AdgStyle and derived <emphasis>instances</emphasis> by
42    inspecting an AdgCanvas object, in a way similar to what
43    <ulink url="http://glade.gnome.org">glade</ulink> does with a GtkWindow. Add this
44    widget to a new tab in the edit dialog of adg-demo to expose and
45    test this new feature.</listitem>
46    <listitem>Add self-intersection API for CPML segments.</listitem>
47    <listitem>Add datum support: for implementation ideas checkout this
48    <ulink url="http://nvlpubs.nist.gov/nistpubs/jres/104/4/html/j44mac.htm">draft</ulink>.</listitem>
49    <listitem>The cairo library does not handle arcs natively. Actually the CPML
50    library is able to transparently convert them to Bézier curves
51    when needed. Add more logic to do the same in the reverse side,
52    that is to automatically convert curves to arcs when a curve is
53    close enough to an arc approximation. This will bring in a new
54    information that can be used in some operation, such as getting
55    the value to put in the quote of a radial dimension or offsetting
56    a curved segment in a precise way.</listitem>
57    <listitem>Improve Bézier offset approximation algorithm, possibly enabling
58    the feature of splitting the offset curve in more than one Bézier
59    arc when the error is not acceptable.</listitem>
60 </itemizedlist>
62 </simplesect>
64 <simplesect id="TODO.1.0.0">
65 <title>Road to adg-1.0.0</title>
67 <para>The commits in the 0.7 branch should be atomics, that is a succesfull
68 built will be added as a prerequisite for each commit, so bisecting
69 with "git bisect" is usable. The API should be considered almost
70 frozen, new additions are still accepted tough. This is a testing
71 branch: the target is to reach a sufficient quality level to make
72 a 1.0.0 release.</para>
74 <para>These releases should reach the wider audience, according to a niche
75 project such as the ADG canvas. This means to build releases also
76 for different platforms, such as *BSD, OpenSolaris and Windows.</para>
78 <itemizedlist mark="circle">
79    <listitem>A binary action after a close-path primitive leaves the shape opened:
80    closing and filleting results in a non-closed original shape.</listitem>
81    <listitem>Add internationalization support to the installer: this includes also
82    the possibility to select the installation of language packs.</listitem>
83    <listitem>Improve the current internationalization support of the ADG: merge
84    po-properties/ into po/ and get rid of glib-gettext. Check the gleak
85    project for suggestions.</listitem>
86    <listitem override="disc">Provide a complete set of bindings based on GObject introspection and
87    develop a full-fledged adg-demo application with those bindings that
88    does the same job of adg-demo.c, in the same way.</listitem>
89    <listitem>Provide a persistent layer based on GSettings to keep track the data
90    entered in the last adg-demo session.</listitem>
91 </itemizedlist>
93 </simplesect>
95 <simplesect id="TODO.0.7.0">
96 <title>Road to adg-0.7.0</title>
98 <para>The target of the 0.6 branch is to clean up the code and stabilize the
99 API: the 0.7.0 release will probably be a beta release.</para>
101 <itemizedlist mark="disc">
102    <listitem>Add autoscaling to AdgCanvas. In other words, there must be a way
103    to select a specific scale from a finite set of predefined factors
104    depending on the current extents of the canvas.</listitem>
105    <listitem>Actually AdgLineStyle can change color, width, cap, join, miter
106    limit and antialiasing of a line. The only thing remaining is
107    the possibility to customize the dashing of a dashed line.</listitem>
108    <listitem>Provide a Windows installer (32 and 64 platforms) for the demo
109    program to show what can be accomplished with the ADG canvas.</listitem>
110    <listitem>Provide a document with API guidelines take it as the holy bible!
111    All the APIs must comply with the rules of this document.</listitem>
112    <listitem>Try to cross compile and build a windows binary package. Check out
113    <ulink url="http://ricardo.ecn.wfu.edu/~cottrell/cross-gtk/">Allin suggestions</ulink>
114    for hints.</listitem>
115    <listitem>Add printing support with page setup based on GtkPrintOperation provided
116    by GTK+ 2.10 (hence, always available if GTK+ support is enable).</listitem>
117    <listitem>Uncomplete entities should fail gracefully instead of complaining for
118    insufficient data. For example, a linear dimension without the
119    needed pairs should simply not be rendered without warnings.
120    This provides an easy way to implement optional machinings.</listitem>
121    <listitem>Expose conventions used by ADG APIs: this is mainly needed to make clear
122    getters must be considered read-only, also when returning non-const
123    values (because object referencing is always allowed).</listitem>
124    <listitem>Add italian localization.</listitem>
125    <listitem>Implement AdgGtkLayout, a new GTK+ widget that adds scrolling
126    capabilities to AdgGtkArea.</listitem>
127    <listitem>Add a new tab to the edit dialog of adg-demo to change the content
128    of the title block with custom labels.</listitem>
129    <listitem>Implement a decent "make check" target, basing the check programs on
130    the test framework of glib. Make this an optional feature, as this
131    framework is based on the too young glib-2.16.0.</listitem>
132    <listitem>Resolve the TODOs in the adg/ directory: the only missing logic
133    should come from the CPML library (and there the TODO items are
134    bound to the less common use cases).</listitem>
135    <listitem>Add support for GTK+3, possibly adding an optional check at configure
136    time and trying to keep the same codebase.</listitem>
137    <listitem>Enhance the AdgRDim class by adding an alternative rendering when the
138    "outside" property is enabled.</listitem>
139    <listitem>Create a separate project called adg-lua to host the lua bindings for
140    the ADG project. Provide a demo similar to adg-demo in lua.</listitem>
141 </itemizedlist>
143 </simplesect>
145 <simplesect id="TODO.0.6.0">
146 <title>Road to adg-0.6.0</title>
148 <para>The target of the 0.5 branch is to provide a usable canvas: with usable
149 it is meant a canvas that can generate fairly completed drawings. The
150 0.5.x releases leading up to 0.6.0 should add all the missing features
151 needed to generate this drawing.</para>
153 <itemizedlist mark="disc">
154    <listitem>Implement adg_matrix_normalize() to get rid of the scaling component
155    of a matrix: consider the point (0,0) and (1,1) on the identity matrix
156    and force on the matrix to normalize a distance of 1.4142... between
157    the same points by modifying only the xx and yy components.</listitem>
158    <listitem>Move the custom get_local_matrix() inside AdgEntity and implement a
159    common way to manage local matrix - entity interaction: for instance,
160    if the model is rotated an AdgToyText should rotate accordling but not
161    scale (usually, at least if it is not a text written on the model).</listitem>
162    <listitem>Implement AdgMarker as an abstract entity: it will be the base class
163    for arrows, ticks, squares, dots and so on.</listitem>
164    <listitem>Implement AdgArrow as AdgMarker derived entity.</listitem>
165    <listitem>Implement AdgArrowStyle directly inside the AdgDimStyle class and
166    provides a way to customize the markers.</listitem>
167    <listitem>Rework the style approach by detaching the slot and type concepts:
168    rename slot to dress and let the door opened to future expansion by
169    breaking the one style = one dress equation.</listitem>
170    <listitem>Rewrite AdgLDim to use the new marker APIs instead of hardcoding the
171    arrows and calling the deprecated rendering callbacks.</listitem>
172    <listitem>Implement the extents infrastructure that computes the bounding box
173    of the entities without rendering them.</listitem>
174    <listitem>Implement the outside arrows in AdgLDim.</listitem>
175    <listitem>Add AdgADim, the angular dimension.</listitem>
176    <listitem>Implement AdgEdges, a model that computes the edges of an AdgTrail
177    model and build a CpmlPath containing all the vertical edges.</listitem>
178    <listitem>Add AdgRDim, the radial dimension.</listitem>
179    <listitem>Rework styles by using GObject and properties.</listitem>
180    <listitem>Implement an abstract AdgFillStyle, abstracting the cairo_pattern_t
181    APIs and providing a way to customize filling, similar to what
182    AdgLineStyle does for stroking.</listitem>
183    <listitem>Add AdgRuledFill, an AdgFillStyle implementation that allows to fill
184    with a serie of parallel lines with customizable angle and distance.</listitem>
185    <listitem>Add AdgHatch, an entity very similar to AdgStroke but that uses
186    cairo_fill() instead of cairo_stroke().</listitem>
187    <listitem>Implement the extents also for the path so the AdgHatch entity can work
188    reliable: check if it is better to add new code in CPML or to directly
189    use the functions provided by cairo. (Implemented in CPML as the arc
190    primitive is not native in cairo and it is the only one with some quirks
191    in the extents computation)</listitem>
192    <listitem>Add labeling feature to the models and let AdgDim and children points
193    be expressed as references to those labeled points instead of using
194    explicit coordinates.</listitem>
195    <listitem>Add AdgTable, a container for AdgToyText in a framed environment.</listitem>
196    <listitem>Add AdgTitleBlock, a complex entity in global space used to frame the
197    sheet and show the general drawing data (title, scale, date and so on).</listitem>
198    <listitem>The dressing feature needs more attention: they are still not well
199    polished and always using the "dress" property will likely give name
200    conflicts: a basic mangling is required.</listitem>
201    <listitem>Allow the linear dimension to be decentralized by using the pos point
202    as reference and using a dedicated enum instead of a three-state.</listitem>
203    <listitem>Sanitize the ADG APIs: the public functions must cope with invalid
204    arguments without segmentation faults (without crossing the limits of
205    the C language and of the common sense).</listitem>
206    <listitem>Provide a decent demo program to show the progress so far, including
207    title block, hatches and various dimensions types: update the website
208    with new (and hopefully more impressive) screenshots.</listitem>
209 </itemizedlist>
211 </simplesect>
213 <simplesect id="TODO.0.5.0">
214 <title>Road to adg-0.5.0</title>
216 <para>The target of the 0.4 branch is to build the base of the canvas:
217 few user visible changes but a quite stable base code. All the
218 main infrastructures should be in place.</para>
220 <itemizedlist mark="disc">
221    <listitem>Develop a basic demo CPML program to visually check the results.</listitem>
222    <listitem>Provide CPML APIs for accessing cairo paths and browse their segments
223    (a contiguous line segment).</listitem>
224    <listitem>Provide CPML APIs for accessing segments and browse their primitives
225    (a single line / curve / close path).</listitem>
226    <listitem>CPML APIs to offset cairo paths: specifically, a decent
227    approximation for single Bézier curves must be implemented.</listitem>
228    <listitem>Implement APIs to get intersection points between different primitives.</listitem>
229    <listitem>Provide an abstract API (cpml_segment_intersection?) to compute the
230    intersection points between two segments. To be evaluated the way to
231    return the results (maybe using an argument to specify the maximum
232    number of intersections to return).</listitem>
233    <listitem>Generate documentation for CPML.</listitem>
234    <listitem>Merge ldim and adg-demo into a single demo program, basing the user
235    interface on GtkBuilder.</listitem>
236    <listitem>Implement AdgModel as a bare empty class. Move the actual stuff in
237    AdgTitleBlock.</listitem>
238    <listitem>Add model-view interaction by providing signal propagation from AdgModel
239    to the dependent entities, so when a data changes the entities will be
240    automatically updated.</listitem>
241    <listitem>Rename AdgPath to AdgStroke, being the latter a stroke representation
242    of a single AdgPath.</listitem>
243    <listitem>Implement AdgPath as an AdgModel derived class of a conceptual path.
244    Any AdgPath instance could be referenced by one or more entities.</listitem>
245    <listitem>Add arcs in CPML to transparently support, whenever possible, the
246    conversion between arcs and Bézier curves.</listitem>
247    <listitem>Add to AdgPath the basic functionality to build a path: basically a
248    bunch of methods emulating the cairo path API but without the need of
249    a yet instantiated cairo context.</listitem>
250    <listitem>Add support for the CPML arc feature in AdgPath.</listitem>
251    <listitem>Update the demo using the newly implemented AdgPath to deeply test the
252    model/entity interaction.</listitem>
253    <listitem>Add a chamfer operation to AdgPath.</listitem>
254    <listitem>Add a fillet operation to AdgPath.</listitem>
255    <listitem>Change the matrix entity API, using a cleaner approach.</listitem>
256    <listitem>Move AdgTranslatable and AdgRotable directly inside AdgEntity.</listitem>
257    <listitem>Ensure there are no bitfield flags, as they are not binding friendly.</listitem>
258    <listitem>Change building scripts to get the GTK+ dependency optional.</listitem>
259    <listitem>Add AdgGtkArea, a GtkDrawingArea that can accept an AdgCanvas.</listitem>
260    <listitem>Optimize the implemented entities applying the 0.4 ADG infractrusture
261    and enable caching where applicable.</listitem>
262    <listitem>Use AdgToyText to draw dimenstion quote where applicable.</listitem>
263    <listitem>Add a "beyond" property to AdgDimStyle to be used when extending the
264    baseline beyond the extension lines. If not specified, it must default
265    to 3 x arrow size.</listitem>
266    <listitem>Add a three-state enum to adg-enums.h: ADG_THREE_STATE_OFF,
267    ADG_THREE_STATE_ON and ADG_THREE_STATE_UNKNOWN.</listitem>
268    <listitem>Add the three-state "outside" property to allow forcing an outside quote.
269    In the default state, the outside must be decided by the space between
270    the extension lines: if greather than 3 x arrow size => inside arrows.</listitem>
271 </itemizedlist>
273 </simplesect>
275 <simplesect id="TODO.0.4.0">
276 <title>Road to adg-0.4.0</title>
278 <para>The target for the 0.3 branch is to give a shape to the project: build
279 system, docs and a bunch of (probably temporary) basic classes should
280 be enough to give a direction.</para>
282 <itemizedlist mark="disc">
283    <listitem>Split mathematic stuff in its own library. It will be called CPML,
284    that is Cairo Path Manipulation Library.</listitem>
285    <listitem>Avoid wrapping of cairo APIs in AdgPath.</listitem>
286    <listitem>Implement AdgToyText, a basic text entity using the cairo "toy" text API.</listitem>
287    <listitem>Implement AdgTranslatable, a shared interface for entities that
288    can be translated.</listitem>
289    <listitem>Implement AdgRotable, a shared interface for entities that can be rotated.</listitem>
290 </itemizedlist>
292 </simplesect>
294 </chapter>