
- mac balance broken?

- don't forget to include the transform plugin in the windows build

- when testing static linux binary, try removing /usr/local/etc/pango and see
  if it still starts OK ... /usr/local/etc/pango/pango.modules missing and
  works means the compiuled-in pango render is working

- include command-line stuff in both to help Joe's notes

WONTFIX bugs
------------

- add a 'reset keybindings' item?

  ... would mean updating docs again :-(

  could do it in "reset to defaults" in prefs?

  there's no "revert to defaults" in gtk (that I can see), we'd have to quit
  and restart

  or have an accel map we could load to do the revert?

  maybe best left until we switch to the new UI manager for menus/toolbars/etc

- instanceof should do absolute and relative names ... if there's a '.' in the
  string, match full name, otherwise just match last part

  see is_Transform, Image.def

- we repeat some strings a lot, eg. "Image width (pixels)" ... should be
  broken out into a separate file and reused?

- after show tk browser, kb focus should be on search entry

- column title bar should prelight?

- orderitem/orderlist should be redone with treemodel/treeview

- add a button for 'show source' to toolkitbrowser

  difficult wth current program window, because it can only select things
  which have sym->tool / sym->kit

  we want to display action_sym, which may not be in a tool

  program window needs to be able to display more stuff

- add a button for 'show menu item' to toolkitbrowser? possible?

  needs to be able to programmatically pop open a menu given a path like
  "toolkits/image/new" or whatever

- could do i18n just in nip2 with 'expand "$LANG"'

  can we define a function called "_"?

  think about this for i18n

  eg.

	  messages = class {
		en_GB = Table [
			[ "bad color", "bad colour" ],
			..
		];

		de = Table [
			[ "bad color", "ungemutlisches farben" ],
			..
		];
	  }

	  _ x 
		= translation, have_translations && have_translation
		= x
	  {
		locale = expand "$LANG";
		have_translations = has_member messages locale;
		translations = get_member messages locale;
		have_translation = translations.present 0 x;
		translation = translations.lookup 0 1 x;
	  }

  probably better to add '_' as a built-in :-( will be slow and ugly like
  this

  also need something to extract all _"x" strings

  add a -names option to main() which just prints translatable toolkit strings 
  to stdout

  have _ as a builtin,ave a flag which says act as gettext, or just passthru

  for -names, set passthru mode, then dump toolviewitem_new() stuff

- formula widget should use an input only window to catch enter/leave events
  (cf. gtkbutton) ... same for spinbuttons on row xpand/collapse, and other
  prelight things

- alpha: done colour_unary, need to do colour_binary

  nope, instead add alpha support with a subclass of image which holds the
  extra band as a separate image

  	Image_alpha alpha value = class scope.Image value {
		Image value = Image_alpha alpha value;
	}

  now we get automatic add/remove of channel around most ops

  need special treatment for resize/rotate/etc. since then the alpha will have
  to change too

- layers: same for layers

  works like group, but all elements must be images

- dragging tools in the program window will not rearrange menus correctly if
  you drag items upwards in a kit

  ... because we refresh from the highest numbered menu item to the lowest,
  and you have to refresh menus top-down for model->pos to work as menu_insert

- can we have Menuseparator at the top level? depreciate #separator would need
  a zillion 

  	Matrix_sep17_item = Menuseparator;

  though :-(

- have image open in compat workspace and regular workspace with a region
  dragged on it in the compat ws and an image window open from the regular ws

  close compat ws, crash as we try to undraw the region on the after the
  definition of Region in the compat ws has been removed

- right button menu for delete item and delete selected items in option menu
  edit is broken

  widget is too annoying and stupid to be worth fixing

- investigate gtkwindow->allow_shrink ... could turn this on for idialogs?
  might help save dialogs

  ... yes, could add gtk_window_set_resizable( GTK_WINDOW( idlg ), FALSE );
  to the end of idialog_init() and save windows then shrink on close of browse

  but of course all dialogs are then fixed size, very annoying

secrets
-------

- this is broken:

	a = class {
	    f = 666;

	    b = class {
		c = class {
		    d = class {
			e = f;
		    }
		}
	    }
	}

	harry = a.b.c.d;

	e 

 Error in row A2.b.c.d.e: Member not found.
 Member "<reference to symbol 'a.f'>" not found in class "a.b".
   object = a.b
   tag = <reference to symbol 'a.f'>
 Reference attempted in "a.b.c.d.e".

  problem with secrets: d is given a.this as a secret (since e referrs to a
  member of a.this); b is given a.this as a secret (all members of a get 
  a.this as a secret); but c does not get a.this as a secret, perhaps because
  we do not include "this" in the set of things we propogate when we take the
  closure of the secret lists?

  see the line

	secret_add: considering secret a.this for compile(0x830e4ac) a.b.c  ...
	poop!

  from secret.c, but it's not acted on, hmm

  break on poop and trace secret_add() actions

- row_regenerate always makes (member this) ... it never pastes in any secrets

  it will fail to supply the extra secrets we seem to need if we edit a row

misc ideas
----------

- can we change the syntax to allow ';' before '{'? not ambigious, I think

- cool if we could drag from any graphic display, eg. captions on groups etc

- caption for slider widgets would be cool

- could add "_nparam" member for number of params action expects

  -1 means any number, and action is passed a list of selected items?

- Image_file could override Image ... then we'd keep sane filenames longer

  could use to init filename field of save-as? could link with groups too

  no, Image_file would need to carry value and image around for us

  need another name, hmm

- save-as dialog ought to show selected file info in expanded mode? handy for
  deciding which file to overwrite

  can we get an expanded/collapsed signal?

- Joe writes:

	I also was wondering if it would be good to have two toolkit menus
	one for default and one optional one for user defined toolkits.
	On a similar line would it be possible for there to be some
	visual indication that a default menu had been altered, a *
	next to the name or something in the toolkit drop down menu.
	It might be useful for tracking down if a user has accidently
	altered a function.

  not easy to implement, we don't have anything to say where it's been loaded
  from

- could add save-as PS (via vips2dj) ... have a prefs panel for PS save
  options

- could add RAW import with dcraw and im_system?

- would be cool if we could drag font names between fontbuttons

- "nip fred.jpg" loads fred and displays thumbnail ... should display image
  window and not display mainw?

  good if we could bypass parse/compile and just work as an image viewer in
  this case

	  need to have something to look along argc and check that there
	  are only image files there

	  can we have imageview windows without a symbol? would need a bit of
	  hacking

	  would be hard to have a "new workspace" or "open workspace" item

	  region / guide creation would not work

	  image replace might be a bit odd

- rename row_map_fn -> RowMapFn etc.

- check occurences of main_workspacegroup, main_toolkitgroups, reduce_context
  ... sure we can scrap a few of them

- SYM_PARAM should be property of expr, not symbol?

- make link derive from g_object? maybe too small and annoying for that

- dependency stuff in at least three places ... topchildren stuff, expr/sym
  parent/child stuff, row recomp dependency stuff ... abstract into
  depend.c class?

- work through the FIXME comments again

- hmm, listen_add() isn't very useful

  would be much more useful if we could update it ... return a Listen*?

- make our own marshallers, for eg. area_changed, where we need a Rect* arg

- get rid of doubleclick.c!

	hard to do for (eg.) iimageview ... we want doubleclick to open a
	viewer, but if we doubleclick we don't want to select the row

- get rid of GtkText and GtkCList in program.c

  new program widget should be embeddable in workspaceview too, for defs local
  to a workspace

- should use 

	name = g_build_filename (g_get_home_dir (), "Desktop", NULL);

  to make directory names

- replace rowview/rhsview/subcolumnview with a custom widget that can do
  keyboard traversal well and doesn't use buttons for showing the row name

  could get rid of the dumb LEDs as well

recomputation
-------------

- we copy code all the time ... we should be able to cache a copy of the code
  and just link to it

  see comments in reduce.c:1028

- let graphic edits override text edits

  we want to be able to have variant subclasses ... if you have an option to
  pick between the subclasses, any edits in the subclasses stop the option
  working until you reset

  will this break constraints on regions? eg. entering height * 2 for width,
  then resizing

- can we delay model building as well as display building?

  currently build view when a row is opened, but we build the entire underlying
  model at the end of row recomp ... could maybe delay building the model as
  well? would produce a good speed-up

  sticking point: interactions with dependency tracking ... it's obviously OK
  for completely closed rows, but what about rows with top level open and
  lower levels still closed?

  we currently use the model to work out which rows depend on which rows, in
  case we have zero-param local classes etc. with submarine references

- progress feedback for reduce? or something else? nice to have an interrupt
  of some sort

  main pause is in statistical operations on images ... good to get some sort
  of feedback from these (needs large VIPS changes)

  also subcolumn_class_new_heap(), symbol_recalculate_leaves()

basic UI stuff
--------------

- scrap toolbar and menu code and use the new GtkAction API

  fix HIG problems with toolbar ... eg. we have toolbar items which aren't in
  the menu, etc. Also we have stupid duplicate icons.

- button tooltip could show formula as well

  so 

	A1: top level value "A1"

  could be

	A1: top level value "A1"
	A1 = Image_file "poop.v"

- could do right button => rename for rows ... useful?

- try gtksheet again? wait for 2.4, there's a possible gtkgrid being worked on
  too

- something to set storage options per image ... to limit pipeline lengths
  ... replacing 'istop' make_temp_image() parameter and eval preferences
  stuff

- offer cancel more often ... currently every 100000 reductions, add every 10
  VIPS function calls too?

- could add "save as nip" to ip

- program should probably have a separate recent list

- allow "x = 12" as well as "12" in column row entry? would help readability

- click on "space free" a third time to display "space used" ... ie amount of
  stuff in ~/.nip-7.8.x/tmp

- how to display the error message from conv if repaint errors?

  we're now emitting model_changed() from conv on error ... perhaps imageview
  could pick it up ... see conversion_error_set()

- row sizing is funny ... why are the buttons so large?

- spacebar on row label doesn't activate?

  doubleclick.c should allow SPACE as well as click?

  or "clicked" callback needs to interrogate modifier keys?

  would be nice to scrap doubleclick.c completely

- could do dependency button painting for mouse in/out of iimageview too?

- toolkit accelerators should work in image windows?

- other toolbar items: show formula, auto-calc

- after load ws, think again about where focus should be and where screen 
  should scroll to

- click on row, edit text, return, where is keyb focus?

  in entry at bottom of column? what if that's off the screen? don't want to
  scroll

- keyboard nav for menu column could be better ... up/down for vertical :/

- could lock columns into a table layout?

preferences
-----------

- add more live prefs ... eg. max text display length

- recursively load sub dirs of start as well?

- edit start path in prefs, start nip, start path not followed, since we
  don't load Preferences.ws until we've started walking it ... hmmmm

vips interface
--------------

- add DOUBLEVEC vips->ip direction ... useful for Kirk

- vips_call should automatically wrap/unwrap classes?

- update vips_update_history() with arg decode stuff

  needs to be a little different from vips_tochar ... eg. should print image as
  filename

  maybe not worth fixing, the whole .desc thing is currently stupid anyway

- yea, progress dialogs on save of jpeg etc

  still not on stats operations though

  because im_iterate() makes a shadow image which it then copies from ... and
  the shadow does not have the eval callbacks on it

  need to fix this whole image/region/valid thing to get this right

- could conversion handle TIFF pyramids again? just replace the shrink thing
  at the front?

drag and drop
-------------

- should drag behave like duplicate? save row to a workspace, load workspace
  into destination row?

  alternatively, should duplicate behave like drag? so instead of creating more
  Image_file nodes, make a link?

  currently we have three copy behaviours:

	  drag on button reorders rows (MOVE)

	  drag on thumbnail replaces itext with name of dragee (LINK)

	  duplicate saves and reloads XML (COPY)

  complicated! can we simplify this at all?

- pop up RMB menus on button up?

  then we can have RMB drags of thumbnails pop up menus on drop for copy/link

  or is this too complicated?

- could clean up the drag/drop stuff, the target_list thing in iimageview
  is horrible

  do a layer over the gtk dnd which allows you to register a handler for a
  mime type

programming language and .def files
-----------------------------------

- could add a Group_file derived from Group ... list of filenames (no
  directories?) plus list of objects ... on save, prompt for a directory then
  save all objects to that directory in their filenames

- Adjust_scale_offset on a slider/matrix/whatever, works fine, niiiice

  but, if you (eg) drag the slider, it changes back into a regular slider
  again

  any way we can fix this? hmmmm!

- debug window could look at trace and generate C/C++ for an action?

- dE_.CIE00 does not work for all combinations (eg. colour, matrix)

- sort out Plot_scatter args ... matrix? List? what?

  redo the ip workspace that assesses print accuracy and plots graphs ... this
  is the case we want to work well

- need matrix plus vector for Morph_for_print? want to add row-wise in this
  case

- make a vector menu and add cross and dot products

- matrix * vector ... vector should be one column matrix?

  ie. currently we do 

  a b  c d
  e f

  ==

  a*c b*d
  e*c f*d

  should do

  [[a, b], [c, d]] * [e, f] ==
	  [[a, b], [c, d]] * [[e], [f]] 

- map_trinary is in _stdenv, used by If_then_else in Boolean.def ... maybe we
  could have a true trinary if_then_else?

- can we spot refs to things that ref super in super class constructor?

  any direct or indirect ref to "this" or "super"? is that enough?

  no, but it would get most loops

- reduce needs rethinking again, much too complicated

  trace 2 + 2 ... bleurg

- common path: track down APPL heapnode pointers ... could add little loop to
  reduce_spine to do this before switch ... any faster?

- not sure matrix is being done the right way, maybe better to have something 
  like the imageinfo mechanism

  split imageinfo into two levels: a base class for a pointer to a VIPS object
  managed by the GC (Externalobject?)

  subclass off this to make imageinfo ... add LUT stuff etc.

  needs to interact with vips_call.c

  this should be part of the VIPS type model really :-(

  projection functions can just be vips operators ... im_mask_matrix( mask )
  returns a [[real]], no need to build into ip

  same for constructors .. im_mask_new( double scale, double offset, char
  *filename, int width, int height, doublevec coeff )

  need a destructor for when we GC an object away

  save is harder: this has to be wired in to ip for each type?

- alternatively: represent all matrices as images, swap to DOUBLEMASK whetever
  and back at vips_call interface

- is_image -> is_vips_image?

- vips_image"" -> vips"" ? or im_open? or im_image? vips_new ""?

- add imagevec as a type to vips.c

- could make links more fine-grained ... atm, if untitled.A1.a looks at 
  System.A1.a, then we will record a dependency from untitled.A1.a to
  System.A1 (can't note link to System.A1.a, since a might be part of
  root.fred)

  we would need links with exprs at both ends, not "many expr"->"one sym" as 
  we have now

- add symbol lookup by name to language? 

	symbol_lookup "workspace.fred" == fred

  easy to do, useful though? hmm

- dot product, vector <-> point

        Vector_point p = Vector [p.left, p.top];
        Point_vector im p = Point im p.value?0 p.value?1;
        dot a b = foldr1 add (map2 multiply a.value b.value);

  sign vector should be

        sign v = v / abs v

  instead, it takes the sign of each component

- complex constants ... image * (1, -1) would be cool

- nice if

	(int) -2

  wasn't a syntax error :-( need to differentiate unary and binary minus in the
  parser?  or spot casts in the lexer?

- try:

	A1 = fred 12;
	A1.a = 99;
	clone A
	B1 = fred 12;
	fails to update correctly

  B1.a never gets formula_default, since it's created with edited set!

  when we reset B1.a on enter in B1, we have no default formula to revert to

  need a better way to set formula_default

  see FIXME in text_reset()

- should we allow "image && image" ? 

- New_image, paint box something on it, New_image again, 2nd image has painted
  features

  same for New_eye etc. ... it's when we build something zero arg

documentation
-------------

- try http://www.teresalunt.com/photoshop-tutorial-13.html in nip, could be
  good for a tutorial

- tinkering with Cross Process

  XP is just solarize + colorize and a bit of fiddling

- add fourier filtering with paintbar to nip for nerds?

  better in an image processing section ... could put sobel code in there too?

  what else could go in? morphology is quite cool

mac
---

- abort() on middle button paste in gtk? test again

magic def maker
---------------

  works on current column

  - refs to other columns become class parameters

  - bottom row is output

  - set of "control" rows (Slider, Toggle, Option, Region, Matrix, Filesel,
    others?)

  - non-control rows are computation rows and become locals of value to hide
    them

  - we allow edits to class params and to model values ... promoted to params

	eg. a Slider dragged to 12

	A1 = Slider 0 255 128;
	drag value to 12

	on mag, generate

	A1 = Slider 0 255 (12)

    also class param edits: eg. open A1, set

    	A1.from = A2.value;

    generate

    	A1 = Slider (A2.value) 255 (12)

  - text box to set name of function (and toolkit? or can we let edit do
    that?)

  generate code, then pop up an edit box with the text in

find
----

- find for workspace?

- could abstract a lot of search stuff into Find class ... later, share with
  workspace find

  maybe do workspace find first, common stuff up later

- history pulldown for find? keep history as static class member for all finds?

- find should just search the current tool/workspace ... have a toggle for
  "search all"

load and save
-------------

- could make no-compression-and-prettyprint into a save option for ws-es? or a
  preference?

- make XML save format more abstract ... should not be tied to 
  col/subcol/row/rhs/text structure so closely

- XML load could warn of unrecognised names if DEBUG is on?

- swap Duplicate for Cut/Copy/Paste via clipboard of XML?

properties
----------

- add a properties system to Model ... automates XML load/save, read/write
  heap, edit dialog read/write, info system

  alternatively, use gtk property system on gtk2 switch?

- for each property, need to track:

  * name (eg. "view_height")
  * friendly name (eg. "View height")
  * type (eg. int, see below)
  * offset in model instance var table
  * default value (eg. view_height=64)
  * should-be-saved flag ... eg. value in iimage should not
  * should appear in edit dialog (so we can make eg. slider edit dialog
    automatically)
  * optional flag ... eg. view_height 

  for each type, need:

  * read from XML 
  	get_iprop( xthis, property->name, model + property->off )
  * write to XML
  	set_prop( xthis, property->name, "%d", model + property->off )
  * get from heap
  	class_get_member_real( instance, property->name, ... );
  * write to heap
  	heap_real_new( ...
  * name (eg. "int")

  _get_properties() method to get prop list ... so iregion can set a load of
  props, and iimage can too ... we will see both

  have multiple sets of instance vars ... so could read widgets into
  an instance, then if all succeed, copy instance to model vars

  look into gobject properties

program window
--------------

- could add "save/save as" to right button menu on toolkits

paintbox
--------

- need nibs as .png too ... can we get pixels out of stock Images easily?

- nibs could have alpha?

- then display nibs in a button, with a pulldown menu

  can we have multi-column menus now?

  no, needs gtk 2.4

- smudge is broken on LABQ?

- thumbnail does not update during paint (see im_invalidate_rect() note)

- we turn off synchronous render in conversion_set_paintbox() ... much better
  to keep the cache and have an im_invalidate_rect() 

  how much work to add this to VIPS? I think we'd need to break out the
  fwd/back transforms

widgets
-------

- A Dirname class would be good? Need to make a dir selector

- add Path class, use optionlist to edit

  so prefs can have editable thingies back

  dir selector for each line?

- think about layer stuff? turning channels on and off? maybe better as
  something which can show a list of images (so we can have colour layers)

  have to be rather like paintbox ... a separate window popped up by a menu
  item? could also try just as a column?

- also a Path class? makes an orderlist widget? 

  Filename could have an "exists" bool ... also file length, date etc.? 

  maybe rename as file?

- have class fields for scale/convert in Image? might be handy for xrays
  could link them to the sliders in imageview windows?

- when we make a new iimage, should search for regions which might have a
  display ... currently only update links when region is recalced

  should be when a new ImageInfo goes in ... find what other iimage have that
  as their value, and see which regions they have defined on them

  eg.

  	A1 = image
	A2 is region on A1
	A3 = A1

	open A3, no image display until touch A2

- could update edit dialogs on model_change

- turn on rulers by default for graph images? or draw axes in hist_draw?

- use guppi rather than histplot? 

	http://www.gnome.org/projects/guppi/

- could add width/height to display of mask? handy for edits

- nice to be able to scrap edit dialogs in favor of popping open class
  displays ... but does not work well for derived classes ATM ... think about
  how to fix this

  maybe have a special "views" member which lists the members which should be
  displayed at each view level?
  
  slider f t v = class {
  	views = [
		[ "f", "t" ],
		[ "v" ]
	];
  }

  so views?0 is the members we show for 1st view level, etc.

class browser
-------------

- TAB should move down column texts, toggling to expr edit

- view source button for rowview menu pops up a program window showing the
  code that made that row

- better more/less visible stuff for class display ... need some feedback 
  from rhs so spins know how much to increase/decrease visibility

- row up/down spin buttons should grey out on max/min ... look at
  gtknotebook.c, they have nice greyoutable buttons

- add an "action" pull right to row object menu, displays class
  instance functions, just like toolkit menu (but dynamic)

- add outline drag for columns, needed when we put images into workspaces
  ... make a floating column title plus hollow frame, drag that?

- draw arrows for object relationships on background?

configure
---------

- if can't find lex/yacc, should abort configure

something like

 [AC_CHECK_HEADER(png.h,
         png_ok=yes,
         png_ok=no)],
-      AC_MSG_WARN(*** PNG loader will not be built (PNG library not found)
       ***), -lz -lm)
+      AC_MSG_ERROR(*** PNG loader can not be built (PNG library not found)
***), -lz -lm)
     if test "$png_ok" = yes; then
       AC_MSG_CHECKING([for png_structp in png.h])
       AC_TRY_COMPILE([#include <png.h>],

