Layout-Like User Interface

When developing projects for general use audience I like to use a single window interface as opposed to multiple windows which can cause confusion and accidental rearrangement and the like. However when developing the interface I typically will test out concepts in individual windows.

What I would like is the ability to then very easily create a new master window with the individual graphs and control panels placed as needed. The idea is similar to layout mode, but would include control panels. Also everything would be live and controllable as in the individual graphs would be.

For Example: My current project has:
Control Panel with the data file information and loading options
A Main image viewer with some line profiles as a separate graph
An secondary image that has been processed with a low pass FFT filter
Another secondary image that has been processed with a gaussian blur feature
A small image graph showing where on the larger sample the image comes from

I would love to put everything on a single window and yes I know I can do that with separate axis and the like, but I am requesting a simpler way of doing this.

Andy
I believe you can do this using a control panel with subwindows. A control panel can include controls, graph subwindows and control panel subwindows.

Execute:
DisplayHelpTopic "Embedding and Subwindows"


Note the CWT control panel shown there. It is similar to what you are describing. To see it choose File->Example Experiments->Analysis->CWT Demo.

Programming with subwindows can be tricky so make sure to read the documentation carefully.
With one graph/image window and a control panel, I am generally inclined to attach the control panel to the main graph/image window rather than embed the graph/image in the panel. I think the code syntax to attach a panel to a window is cleaner overall than that required to embed and manage a window in a panel.

For more than that, I would first group the number of items on the screen in to useable "chunks". For example, in your case, I might consider how these "chunks" play together ...

* file selection and loading panel
* main image with line profile manipulator
* secondary image with filter-of-choice view

I might then ask questions to further reduce or combine the "chunks" ... Does the file selection and loading panel really have to be somewhere on screen after the image is loaded?

After that, I would have to think about how to build the interface "chunks" together as one with attachment or embedding. That seems to be where you are now, and beyond the easier (IMO) option of attaching a panel to a window rather than embedding a window in to a panel, I can offer nothing simpler.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
Hi,

I tried the insert sub window and it has limitations with respect to the placement of controls. I have controls in the original graph and when placed as a sub window it appears as if the controls get placed with their original coordinates and sizes with respect to the host window and not relative to the sub window. So it goes part way to my desired goal but would still require a significant amount of rework.

Thanks for the ideas an inputs. The decision on keeping various windows open is always worth considering when designing an interface for another user. In this case the request was to be able to compare two different filtering techniques. Switching between two images versus having two images on the screen, drove me to the decision to have them side by side along with the original. In this case visual memory is not good enough to allow switching as compared to side be side.
The file open decision was because the file name (or really directory) was recorded there and I did not want to have to propagate it to all the graphs. The concern being if the user copies one graph and inserts into another document (Powerpoint for example) the traceability is lost and the wrong conclusion WILL BE DRAWN.

I do stand by my original idea on how to make Igor better. The layout feature goes a long way to arranging multiple graphs into a complete interface and I think it could be extended to good value. I do appreciate suggestions.
A few further suggestions if I might ...

With regard to the need to keep the file name always visible, perhaps you might use a floating panel with just this as the text ...

Function ShowFileNamePanel(fStr)
    string fStr
   
    NewPanel/K=1/FLT=1/W=(150,50,308,90) as "File Name"
    SetDrawLayer UserBack
    SetDrawEnv fsize= 18
    DrawText 11,30, fStr
    return 0
end


With regard to confusion when a user rearranges the windows, perhaps you could force the windows to stay put and/or include a "reset window positions" option. One way would be to have a hook function that senses when a window is moved and force it back to fixed coordinates. Another is to use window positioning commands that save and restore window coordinates, coupled with a menu or button to invoke them. WaveMetrics has them (somewhere I cannot remember), and the package ScreenSizer has them as SaveWinCoords or RestoreWinCoords ... http://www.igorexchange.com/project/ScreenSizer. This would allow you to design your package with separate windows as you want, fix the coordinates in a grouping, and then force that group to stay together without the use of attaching or embedding code.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville