Exit Full View

Fizzy / todo.txt

To Do
=====

Current Work
------------

Search for Units.mm used in constructor for Dimension. Shouldn't do that should it?

BUGS
----

ShapeProperties causing problems while dragging??

RoundedCorner.isAlong probably doesn't handle line thickness / min distance correctly in scaled objects.
    Ditto for bezier curves and arcTo?

Editing geometry doesn't work well (try changing the capacitor symbol!)

Undo changing a linked expression doesn't work???

PropCalculation.isConstant doesn't always return false. Should it?

Soon
----

Replace the language parser with one based on Antlr.
    It can then be much more expressive in the future.

Show shapesheet help in GUI using WebView by converting the md to html (with a side pane!)

Use FXEssentials instead of current ApplicationActions.

To make dockable package have no fizzy dependencies :
    Helper.addOnce
    ApplicationActions in Dockable

Allow an expression to revert back to being linked to it's master shape.

SVGExport doesn't support text clipping.

A GUI to choose line markings and dashes.

Refactor DrawContext, so that it has no CornerRadius
    Instead, have a super-set interface which includes "effects", one of which is corner radius.
    Later, the same mechanism will be used to implement other effects, such as drop shadow.

In JsonToDocument, when all shapes have been loaded,
    iterate over all expressions, and if they are in error, force a re-evaluation.
        Could keep a list of expressions while loading, rather than re-iterating over meta data???
    To test this comment out isLoaded from Geometry.resetParts().

Define an eliptical arc using the same info as svg :
    start,end, radiusx, radiusy, rotation, largeArc:Boolean positiveSweep:Boolean

    https://www.w3.org/TR/SVG11/paths.html#InterfaceSVGPathElement

Add a caret to the EditTextTool

Replace "Lock" properties with LOCK( ) around the expressions???

Show scroll bars
    Their extent should be the page size, but extended when scrolling further by dragging.

