todo.txt 12.8 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Event settings for edit mode
----------------------------

1) No box - normal editmode behavior
   * moving/selecting
   * setting a bounding rect
   * mouse cannot select text
   * text is not editable
   * clicking a box triggers #2 below
2) Editing a box in place
  * x/y is set
   * can type inside box
   * can select text with the mouse
   * mouse motion doesn't change box position
   * applies to all boxes which already exist and are being edited
3) Editing a new box before it's anchored
   * x/y follows mouse
   * can type new text into the box
   * a click in the box will anchor the box and trigger #2 above

*need to be able to tell the difference between new obj and retexted
obj

Jonathan Wilkes's avatar
Jonathan Wilkes committed
24
25
26
27
HTML5 which may not be standard yet:
1) mouse.pageX/pageY -- exist in Chromium but maybe not in FF et al.
2) svg 'overflow' attribute -- probably doesn't work in other browsers
3) document.body.scrollTop (might be Chromium-specific, not sure)
28
29
30
31
32
33
4) document.body.scrollLeft (might be Chromium-specific, not sure)

Problems to put off until all (or most) sys_vgui calls are eliminated:
[x] gui-side parser inside -- pdgui.js
[ ] Semicolons -- currently the parser can't tell the difference between
    semicolons inside symbols and semicolons that end statements. Again,
Jonathan Wilkes's avatar
Jonathan Wilkes committed
34
    this will be easy to solve once we eliminate naked sys_gui altogether
Jonathan Wilkes's avatar
Jonathan Wilkes committed
35
36
37
38
39
40
41
42

Node-webkit stuff:
1) popup API
2) new window API
3) window menus
4) (probably) present working directory
5) command line argv

43
Everything else: (A [x] means we've fixed it)
user's avatar
user committed
44
45
[ ] packaging as app, setting correct appname, etc
[ ] get -unique to work (relied on tcl [send] command)
46
[ ] check if patch windows with screenposition (0,0) get stuck underneath
Jonathan Wilkes's avatar
Jonathan Wilkes committed
47
48
49
    OSX menu.
[x] check if patch windows with screenposition (0,0) get stuck underneath
    Ubuntu menu.
50
51
52
[x] choosing the same directory multiple times doesn't work
    (see dialog API page)
[x] "Save As" on an overwrite doesn't seem to clear the dirty flag
Jonathan Wilkes's avatar
Jonathan Wilkes committed
53
[x] figure out why there is a "pd_opendir" global var
user's avatar
user committed
54
[ ] pass k12 mode arg
55
56
[ ] implement recent files (using Pd's prefs loading mechanism instead of
    reimplementing gui prefs)
Jonathan Wilkes's avatar
Jonathan Wilkes committed
57
[x] implement verifyquit
user's avatar
user committed
58
[ ] save and saveas dialogs aren't defaulting to the present working directory
59
60
[x] implement automatic scrollbars and svg canvas resizing
[x] add 'x' type to gui_vmess for saving canvas names, etc., as hex values
user's avatar
user committed
61
[x] destroy (or, more likely, hide) selection rectangle when not needed
Jonathan Wilkes's avatar
Jonathan Wilkes committed
62
[x] change gui_text_select to gui_gobj_select
63
64
65
[ ] make it possible to have the inner cells of hradio change color with the
    selection, as the border currently does.  Tk just uses the non-hierarchical
    tags and appends the word "BASE".  (Maybe use an inner <g> to do this.)
user's avatar
user committed
66
67
[x] make mycnv use its own selection logic
[ ] abstract away appendChild
Jonathan Wilkes's avatar
Jonathan Wilkes committed
68
69
70
71
72
73
[ ] font-size should be set as css property for a class of text, rather than
    per each gobj in svg
[ ] remove the "fudge_factor" kludge in g_rtext.c, and handle fonts in a sane
    manner.  In doing so we must decide whether or not we want to be able to
    fetch the bounding box of objects from within a Pd patch.
    (Currently [canvasinfo] and [objectinfo] are the only objects that can
user's avatar
user committed
74
75
    do this, though there might also be)
[x] replace things like gui_select_color with css
Jonathan Wilkes's avatar
Jonathan Wilkes committed
76
77
78
79
80
81
82
83
[ ] find a better approach to escaping characters for the gui than
    escape_double_quotes kludge (and handle any other problematic chars)
[x] look into using <def> and <use> for scalars. (Looked into it-- doesn't
    seem necessary or helpful...)
[x] in draw_vis, make circle and ellipse radii attr floats instead of ints
[x] should stroke-dasharray values be floats? (Yes.)
[ ] once garrays are drawn inside a <g> we won't have to individually erase
    each child of a scalar
Jonathan Wilkes's avatar
Jonathan Wilkes committed
84
85
[x] clean up svg_sendupdate -- put a single gui_vmess at the end (not necessary for now)
[x] svg_sendupdate -- make sure there aren't arbitrary %d's that should actually be %g's
Jonathan Wilkes's avatar
Jonathan Wilkes committed
86
87
88
[x] svg_sendupdate -- need a gui interface for stuff like stroke-dasharray
    (and garrays)
[x] ibid., for path data, points
user's avatar
user committed
89
[ ] make pdgui function names more consistent
Jonathan Wilkes's avatar
Jonathan Wilkes committed
90
91
92
93
[ ] in draw_vis, move tags to front of function call so they don't have to
    be in an array
[ ] in draw_vis, remove all the coords logic and let svg_togui do that work.
    In svg_new, leverage the "d", "points", etc. methods to do the same.
user's avatar
user committed
94
95
[ ] remove the draw_vis warning/code about needing 2 points to draw
[ ] need to clean up dead windows inside patchwin object (on close)
Jonathan Wilkes's avatar
Jonathan Wilkes committed
96
97
[ ] make gui_menu_close filename less hacky (currently includes patch args in
    the middle) 
user's avatar
user committed
98
99
100
[ ] figure out why -nrt flag causes Pd to bail on the GUI (it wasn't doing this
    on the amd_64 virtual Jessie machine, nor on my 32-bit machine).
[ ] make dialogs with [yes/no] instead of [cancel/ok]
Jonathan Wilkes's avatar
Jonathan Wilkes committed
101
102
[x] make a gui_mess interface for the edge cases that don't require args
    (similar to sys_gui) (not necessary)
user's avatar
user committed
103
104
105
106
[ ] make sure we're breaking down the socket properly from the GUI side on quit
[ ] looks like nwworkingdir isn't working for open/save dialogs atm
[ ] nwworkingdir only works on the second file open
[ ] implement the stuff at the end of saveas_callback (recentfiles et al)
Jonathan Wilkes's avatar
Jonathan Wilkes committed
107
108
109
110
[ ] make an "export" menu command for max patch saving.  That way we can accept
    a single extension for saving (.pd), and the native save dialog will warn
    us on potential file overwrites (even when the user neglects to type an
    extension).
user's avatar
user committed
111
112
113
[ ] draw graph inside gobj group
[ ] merge gui_text_select and gui_text_deselect
[ ] in function gui_cord_inspector_update, use parameter "moved" to flash text
Jonathan Wilkes's avatar
Jonathan Wilkes committed
114
115
[ ] cord_inspector_flash doesn't seem to be deterministic-- if you move among
    several cords very fast it will try to flash a non-existent svg item.
Jonathan Wilkes's avatar
Jonathan Wilkes committed
116
    (Probably want to either make a permanent item in the pd_canvas.html for it,
Jonathan Wilkes's avatar
Jonathan Wilkes committed
117
118
    or hard-code a separate div.)
[x] for data structure demos, change "" to 'none'
Jonathan Wilkes's avatar
Jonathan Wilkes committed
119
[x] fix "Reselect" <ctrl-Enter> Keybinding.  It doesn't work atm because nw.js
Jonathan Wilkes's avatar
Jonathan Wilkes committed
120
    cannot bind to Enter. But canvas_events should make this pretty easy.
Jonathan Wilkes's avatar
Jonathan Wilkes committed
121
[ ] fix bug where Reselecting a floating text doesn't stop it from floating
user's avatar
user committed
122
123
124
125
126
127
128
[ ] keyup doesn't register autokeypresses, but keyname and key do
[ ] text_set doesn't work when a numbox is first created (but works otherwise)
[ ] clean up nw_create_window (doesn't need so many parameters)
[x] make a nice window API in C.  Window "foo-bar" type maps to "foo-bar.html"
[ ] implement the crappy iemgui color dialog presets
[x] find a simple translation API
[ ] use underscores for iemgui dialog element names
Jonathan Wilkes's avatar
Jonathan Wilkes committed
129
130
131
[ ] revisit the x_thick logic in g_slider.c.  It thickens the indicator when
    it's in the middle of the slider, but it's pretty obscure in the current
    implementation.
Jonathan Wilkes's avatar
Jonathan Wilkes committed
132
[x] for as many items as possible, hide them instead of removing from DOM
user's avatar
user committed
133
[ ] fix iemgui_font so it doesn't use tcl list syntax
Jonathan Wilkes's avatar
Jonathan Wilkes committed
134
135
[ ] change all the gui color char[MAXPDSTRING] junk to simple int, and do the
    conversion to hex html string in the gui.
user's avatar
user committed
136
137
138
139
140
141
142
[ ] implement iemgui labels and its ascetic font chooser
[ ] think about scaling the svg instead of the page, and making the selection
    rectangle a div above that
[ ] change 'visible-width' to 'cnv-width'
[ ] in dialog_iemgui.html, use an object to store all the prop/value pairs that
    got sent.  That way we don't have to use all those awful tricks to
    conditionally fill the slots
Jonathan Wilkes's avatar
Jonathan Wilkes committed
143
144
[ ] look into the font metrics, see if we can use floating point fonts to
    simplify things
user's avatar
user committed
145
146
147
148
149
150
151
152
[ ] iemgui font configuration -- de-tcl-ize the {fontface fontsize} tcl list,
    then make it work
[x] do msg box click animation in css
[x] tgl 'X' doesn't show up
[ ] gui_graph_fill_border: use css class selectors instead of configuration
[ ] standardize javascript function names
[x] in gui_plot_vis, we have to check for gobj existence.  For some reason, at
    very fast drawing rates we end up with two svg elements if we don't check
Jonathan Wilkes's avatar
Jonathan Wilkes committed
153
154
    for this.  This would be simplified if gop stuff was just children of
    parent <group>
user's avatar
user committed
155
156
157
158
159
160
161
[x] add garray_update for changing the path coords without having to recreate
    the entire scalar edifice
[ ] remove gui_text_select_color (css takes care of this)
[ ] add a canvas message to set a transform on the patchsvg.  Good for:
    * obscure display needs (zooming past the browser limits)
    * rotating for a display
    * transforming or scaling all scalars on a patch at once
Jonathan Wilkes's avatar
Jonathan Wilkes committed
162
163
    However: This will require more math on the mousemotion.
    So this should probably wait until
user's avatar
user committed
164
    moving a lot of the editing code out of C and into the GUI
Jonathan Wilkes's avatar
Jonathan Wilkes committed
165
166
[ ] change 'array_element_fill' to 'element_fill', array_outline to
    'array_element_outline' 
user's avatar
user committed
167
[ ] either nw_create_window should take fewer parameters or it should take an
168
    object with name: value pairs
user's avatar
user committed
169
[ ] getting the sense that glist_isselected should _always_ have
170
    glist_getcanvas(x) as its first parameter
user's avatar
user committed
171
[x] get rid of the old tcl specific sys_get_audio_apis
172
173
[x] have a single function to set t_svg_attr
[ ] t_svg: change x_x1..y2 to simple x_bbox[4], and change current x_bbox to
174
    x_cachebbox (or something like that)
175
[x] figure out why gatom_retext sends a fill color to GUI
176
177
178
179
[ ] look into changing 'x' format specifier from \"x%.6lx\" to more generic
    \"%.6lx\". (Not exactly sure what good the "x" does there.)  It's only
    specified in s_inter and in editor_new, so it should be easy to amend
    if need be.
180
[ ] make "rtext" textarea <div> static, and turn display on/off
Jonathan Wilkes's avatar
Jonathan Wilkes committed
181
[x] what to do about character sets other than utf-8 that come from Pd
182
    side? Example: ISO-8859 from the string posted by hexloader.c
183
184
[ ] for the clipboard shortcut keys inside pd_canvas.html keydown, not sure
    what code should be sent to Pd on keyup...
Jonathan Wilkes's avatar
Jonathan Wilkes committed
185
[x] revis message box after updating the text in the editor. We didn't have
user's avatar
user committed
186
187
188
    to do this with the old API because it updated the box on every keystroke.
    But we're doing an end-run around that entire edifice so we need to
    force it, probably inside text_setto
Jonathan Wilkes's avatar
Jonathan Wilkes committed
189
[x] abstract out multi-line text loop, use for text_new and text_set
user's avatar
user committed
190
191
[ ] think about translating the undo/redo actions as they appear in the menu.
    (Might be tricky to do)
192
[ ] set svg viewBox/width/height to the window size when window gets created
user's avatar
user committed
193
194
195
196
[ ] revisit pdtk_check_scroll_on_motion.  It's not implemented in the port
    yet.  Perhaps there's a better way to do it, without triggering a bunch
    of layouts.
[ ] implement pdtk_canvas_editval and magicglassval
197
[ ] move crispEdges value to CSS
Jonathan Wilkes's avatar
Jonathan Wilkes committed
198
199
[ ] look into problems with object z-order on the C side when deleting objects
    and then undoing the delete
Jonathan Wilkes's avatar
Jonathan Wilkes committed
200
[ ] implement magicglass edit menu indicator
Jonathan Wilkes's avatar
Jonathan Wilkes committed
201
202
203
[ ] clip garray to gl_x1 and gl_x2 by:
    a) checking if we're in a gop, and
    b) if so, only render if element number is > gl_x1 and < gl_x2
