On 07/05/2009, at 2:01 PM, Bridger Maxwell wrote:

I have a project in which I need to construct an interface, composed of
several "widgets," dynamically. Basically, when the user starts the
application they choose which components they will be working with. Each of these components will have a nib file, with a single view. They will all be different sizes. I need to lay those out on a single screen. I want it to be fairly predictable, so removing one widget doesn't completely rearrange the
entire interface.

I have been thinking about this problem for a while, and still have nothing to show for it. I am not even sure where to start. I would imagine this is a common problem, and has been tackled many times before me (for example, Expose lays out all of the windows very nicely). Do you have any advice on
where to look, or a neat algorithm to use?


It's a bit hard to visualise what you're really after, from your description.

Automatic layout can be done in lots of different ways, but its hard to advise on where to look for more info without having a better idea of what you want.

I believe the algorithm used by Exposé is patented by the way, so you probably couldn't use it if you wanted to (unless Apple "expose" the algorithm in a official API, which currently isn't the case).

Googling for "rectangle tiling algorithm" might help you.

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to