URGENT:
~~~~~~~

Need to be able to specify a PPD file for use with the Gutenprint PostScript driver.

Need to create an stp_file widget - a text entry and file selector button.

| Add a PresetVersion field to the preset files, which will be used to convert files from 
| older versions to newer versions.

| Get Batch mode working again...


Add an "Edit menu"

Add a menu item somewhere to Select All.


(Clipboard support?  How would it be arranged?  URIs or something else?)
Can copy or cut be arranged such that if the image has a mask, the masked version is
clipped?

Pasting images will need to create a temporary file somewhere, and free it when done.
(Perhaps build temp filenames with the PID as a root, then delete all temp files with
that PID when the app closes?)

| Poster GUI classes have no selection_changed signal, yet the main UI code
| is subscribing to that signal for all layout classes.


High priority:
~~~~~~~~~~~~~~

Allow a background image to be used in NUp mode; this could allow for some very professional
looking contact sheets.

| Need some kind of Paths UI for setting profile paths, border paths, etc.
| Need to build a specific widget for this.
| Create a list box, and a pair of buttons.

| Widget needs to be able to dissolve a "PATH1:PATH2:PATH3" string into a glist of
| paths which can be used in the list box.  The list box should be able to rearrange
| the order of the paths, and "Add..." and "Remove" buttons are needed too.

| DONE - created a widget which operates directly on a SearchPath object.

PathEditor can't yet re-arranged the order of the elements.

Add code to prune elements from the right hand of the path until it points
to a valid directory.


| Create a dialog - either using tabs or an OptionMenu.
| Paths are needed for:
| * ICC Profiles
| * Borders / masks

| Create an ImageList widget - showing thumbnails in a scrollable list.  Again, use
| a SearchPath object to find the filenames.

| Improve user interface for profile selection.  Need the following features:

| Create a profile selection widget that builds a combo from the profile manager,
| with a box to the right that will allow an arbitrary file to be selected.

| Need to be able to select a profile for:
| * Default RGB colour space
| * Default CMYK colour space
* TIFF Export profile
* Monitor profile
| * Printer profile

| Create a new class specifically for dealing with colour profiles.
| Give it access to the relevant INIDB - or perhaps better still, make it
| an INIDB itself.  Could also be a direct subclass of the SearchPath class.

Try and separate out the INIDB code - will make re-using the ProfileManager much easier.

| Need to be able to build a list of profiles from the various paths,
and show a warning if there are any repeats.