204
205
[ ] fix bug where utf_8 snowmen in an object box can cause a buffer overflow
    in the lib loading routine
Jonathan Wilkes's avatar
Jonathan Wilkes committed
206
207
[ ] Fix layout on dialogs so that height/width of the document doesn't
    reflow when the window gets resized
Jonathan Wilkes's avatar
Jonathan Wilkes committed
208
209
[ ] ds-demos unit-circle node throws an "unexpected string" error when
    trying to open it
Jonathan Wilkes's avatar
Jonathan Wilkes committed
210
[x] gui_canvas_getscroll isn't called upon patch load
211
[ ] sprite-game character tears when moving around
Jonathan Wilkes's avatar
Jonathan Wilkes committed
212
[ ] look into using requestAnimationFrame
Jonathan Wilkes's avatar
Jonathan Wilkes committed
213
214
215
216
217
218
[ ] when mapping inside a new nw window, sometimes it stops rendering
    the svg, or the svg becomes corrupted.
    * when you drag the nw window, it will update the svg contents
    * sometimes parts of the window aren't rendered
    * sometimes the rendering is buggy (part of a gobj rect
      appears/disappears mysteriously)
Jonathan Wilkes's avatar
Jonathan Wilkes committed
219
[ ] sometimes straight control cords are pixel-aligned, sometimes they aren't. (If not pixel-aligned, try nudging
220
    one pixel to the right and they become non-aligned.)
