Exit Full View

Glok / todo.txt

Current
=======

Next
====

Soon
====

Code review

    WindowDecoration doesn't allow resizable stages to be resized. See DemoPromptDialog

StageBase.onMouseEnterExit not implemented.

DemoMixedTreeView

Documentation only interfaces
    Demos
    Node.visible
    Listener : InvalidationListener vs ChangeListener.
    Style : Including when pseudo style is preferable.

Version 0.5

Theme should allow setting of one aspect of a compounded style.
    e.g. background-color (changes the color, but keeps the same Background class)
        Using ColoredBackground.withColor(color) : ColoredBackground
    e.g. font-size, font-style, font-family

Bugs
====

Nodes not receiving mouse exit events when another stage gains focus.
    Very obvious in Blokart (Ctrl+W), due to DiagramView having a different mouse pointer.

Either (Mixed)TreeView is buggy, or Vectorial's DebugDock is!
    Refreshing part of the tree places flattenedItems in the wrong place.

Spinners don't look different when they are "invalid".

Hue slider on CustomColorPicker is using the color to change from a white/black bar.
    It *should* be using the lightness of the pure hue, not the color itself.
    It would be better if the bar was replaced by arrows on either side, as this would look better, and side-step the problem.

DemoFindReplace. Using the Edit menu doesn't focus correctly.
    Probably a bug due to the Popup Stage still existing while focus is requested.

Cannot navigate a PopupMenu using the keyboard.

The "Save" dialog made the app freeze. (Intermittent - only rarely seen).
    I've written my own File dialog to replace the native wrapper, as it can't be trusted.

Transformation Nodes have no mechanism to translate between scene and local coordinates
    PopupMenu.show( nearNode )

    Node has an optional transformation matrix property, which is usually null.
    claimChildren and childrenListener both maintain that property from parent to child.
    Transformation Node explicitly sets it as the multiplication of the two (or just `matrix` when its transformation is null).
    sceneToLocal or localToScene can then either do the "simple" thing, when transform==null, otherwise use the transform.
    We would also need an inverse matrix to go the other way.

    We could go one step further, and do away with the Transformation and Rotation nodes,
        and have an extra pair of matrices, which are the local transformations.
    This would be nice, because then there's no need to "bodges" for styling e.g. a rotate button in a toolbar.
    However, this wouldn't help with calcPref/Min/Max Height/Width
    So perhaps this is a bad idea.

    So that `Transformation` node doesn't ever screw up Theme rules, perhaps include a special case...
        e.g. child(String) check if the child is a Transformation, and if so, applies the rule to the grandchild instead.

SingleSelection selectedIndexProperty and selectedValueProperty do not change atomically,
    Allow subclasses of a SimpleProperty could be allowed to delay firing changes.
        change the value (remembering the old)
        change the other value (remembering the old)
        fire changes to both.
    override setValue( newValue : T ) {
        delayFire( newValue ) {
            otherProperty.value = ...
        } // delayFire will inform the listeners here.
    }
There are probably more properties like SingleSelection.selectedIndex and selectedItem which
_should_ be updated atomically, but aren't.

textField isn't vertically centering the text when the TextArea is allocated more than prefHeight.
    First seen in Vector2ExpressionView of Vectorial.

SplitPane does not respect min width/height of its items.

Focus
    Buttons and "Fields" have the same "amount" of focus, but generally, if you click a button,
        it shouldn't be highlighted as "focused".
        Only show a button as "Focused" when navigating using Tab.
    Cannot group parts of a scene into "FocusGroup"s, so that Tab will cycle through that group only.
        Another shortcut (F6 / Shift-F6) to jump between FocusGroups.
        Show a border around the group when "jumping"???
    FocusEvent(direction) Bubbled to the current focused node.
        If nothing consumes it, then the "regular" next in graph is used.

Theme
    If an application tries to merge themes, then the "last rule wins" system means that
        changing a "normal" state will also override the focused/armed/hover state.

Changes For MPP
===============

Application.launch should spawn a new Thread in the JVM, and use setTimeout for the loop in JS.

These changes need reviewing.

CopyOnWriteList
    HistoryDocument.listeners, RegularStage.overlays, CompoundEventHandler.handlers, PropertyBase.bidirectionalBinds
    Application.mutableStages, listeners (lists, observables, sets)...

WeakReference replaced by Weak, which in the JS implementation is a STRONG reference!

