# TODO nip2

This page is a copy-paste of the text TODO from nip2-7.11. We've not added wiki markup, maybe later. Or perhaps these things should be on the sourceforge tracker. Get the sources from the VIPS development area.

```- as well as Change Header, how about "Tag As", for marking as hist, fourier
etc.

- hmm, Size To seems to break if you size a wide short image to 1 pixel high?

- scale/offset in display control bar could set meta fields on image?

- test new AC_MSG_CHECKING([for Mac OS X])) code on mac

- "insert" does not work for groups

insert x y im group

will not auto-loop over group ... why not?

error is:

bad arguments to "Image"
"value" should be of type image, you passed:
Group [Image <212x224 8-bit unsigned integer, 3 bands, sRGB>,
Image <210x147 8-bit unsigned integer, 3 bands, sRGB>]

usage
Image value
where
value is of type image

auuug!

insert x y group im

works! because the Image is on the left, it get first stab at handling the
call, and Image does not do any autolooping stuff

removed

[wrap (op.fn this.value x),
true]

from the end of Image binary table so it'll go on to the Group class

no doubt this will break many things :-( need to test carefully

- matrix display is broken with kb nav :-( would we bet better off with
listview?

- scroll wheel activating sliders/option in workspace/prefs is incredibly
annoying

can we turn this off?

- Image / Transform / Displace would be useful

use stuff from Resize Canvas to set background

- Resize Canvas, leave size the same, set position in pixels, you'd expect to
be able to do the same

- Resize Canvas loses HISTOGRAM (Type gets set as mono)

- "if hist then hist else 0" loses HISTOGRAM as well

- something to fill zero areas with edge values would be very cool

need to iterate on a RAM image for best results I guess

could build with a combination of morph and conv, but it would be very slow
for large areas

nice to have a random element if a pixel can be filled from more than one
neighbour

zero-excluding area average works quite well:

make M, a seperable mask the size of the max area to fill

// sum of pels in window
sum = conv M image * M.width

// # of non-z pels in window
count = M.width - conv M (image == 0 / 255) * M.width

// +1 to stop divide by zero
avg = sum / (count + 1)

- make our own rowview widget

colour as column titlebar, should give a more 'integrated' look

can do kb nav properly

- docs should include JPGs directly, rather than using vdump

I'm sure I did this somewhere, gah, can't remember

perhaps when I fixed spie96a.tex to format with pdflatex? check

yes!

\usepackage[dvips=false,pdftex=false,vtex=false]{geometry}
\usepackage[pdftex]{graphicx}

\includegraphics[height=4in]{figs/scrdump.png}

now only works with pdflatex, and breaks htlatex

need to supress pdftex.sty in html.cfg

can htlatex produce wiki markup somehow?

- need to output HTML docs to a sub-dir

- check that +80 we removed, is it really necessary to remove it?

(in gtksheet)

- for group save ... save to original-file-name, with the appropriate
suffix change

exit with an error on file-exists

- sometimes we will want the incrementing numbers thing :-( eg. slice into
tiles

- could look at filename the user offered:

+ if only the path and the suffix have changed, save the group to
original-filename, changing each path and suffix in the same way

+ otherwise use the new name as the base and save to newname_000.thing etc
as now

but that sounds hard to explain :-(

- group save could attach an extra widget to the save dialog for "save under
original name"?

on OK, as we save each object, patch the dir and extension of
original-filename accordiing to the entered filename

if there's no original-filename, save to the entered filename and
increment

- use groups rather than matrix for Hazel, easier iteration for multiply/div
etc?

- things like left-right join should cast images up to match ... eg left-right
join of float and uchar should cast uchar to float before

see also code for image ++ image

- group save needs adapting for new original-filename system, see notes in
sources

- Vector[] should display like matrix? short + wide

- gtksheet sucks soomewhat, look into using treeview instead, perhaps with some
hackery for rectangular selects

also, matrix area select is a bit dumb :-( should really display persistant
selects on mmatrix, cf. image regions

- Ctrl-O, kb focus should be on file/dir list on right so you can type stuff

currently, focus is on the OK button (because of idialog?)

doens't seem to work if we just set_focus( chooser ) ... see how the gtk
dialog does it

- image_white fails for LabS ... hmm ... Colour can't represent it, we'd need
Vector [32767,0,0] I guess

- Complex class? wait for next version

- freebsd problems?

some sort of flex/lex thing?

- add video grabber under MS Windows (probably nasty ifdefs!)

interpreter benchmarks
----------------------

- Ackermann

http://shootout.alioth.debian.org/great/benchmark.php?test=ackermann&lang=all&sort=cpu

A x y
= y + 1, x == 0
= A (x - 1) 1, y == 0
= A (x - 1) (A x (y - 1));

correct test result: A 3 4 == 125

A 3 10 is benchmark test ... we fail with a "C stack overflow" error

A 3 9 == 4093 works OK

we could make this a lot quicker with some arithmetic streamlining

could we do tail-recursion elimination?

strictness analysis would help too

- Fib

http://shootout.alioth.debian.org/great/benchmark.php?test=fibo&lang=all&sort=cpu

F x
= 1, x == 0
= 1, x == 1
= F (x - 2) + F (x - 1);

correct output F 32 == 3524578

cima is ~370s for this (!!)

- turn on DEBUG in heap.c, run the fibonacci benchmark

we heap_copy F every time it recurses! because when we heap_copy we don't

try fixing this ... but remember the problems we had with shared classes
when we did link-to-value rather than link-to-copy

we also have a huge amount of stuff in the heap, could we trim this down?
how does it all get pulled in? is it preferences?

in nip1, F is about 4x faster

static build checklist
----------------------

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

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

- don't include win xp lookalike theme? would avoid the LEDs problem, and
windows ppl would get prelight too

plus we'd save some repaint problems scrolling large workspaces with
sliders in

- try adding more libs static in linux build, then test on laptop

- test jpeg-in-tiff write with the static lib, ruven says it's broken

- link statically against all X libs (might help fedora3)

- test on suse 9.2 laptop

Complex
-------

check_complex = [is_complex, "complex"];
is_Complex = is_instanceof "Complex";
is_Numeric x = is_Complex x || is_Real x;

/* Complex number as a class ... eg result of maxpos.
*/
Complex value = class
_Object {
_check_args = [
[value, "value", check_complex]
];

// methods
oo_binary_table op x = [
[this.Complex (op.fn this.value x.value),
is_Numeric x &&
op.type == Operator_type.ARITHMETIC],
[this.Complex (op.fn this.value x),
is_number x &&
op.type == Operator_type.ARITHMETIC],
[op.fn this.value x,
!is_class x]
] ++ super.oo_binary_table op x;

oo_unary_table op = [
// "re" and "im" are arithmetic ops, but they convert
// Complex to Real
[Real (op.fn this.value),
op.op_name == "re" || op.op_name == "im"],
[this.Complex (op.fn this.value),
op.type == Operator_type.ARITHMETIC],
[op.fn this.value,
true]
] ++ super.oo_unary_table op;
}

my_maxpos x
= oo_unary_function my_maxpos_op x, is_class x
= im_maxpos x, is_image x
= error ("bad arguments to " ++ "my_maxpos")
{
my_maxpos_op = Operator "my_maxpos" (Complex @ my_maxpos)
Operator_type.COMPOUND false;
}

Find_centre_item = class
Menuaction "Find _Centre" "Find centre of bright image feature" {
action x = class result {
_vislevel = 3;

offset = Expression "Offset result by" (0, 0);

result = map_unary (add offset.expr @ my_maxpos) x;
}
}

- (,) needs to know to make a Complex if it sees 1 or 2 Real

- add something to nip2/src to display Complex (cf. Real)

- should have a Numeric class, and Real and Complex subclass of that

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

- hmm, still have "color" everywhere (except .defs), how odd

\$LANG == "en_GB.UTF-8" on santi ... same on constable?

- Option_enum should not use a string to set the default! it will be i18n'd,
and then a ws made in one locale won't work in a different locale

or will it? hmm

can we make this change and keep backwards compat? yuk!!

Colour_picker sort-of has the same problem, and that's a total pain to fix

we need something to map human-readable colour spaces to the Colour widget's
names

fix this before we i18n more menus

- exactly on matrix limit, resize to above limit, ... do not appear

- look at gtksheet again, or gtkgrid?

- proper (c) symbol would be nice

- could pop up a tiny prefs just showing the TIFF save prefs when we save as
tiff ... handy!

need a new workspaceview that displayed a single column

- we could set mainw status bar on mouseover on ui_manager menus

- enable kb search in treeview? try a more recent gtk for this

- could we use GtkSourceView in program.c and define a syntax? highlighting
would roxx0r

seems to pull in a lot of gnome (eg. printing etc)

- printf()-style format strings would be good for i18n

maybe:

printf (_ "%s, me love you long time, %d dollah") ["sailor", 12]
- 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?

end of main_x_init() we call gtk_accel_map_load() to load saved bindings ...
could save bindings to "accel_map_default" before we load, then to revert,

the saver comments out settings at the default, so this won't work :(

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

- 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

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

- 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

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"

-------------

- 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

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>],
```