| The biggest problem to be solved is that default transforms generated by this
| class have to be shared between multiple images; the issue is one of ownership
| - who's responsible for deleting the transform when it's no longer needed?
| (Used a factory that takes responsibility for disposing of the transforms when
| it's deleted.)

(Long term - look at mutexes and thread-safety.)

| Need a universal method of obtaining a suitable Transform for Printing or Print Preview.

| Need to add support for DeviceLink profiles.

| Allow cancelling of adding or transferring multiple images.

| Rename single image mode to something less inviting, since it's not useful for
| most jobs.

| (Rename multiple image too, since it can do 1-up as well as n-up)

--

| In single image mode, automatically reduce the image to fit the page if it would
| otherwise be too large.

--

Add support for heredoc to the Config code - i.e.
Keyword = <<<EOHD
<?xml version="1.0"?>
...
EOHD

This will allow embedding XML code in the presets for curves.

--

Scale and crop to specific aspect ratios?

--

Add a list of preset paper sizes for poster printing...

This will need a paper-size class - one that maintains a list (glist)
of paper sizes.  Probably best to create a generic non-glist-based class first,
then a subclass that builds a client-owned glist according to filters?

MatchPagesizes...
PAGESIZES_ALL
PAGESIZES_COMMON
PAGESIZES_EUROPEAN
PAGESIZES_AMERICAN

--

DCRaw import?

--

Postscript backend (PPD-based options instead of gutenprint options?)

--

Print dialog with page numbers, etc.
routine to parse a page number description string
1,4-5,7 etc.

Perhaps find the number of pages, and build an array of bools, filling in the required
pages as the string is parsed.
Is it desirable for the page numbers to be sorted in this manner, or would it be
better to allow such constructs as 1,4,4,3,3,2 if the user so desires it?

--

|| Fixed: Poster mode currently fails to draw previews for any but the first page...

--

Pull as much as possible out of the specific layout classes into the general layout
superclass.  Perhaps split into several source files for different aspects (ui, print, etc)

Keep in mind the possibility of the current layouts becoming page elements in the future.

(Can they be separated out enough to be done as plugins?)

--

Add a dialog for setting rendering resolution

--

TIFF export needs some options:
  Page number (range) to be exported.
  Output resolution.
  Colour profile to use: (Screen, Printer, custom...)
  (Embedd colour profile?)
Perhaps add a Profile argument to the Layout GetImageSource function?

--

Print preview widget:
Need a widget to display a portion of a pixbuf.  The pixbuf will typically be rendered at
72dpi or similar.  Must be able to pan around, and perhaps zoom in.

The print preview process must do a colour-managed proof.

--

| Deal with the negative margins Gutenprint presents in borderless mode


// Create the ~/.photoprint directory if it doesn't exist


// Masking:
// The mask functionality is essentially ready at the imagesource level, but dealing with
// previews in a timely manner is more tricky (due to the way cropping is handled).
// Perhaps the answer is to create a new pixbuf function to apply a mask at the pixbuf level.
// Must apply the mask after cropping - which means the generic rectangle class is needed.
// Create a pixbuf_mask function that will be passed the cropped and rotated pixbuf, along with
// a pixbuf of the mask, and apply it, scaling and rotating the mask as necessary.

// This function will be called immediately prior to rendering the preview, in layout_*.cpp.


| New mode: Carousel
| In this mode, a circle of images will be overlaid and stitched together in a manner suitable
| for printing on a CD.
| *	Makes heavy use of masks, so the preview will have to be re-rendered every time an image
| 	is added.
| *	Might need a progress display.

Needs a control panel to set:
| * overlap size (%)
| * rotation offset (degrees)
| * Get ImageInfo by coordinates.
* Move image forward / backward in list.


Need an interface for cropping images.  Need to store coordinates.  (Will we need to crop
twice?  Or can the rectangle class take into account a previous crop?)


DONE:
| Create a general purpose rectangle class:
|   Dimensions
|   Scale
|   Fit (against another rectangle)
|     Allow cropping
|     Allow rotation
|     H Alignment
|     V Alignment
|   Intersection (against another rectangle)
|   UnionBoundary (against another rectangle)


Can the image view be separated out so that the poster and n-up pageviews
both place imageview widgets on their pages instead of handling items themselves?

The imageview widgets will be responsible for constructing the context menus, which
will provide the following facilities:
(High priority)

Set profile.
Add a menu item for applying masks.
Set rotation -> submenu:
  Automatic
  0
  90
  180
  270
Allow cropping


(It must be possible to grey-out any of these options that are inappropraite for a
particular image.)


Allow saving of "projects" - lists of files, positions, orientations, clip flags, profiles, etc.



DONE:
| Create a routine to build a pixbuf from an ImageSource stack.
| (Must be able to cope with full-size and thumbnail size, because we'll need it both
| for previewing the mask effects, and for a more general print preview.


--

Read up on Pango / text functions.

--

PhotoPrint Options:

  Page Layout:
DONE: Single Image
DONE: Multiple Images
DONE: Poster print

  Colour Management options:
FIXED:    Colour Management dialog doesn't current preserve enough state to support Cancel.
REMOVED:  The rough-cast profile generation doesn't really belong within PhotoPrint, and complicates
    the user-interface unnecessarily.

    Move this facility out into a standalone utility, that can be used to generate an ICC profile
    from the user's settings.
    (Long term: perhaps make a custom widget based on the CIE diagram?)
    Colour Temperature (Degrees K) [  ]

  Add support for Curves

DONE:  Units
//    Combo box to set preferred unit type
//    (Points, Inches, mm, cm).

//  Each widget that might need to display units will provide a set_units function that will
//  refresh the display, converting the units to the new type.


DONE:  Physical dimension widget
//  Need a widget for entering physical dimensions.  The API side can work with points,
//  but a unit parameter is needed.  Apply globally for now.


Selection of Print queue:
DONE: Need to improve selection of printer queue, etc., similar to how the Print plugin handles it.

  Allow saving to a file  (Ignore this case for now; any user advanced enough to need to
  print to a file should be quite capable of prefixing the filename with cat > )
  (Perhaps add TCP/IP support too)


Lower priority:
~~~~~~~~~~~~~~~

PNG Support
  Direct PNG support will make it possible to extract embedded profiles, and fetching
  of 16-bit data.
  (GdkPixbuf has some provision for 16-bit data - how far has it got?)

PostScript / PDF loader
  Add an imagesource for loading a PS file.  This will have to use GhostScript to generate
  a temporary image in /tmp, that will be deleted when the imagesource is disposed.
  (Resolution to use?  360dpi as a default.)
  Pixbuf thumbnail code can't currently deal with PS/PDF, so we'll need the ImageSource->pixbuf
  converter.
  (Just convert first page for now?)

DONE: Rewrite ImageSource_Montage to deal with alpha-channels, blending, etc. rather than
// just straight superimposing.

DONE:  Deal with alpha channels in the TIFF loader and ImageSource stack in general

Add some upsampling functions - bilinear, bicubic, Lanczos, etc.
DONE: Bilinear
DONE: Lanczos-windowed Sinc


Add some sort of sanity check to the option parsing code; parsing a binary file causes
garbage to be printed as the code objects to the nonsense strings.

Create a BoilerPlate section to go at the head of the configuration file, which will
include the program's version string, and a version number readable by the INI code.


Layout_NUp class:
  Allow dropping an image directly into a particular cell.
  Make the cells a drag'n'drop source, so images can be rearranged on the page.

pp_Layout_NUp widget:
  Assign ICC profile
  Remove ICC profile  (Only active if profile has been manually assigned)


Layout_Single class:
  Improve the heuristics regarding rotation.  (Only rotate if necessary)
  Allow the user to choose between Auto, 0, 90, 180 or 270 rotation.

pp_Layout_Single widget:
  Add back the context menu:
  Remove
  Assign ICC profile
  Remove ICC profile  (Only active if profile has been manually assigned)


Layout_Poster class:
DONE:  Need to set individual page dimensions (+ margins)
DONE:  Need to set poster dimensions + overlap.
DONE:  Provide widgets allowing the number of pages horizontally and vertically to be set
DONE:  Provide a final dimension widget; adjusting this will automatically set
       the H/V page counts, while adjusting the H/V page counts will automatically set
       this to the largest size possible with the specified pages.

	The poster class will include a pageextent taken from the printer, and will maintain its
	own paper_width / paper_height from the number of tiles in each direction.
	Also needed are image_width and image_height; if the number of tiles is manually adjusted
	then the image size can be set to the maximum possible;
	
	image_width = imageablewidth*ht - (ht-1)*hoverlap;
	image_height = imageableheight*vt - (vt-1)*voverlap;
	
	ht=(image_width-hoverlap)/(imageablewidth-hoverlap)+0.999;
	vt=(image_width-hoverlap)/(imageablewidth-voverlap)+0.999;
	
	Need to find the coordinates of each section of the image for cropping:
	
	left=h*(imageablewidth-hoverlap);
	right=(h+1)*imageablewidth-h*hoverlap;
	top=v*(imageableheight-voverlap);
	bottom=(v+1)*imageableheight-v*voverlap;
	
	Then scale to imagesource coordinates.


PrinterSelector:
  Need to find some way of grouping the Epson printers - the list is
  ridiculously long now!


Printer Settings:
  Need a "Defaults" button on each page of the optionbook to reset to defaults.

  
Long term:
~~~~~~~~~~

Investigate ways of generating an image containing text; this would allow filenames to be
printed on a contact sheet.

| Implement some masking routines, allowing the addition of artistic edges to the prints.
| This would also be useful for CD-printing, allowing segment-shaped multiple-up layouts.
 
Perhaps add the ability to save an "Album" of images; HTML and PS/PDF export would be nice.

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

Longer term - more generalised page model:

Allow the creation of Page Templates to replace the current n-up page model.
The page class would maintain a list of image "slots", which would be filled one by one
as the user adds images.
This must not conflict with the placing of images at their natural size, or poster printing.

Need support for the following:
* Placing images one by one into multiple pre-defined rectangular slots.
* Adjusting the layout of such slots on the fly.  (Perhaps a word-table-style selector?)
* Placing images in a more freeform manner.
* Placing images into an image "carousel"
  (Objects that adjust their layout to accommodate n images, up to a maximum)
  The N-up layout could be implemented in the same way - but what to do about displaced
  images if the number of cells is reduced?
* Text objects.  (Find a way to render a bitmap text object)
* Poster printing.
  (Page setup option?)
* Moving objects forward or backwards.
* All this must be accessible without becoming significantly more clumsy than the
  current system.

Does all this really belong in PhotoPrint at all - should PhotoPrint be a more minimalist
program?  It already fills its niche well.

Perhaps start a new project, side-by-side and see how this stuff pans out.
Begin with a generic page layout system, with just moving empty boxes around,
with support for resizing, moving, snapping to guides, highlighting, etc.

Need a file format for storing preset layouts.

Each of the element types from photoprint-traditional could be implemented as a particular
type of object in PhotoPrintNG; a control panel for each type could appear in the right
hand panel where they already appear; all that would change is the panel would change as
the user clicks on different types of objects.

* Single image.
  H/V Scale (defaults to natural size)
  
* n-up image table
  Rows/Columns
  Gutters

* Image carousel
  Overlap
  Rotation

* Text box
  Font
  Colour

