## C

- ruby string interpolation would be useful

  it needs to be in the syntax, so:

    "hello #{name}!"

  needs to parse as:

    string:
        string fragment:  "hello "
        string interpolation expression: name
        string fragment:  "!"

  then codegen to:

    ("hello " ++ print (name) ++ "!")

- we heap_copy() far too often!

    see reduce.c:1213

  enable trace in heap_copy(), then:

    foldr add 0 [1..100]

  we copy every loop! nip2 does the same

  after compile, we should link locals, so that copying foldr automatically
  copies all foldr locals

  or perhaps when we heap_copy() we should recursively copy locals, but not
  refs to other top levels?

  how should we handle cycles?

- add #include to snip? probably necessary if we want to use it as a
  scripting language

    #include "banana/x.def"

  filename found relative to current file

  done in lexer, so can be used anywhere

- after Reset on a row, mark dirty and recalc

    seems to all work, find a case where it fails

- class params missing value display

    can't find a case where this fails

    just a laptop bug? there are some small rendering issues elsewhere

    maybe the text for a param began with a newline?

## menus

- look for more missing vips8 features

- Enum.picker could allow string or numeric arg

    style = Plot_style.picker $LINE;
    style = Plot_style.picker Plot_style.LINE;

  second does a lookup to get the key name

- now that image_new sets interp to sRGB for many band pixels, perhaps we can
  remove some (set_header $interpretation $srgb)?

- try to reproduce that macOS crash

  for macOS, see this for code signing tips

    https://www.reddit.com/r/macosprogramming/comments/1rpe0mx/macos_app_development_outside_of_app_store/

- "nip4 for nerds" page

- support BMP drag/drop to help windows

    a gtk problem, gdk_texture_new_from_bytes() handles this and has no
    BMP support, only TIFF, PNG, JPG

    maybe win11 has PNG clipboard support?

- libvips bug:

    $ vipsheader x.v
    x.v: 1x1 double, 3 bands, multiband
    $ vips colourspace x.v x2.v srgb
    $ vipsheader x2.v
    x2.v: 1x1 uchar, 3 bands, multiband

  should change the interpretation (probably?)

  vipsdisp gets confused by x.v, though nip4 seems fine

   $ vips freqmult a.jpg mask.v out.jpg

  always writes b-w (should copy interpretation from input)

  vips_text() ... if width + height are both set and autofit is TRUE, ignore
  DPI setting

- should support texture paste in main window

    right now you need to make an image, then paste into that

  if you define a paste action in mainwindow_entries[] it breaks ^V in
  text entries, eg. bottom of column

- scroll is very slow in macOS, so navigating the Magick menu with no
  scrollbar is painful

- infobar in pages-as-bands just shows the first value

- maxpos, then create mark from coordinate should be two clicks

- the nip4 menus need reworking to use max_alpha 255 for scrgb

- try:

    Matrix_build_item.Matrix_laplacian_item.action
    Matrix_build_item.Matrix_gaussian_item.action

  edit a cell and hit enter, lose the widgets, same happens in nip2
  do we need to define a Matrix_base member in Matrix_gaussian_item.action?

  see Matrix_circular_item -- it handles this case, we'd need something similar

- add "smooth" option to union/intersection/difference?

    see https://iquilezles.org/articles/distfunctions/

  translate, rotate etc? need xyz for that

- use vips_addalpha() operation

- can we improve Group[]?

- "nip4 try.def x.ws" ought to work

    only images and workspaces as CLI args right now

- linear match

    allow refine tie points + no-resize atr the same time

    show computed transform

- try

    Edit toolkits ...
    [a, b, c] = [1, 2, 3];
    |>
    add a space
    |>

  error: second def of "c"

  probably OK -- we can always delete the three defs separately, and this has
  to be a very rare case

  add "delete tool"?

- do row select on button up, and as part of the mainwindow event state
  machine

    same for up down buttons

    same for textview flip to formula

    need our own tiny subcolumnview event system

- nicholas's bug report

- parse_onedef() was using single_definition, which also increments
  tool_position, do we need to do that?

- ban patterns in class parameters

    or could we allow multiple class defs?

        Fred (Image x) = class { ... };

    probably only useful for trivial classes

- what about

    fred (list x) = ...;
    fred (complex x) = ...;

  ie. allow names of builtin types as well as class names

  maybe:

    fred (is_list x) = ...;

  ie. a predicate before the arg, as well as a class name?

- do we allow eg.

    fred [a, b ..] = a + b;

  equivalent to

    fred a:b:x = a + b;

- we could allow

    fred x x = 12;

  meaning, two args, must be equal

    fred x [x, y, z] = y + z;

  meaning first list element must equal first arg