PropertyDelegate - Commented out test for if the property exists.
    Some work has been put in place, but it isn't finished. It lists all properties,
        but does nothing with them yet.
    Create a Kotlin function, and call it for each element in the Objects.values() list.

hashCode
    Some quick and dirty replacements for Objects.hash(...)

Soon
====

Should History be in core?
    Applications may use it in their model, which needs no GUI dependency.
    Other utils???
        Arguments
        Color, Orientation, Side
        Log
        Matrix
        FixedFormat

Add an Anatomy section to comments of each control.

A Switch control (not sure on the name)
    Move from left to right, turns green to indicate "on".
    Same API as a toggle button or checkbox (not tri-state).

Consider adding a margin to Region.
    Margins are outside the padding, and nothing is drawn there.
    Hopefully minimal changes :
        Change drawing of border and background to take margin into account.
        Change surroundLeft etc

Create a demo game using a game-like theme

Prepared bitmap fonts.
    Include a utility which lets you choose a font, size, style.
        A TextArea of the characters to be included, which defaults to ASCII or Latin 1
        You can then delete those that you don't want, and paste in others that you do.
        Sanity check for letters/digits.
    Render it to a texture. Save it, along with the metadata.
        Maybe as a zip file.
    This will help when glok is multi-platform.

Ruler to have an arrow, which can be used to follow the mouse position.

Menus should open when Alt+<Key> where Key is underlined part of the Menu text
    Note. underlining isn't supported yet!
    Should a MenuBar register itself with its stage/scene.
    A second MenuBar *could* be ignored (as in practice, there is only ever one MenuBar).

Spinners should have a ratioProperty??? Maybe as read-only? Using a Function, or a conversion and bidirectional bind.

Sliders
    do not have divisions.
        A property for a SliderDivision interface?

Consider VisualTestShrink generate test scripts.
    Set options for box alignment, grow priorities etc.
    Visually inspect the result, then generate a test function containing the actual positions of all the nodes.

ProgressBar
    Maybe a special ProgressBackground : Background???
    Or just use two backgrounds, can use RoundedBackground, with 1 edge straight.

Later
=====

Mobile-style controls

Consider allowing nodes to have a "theme" property.
    It *ADDS* a (tiny) theme to that node (and its descendants)
    Could be implemented using Node.id as the base-selector for all the following rules.

Run it on Wayland.
    Windows cannot be moved according to the LWJGL API docs.
    So we need to position the window BEFORE showing it???

I18N
    CustomColorPicker Swatch labels "New" and "Current".
    CustomColorPickerDialog has "Select"
    PaletteColorPickerDialog "Custom Color"
    ButtonType
    ChoiceBox "<None>"
    ButtonType.text
    Side.text (for Dock's menu)
    NodeInspector - various tooltips
    AlertDialog???
    TextArea/TextField menu items.

Underlined text

Vector based fonts
    Large fonts using bitmaps are quite wasteful - especially if they change size!
    Copy/paste font parsing code from Korge?
    Cache meshes at various sizes??? e.g. 1 mesh for < 20 another for 20..50, 50...
    NOTE, without multi-sampling, these would be pixelated.
Or, for large font sizes, scale them from a single BitmapFont.


Animations
    e.g. border color fades in/out when a toolbar button is hovered over (mimic Inkscape's theme).
    These could be implemented by binding to properties with a function involving time.

OutlinedFont
    And other effects. e.g. drop shadow.
    NOTE. widthOf() would need to not include the extra space for the outline.
        But the Labelled padding / textPadding should take care of that.
    Don't allow this feature on TextArea, because selection would be tricky (it uses multiple font draws).
    Prepare them from BitmapFont by drawing the same glyph multiple times in a solid circle.

ElevenPatch : Like a NinePatch, but with an extra "detail" at the top (or other side)???
    Will be used as the background/border of popups from PopupButton.
    Here the top edge is made up of corner,pre,detail,post,corner
    Instead of just corner, top, corner (i.e. 2 more patches)
 _____/\_____
/            \
|            |
|            |
\____________/

requestRestyle
    Scene remembers which node requires re-styling
        At the next frame, it applies rules to that node and its descendants
    If there's already a node which has changed, then it remembers the common ancestor.

Performance
===========

Invalidation listeners *could* fire less often.
    Currently, they fire whenever the ObservableValue is changed, but they *could* skip
        if the value hasn't been validated (read) since the last time they were invalidated.
    I also think property functions are also re-evaluated immediately, even when there are no ChangeListeners.