UI Framework

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

Hey all,

I've built a UI Framework for Photoshop, and of course it works perfectly in all the Adobe apps.

Basically it works in a similar way to the ScriptUI API, but handles all the boring stuff like local layout of items into columns and rows, margins and spacing, nested panels (and resizing of contained controls), radiobutton and checkbox arrays, collated return values, etc.

The following dialog was created with this code.

Image

All controls are created with a single call. For example, the following code creates a labelled dropdown within a horizontal group, with 2 items, and data values, and a separator:

Code: Select all

win.add.dropdown('links', 'Link to', ['Select...', '-', 'Text elements', 'Link elements'], ['', 'text', 'link']);
All added controls are returned as references so can be easily set up with listeners, and the result of a show() is returned as an object of named values, so you can then access values, so in the case above:

Code: Select all

property.value = data.links.value;
You can also access both a "panels" and "controls" array on the original Dialog object as well, if you want access to the raw elements.

Lastly, you're not restricted to using only the framework commands either, for example if you want to add your own layouts in, just mix in standard ScriptUI code (see the lines at the end of the example code).

More features are planned too, and I'm going to publish it soon. Let me know if it sounds useful.

Cheers,
Dave
djbennyj
Posts: 11
Joined: April 7th, 2009, 5:47 am

Hey !!
Sounds awsome.

I'm looking forward to your release.

Thx to you, sharing your work.
Yenaphe
Posts: 84
Joined: February 3rd, 2009, 6:30 pm
Location: Paris - France
Contact:

It sounds terrific. I'll looking forward the release !
Post Reply