- make "About" non-modal and update on gc

    use progress system?

    add a new GC signal

- remove prefs workspace stuff?

    things like max heap size should be settable ... maybe pres are useful?

- try < > in the image titlebar

    seems to get stuck on eg. mp3 files

- toolkitgroupview could have a non-scrolling version as the default

    context would be much clearer, though it would take loads of space

- add tab completion ... somewhat like VS intellisense?

    should work in workspace entry box, and in program window

        vips_fa |

        im_falsecolour in = ...
        im_fastcor in = ...
        vips_falsecolour: false-colour an image
        vips_fastcor: fast correlation

    maybe a bar down the right shows matches to the thing around the
    cursor?

    a popdown from the cursor shows what tab will complete to

    tooltips around mouse do lookups on text



- program: ^W should parse the text and block on error

- program: don't get save-before-close box for modified toolkits?

- program: add delete tool / toolkit?

- program: needs "find"?

- get judder with rotate and images smaller than the window

    draw on update, then draw again on relayout

    hard to fix

- show zoomed out tiles too

    should stop some more flicker

    seems tricky for some reason?

- load ws with locked tab, rightclick menu on locked tab does not
  have tick selected

  two tabs, lock one, menu on other also shows lock

    a bit tricky to fix

  maybe we are forced to have a separate menu for each tab?

- could use file chooser widget in bm-workspaces, what would it look like?

- try to save and restore image view scale and position

    this failed last time I tried :(

- ^C on a computed animated GIF is only copying the first page

    a limitation of gdk_texture_new_from_bytes()

- use "propagate-natural-width" to get better fit of imageview window?

    aim for max 600px on any axis

    pick an initial scale

    drawingarea makes itself that size

        we need to implement the sizing machinery, however that works

    propogate size

    remove shrink-to-fit

  see imagewindow_set_tilesource() and uncomment the call to
  imageui_set_bestfit() to work on this again

- investigate behaviour with updated iimage_update_heap() ... there will be
  quite a few cases which now fail (I expect)

- save as TIFF, pick a set of options which will fail (eg. deflate + float
  predictor), save, get error, fix options, save again, get:

    (nip4:3658140): VIPS-WARNING **: 12:51:27.408: ../libvips/iofuncs/object.c:1231: VipsForeignSaveTiffFile can only assign 'nickname' once
    (nip4:3658140): VIPS-WARNING **: 12:51:27.408: ../libvips/iofuncs/object.c:1231: VipsForeignSaveTiffFile can only assign 'description' once

## program

- restore scroll positions on menu path set

- in program window, search is cleared on refresh

    eg. search for is_Plot, click on it, list fills again

    not clear why this happens? we try to restore the search string
    and filter

## imagewindow

- open imageview window for groups? < and > could move up and down the group

    or disable < > ref for computed images?

    need a groupview widget

    it would need to make a model for every element in the group, then
    display a set of views

## ideas

- we have the css_name thing in several _refresh() methods ... should this be
  in the base class?

## program window

- for a click on a computed tool, could scroll to or highlight the text?

- find and find all could be in a "uses" pane on the right?

- drag in left to reorder tools and toolkits

    argh!

  I suppose we will need our own two-level tree view

## toolkit browser

- double-click in browse mode will add two pages with the same name

    harmless, but you get a warning

- often see

    view_dump(): 3 views
    0x5e14b821e120 Workspacedefs count=2
    0x5d40451c8110 Toolkitgroupview count=2
    0x5d40447a9790 Workspaceview count=1

  on shutdown

  could wsdefs and tkview be referencing workspaceview?

  maybe we are sometimes using VIPS_UNREF() rather than IDESTROY()?

## other

- remove the "open" button from the top bar? not very useful

- put a time delay on row label colour change -- stop the flashing

    we have vobject_refresh_queue(), but that does all views, we just
    want to delay colour changes

    maybe do a separate pass at the end of recomp that sets label colours?

    could use this to make parent/child colour change only show after a
    while ... might look better

## vips8

- vipsobject

    vo_new() could allocate the args array dynamically

    use vo_set_required_input() in the body of vo_call_fill_spine()

## rows

- add multi-select to file open?

    gtk makes it hard to support single and multiple file select in
    one action

- implement range select then drag

    awkward to do since select is on the model, not the view

    we'd need to make a floating column (not just a columnview) and
    reparent the rows to it

- new row type ... enter " (double quotes) as first character, then there's no
  need to terminate the string

  displayed slightly differently? maybe display all cells which are just a
  static string like this?

  maybe allow eg. "<span background=\"white\">hello</span>" too?

    formula isn't a great place to do this -- eg. "<function>" won't parse
    as markup

    a special graphical view widget for top-level strings would be better