221
222
[ ] autopatch creates a new box, but if you try to instantiate the empty box
    you have to click twice to get it to leave text entry mode
Jonathan Wilkes's avatar
Jonathan Wilkes committed
223
[ ] look into pasting only text inside text entry
224
225
[ ] canvas_check_geometry doesn't seem to do the right thing for canvases that are far to the right
    of the screen. Can't think of anything except maybe a bug in nw.js Window.x?
Jonathan Wilkes's avatar
Jonathan Wilkes committed
226
[ ] work on resizing dialog windows to the document content (currently some do, some don't)
Jonathan Wilkes's avatar
Jonathan Wilkes committed
227
[ ] add Mac support by changing evt.ctrlKey to evt.ctrlKey||evt.metaKey
228
229
[ ] when editing message box contents, the background svg image is hardcoded with a border color of blue.
    look into using mask-image in order to make this background color theme-able
Jonathan Wilkes's avatar
Jonathan Wilkes committed
230
[ ] integrate the inlet mouseover animation with a change of fill color
Jonathan Wilkes's avatar
Jonathan Wilkes committed
231

232
233
Crashers
--------
234
235
236

***

Jonathan Wilkes's avatar
Jonathan Wilkes committed
237
Differences in Purr Data and Pd
238
239
240
241
242
243
244
245
246
247
---------------------------

When editing box content, you cannot currently trigger xlet highlight when
mousing over xlets.  This is a consequence of the current iteration of moving
gui behavior from the core to the GUI.

When editing box content, the text will wrap if it gets close to the right
border of the window.  (Probably same for the bottom of the window.) But
when you activate the box the svg text still gets rendered in the correct
location.  (I see this as an improvement over the old behavior.)