-
Notifications
You must be signed in to change notification settings - Fork 1
/
TODO
96 lines (70 loc) · 3.53 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
* Complete convertion to Data.Accessor
* Convert to use image combinators
* Use Data-Accessor-Template to avoid the repetative data accessors
* Draw Info to be moved out to the Widget function itself, not in the record
* Consider removing the accessor arg and using adapter always
This means child containers have to be parameterized on the child
rather than on the generic model, so Grid is not Widget model
but Widget (Mutable, Map Cursor childModel)?
Then, you can adapt the real model to that tuple.
This is probably less convenient than what I have now
* Scrollable
* Add the with delegated stuff all the widgets have here
* Rename Mutable -> Model
* Macros:
* Need to create a "multi-widget" that gets multiple accessors, one widget and
multiple viewers, and applies the widget modifications to all the accessors.
* Multi-widget can be used instead of macros.
* Maybe event handlers should give a model->(Maybe|Either) model
rather than model so that you can re-apply their handlers? Or can
the accessor writes capture the changes so they can later apply
retro-actively to other place?
* Abstract away SDL keyboard keys, events, flip and delay
* Implement a GLUT-based version first, to see what needs to be
shared and how
* Basically copy big parts of the SDL wrapper and convert to it
* Animations:
* Image -> Animation?
* Animation can be a function from time and reverse list of
previous models to Image?
* Can use ID's on all drawings, and have it animate stuff moving around
* Conal says ID's aren't composable
* What's the semantic model of Widget if animations are involved?
Questions:
* How do I get the cropping to prevent the stuff underneath from
running at all, to allow massively deep image hierarchies?
* Perhaps replace Rect and (Vector2 Int) with more general types?
* How can I create infinite-in-one-axis clip rects?
* Data.Binary instances?
* Widgets:
* Grid with delete row/column, Box with delete item?
* add FontMap = Map String Font to allow purely functional handling of fonts?
* Is the "Clipboard" a good idea?
* Maybe have a "Clipring" instead?
* Clipring is a list of N items, and showing it shows one line per item
with the "summary" of each.
* When whole content fits in line it is shown, otherwise, it is
"summarized". Each model needs to be associated with ......
* Bottom line of the screen can show summary of top clipring item
* Clipring accessible with some key, animating all the contents up,
allowing to move item to the top
* What do widget actions do, besides updating the model?
1. Read and write from the clipboard (Clipboard monad?)
-- Nope, probably "edit" the clipboard as part of the model,
allowing local clipboards/et al.
2. Do I have "buttons"?
-- Undo/Redo can really just control the model's current reivision
ptr (think of a widget hierarchy editing a git repo), instead
of actually doing stuff.
-- Network/irreversible operations really do need such signals,
can model these as:
1. An extra type parameter for widgets, and something that
they can output in addition to a new model.
2. As a "queue" of things to do, which gets added to.
* Can I create a generic newDelegate method in FocusDelegator instead
of copying it into each widget? Its probably possible by using ugly
accessors/adapters, but less important at the moment.
* Where to put:
import Debug.Trace(trace)
traceId :: Show a => String -> a -> a
traceId prefix x = trace (prefix ++ show x) x