Improve CellType? Use it where Class<*> is currently used, such as PropExpression?
    Smoother transistions when using unknown types (don't have to cast through Any)??? 

Change the way that LocalMasters are used.
    NEVER create a local master when using a master shape from the same document.
        Redo kitchen doors when this is implemented, so that all doors use the same master.
    When using a master shape for the first time, do NOT create a local copy of it.
    When saving the document, also save any shapes that it depends on in the "localMasters" section.
        (Irrespective of where they are defined - in localMaster or in a stencil).
    When loading, at first do what we currently do. i.e. add to local masters.
        However, for each shape in the loading local masters, look for a shape in the stencils, and if found,
        allow the option to link back to that shape.
Allow creation of local masters manually (if not alreay possible).
    
New Features
------------

Replace the default fontFactory with one that uses awt fonts?
    Or at the very least introduce create such a thing that *could* be mde the default.

When copying a stencil, if the stencil's page has custom properties, copy them (unless that name already exists).
    Is it possible to find only those custom property expressions that the master shape depends upon.
    Add them all. Remember their prop listener counts. Evaluate all cells in the copied shape.
        Delete any added document custom properties which haven't increased in prop listener counts!

Consider replacing many PropVariables with PropExpressions, such as CustomProperties and Name. Maybe no others!!!
    The GUI can still show, and edit the values as if they were constants
    JsonToDocument wouldn't need the special "context" var.

Layers
    Each layer has a Name (which is used as a key), and a Label, which is used in the GUI.
    Layers can have other attributes, other than visibility. e.g. opacity (to dim layers)

Cannot ADD extra children to a master shape, and have them appear in all shapes that use the master.
    Listen to the master's children list. When items are added, copy (link) into the linked shaped too.  
        If a child shape is added/deleted from the copy, then stop syncing  
    How about new ControlPoints and other sections?
        If an item is added/delete from the copy, then stop syncing
        Create a special FListListener, and either remove it, or stop functioning when added/deleted from the copy.
        If it isn't reversible, then History must be truncated.

Add "effects", such as blurring.
    https://docs.oracle.com/javafx/2/visual_effects/blur.htm
    Add an "visual effect" cell, of Type VisualEffect, and introduce new constructor functions
        BoxBlue MotionBlur etc.
    Elegant solution to ADDING a background effect, and also APPLYING it to the existing stroke/fill?
    Maybe three of them (fillEffect, strokeEffect, backgroundEffect), and add a backgroundColor.

Maybe
-----

Add a limit to the number of items in History.
   Each batch can be assigned a number, so memory hungry operations will cause History to dimish quicker.

Can we create a single Shape, which is an N sided regular polygon? (or star).
    May also use the same system to create lines with N intermediate points.
    Could use a special context to hold "N" for each iteration.
        Note, we'd often want the first geometry to be fixed, and the subsequent one to be iterated.
        But it would be nice to have any number of prefix and suffix items, and also any number of repeated items (usually just 1).
        Maybe a GeometryPart can be an IteratedPart, which references ANOTHER geometry section, plus an N.
           But we'd stil want N control points too (or 2N).
    Or have a "templates", where N is substituted e.g. "360deg / $N"
        This has less impact on the rest of the system.
    Or, just have an upper limit, and a custom property N, and a boolean on GeometryPart isVisible e.g. N > 3
        Consider isMenu for Double CustomProperties too, in which case, have a slider in the menu??? (from min to max)


Later
-----

When showing custom properties, also show child shapes.
    If 2 or more children have the same set of custom property names then arrange these as a table/grid.

Expression syntax : Try( a, b ) similar to if, but using try catch.
    Then maybe Connection.shape should throw if not connected etc.

Geometry to have OddEvenFillRule : BooleanExpression
    Respect this when drawing as well as Shape.isAt

Add another wrapper around DrawContext which can handle multi-line strokes.
    i.e. each stroke can be composed of multiple strokes, such as double, or tripple lines tram lines.
    Each can have their own thickness.
        Probably won't work well with dashed lines, as the two sets of lines will get out of sync.

Problems
--------

How are 2 shapes combined into one?
    Maybe the size is forced to a new constant, and each geometry item is recreated, so that the values stay the same, but the calculation is based on the new size.


Much Later
----------

Add a Groovy based REPL to manipulate the data structures programmatically.

Split the project into core and app, so that headless tools can manipulate Fizzy documents.
Create a separate project for useful tools, such as batch converting to SVG.
    Use paratask to parse the commands.

Create "stick figures", and animate them using Groovy.


Useful Documents
----------------

Understanding Shape Sheets : https://msdn.microsoft.com/en-us/library/office/gg144579(v=office.14).aspx
Japanese video using shape sheets : https://www.youtube.com/watch?v=9Kyv48e22LQ
Shows shape sheet screen shots : https://stackoverflow.com/questions/28877699/new-created-custom-list-shape-doesnt-work-in-microsoft-visio-2013-x64?rq=1


Musings
-------

Styles:
Each shape has a set of classes (space sep list). e.g. "box flow:if" (For a flowchart's if box).
Document has a style object.
Each stylable attribute has themeLineWidth(), themeFillColor() etc.
Each Page can have a different style, but defaults to document.style
Styles can be combined. e.g. Chunky and Colorful or Thin and Grey.
In relality, the "default" theme is always the last in the chain.

For thumbnail images, create an example fizzy document which can be shared by many themes.
    Flow charts will have a diagram with a start, process and if boxes.
    Floor plan scenes will have a small example room.

Example theme :

example: Flow.fizzy
depends: Default.fizzytheme

.ANY
    lineWidth: 1pt
    strokColor: TRANSPARENT
    fillColor: TRANSPARENT
    
    
.box
    fillColor: TRANSPARENT

.line
    lineWidth: 1pt
    strokeColor: BLACK
    fillColor: WHITE

.flow:if
    strokeColor: RGB(1,1,0.5)