<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://stlab.adobe.com/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://stlab.adobe.com/wiki/index.php?title=Picture_View&amp;feed=atom&amp;action=history</id>
		<title>Picture View - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://stlab.adobe.com/wiki/index.php?title=Picture_View&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://stlab.adobe.com/wiki/index.php?title=Picture_View&amp;action=history"/>
		<updated>2013-06-19T15:38:18Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.0</generator>

	<entry>
		<id>http://stlab.adobe.com/wiki/index.php?title=Picture_View&amp;diff=1434&amp;oldid=prev</id>
		<title>FosterBrereton: initial population</title>
		<link rel="alternate" type="text/html" href="http://stlab.adobe.com/wiki/index.php?title=Picture_View&amp;diff=1434&amp;oldid=prev"/>
				<updated>2006-06-21T19:34:32Z</updated>
		
		<summary type="html">&lt;p&gt;initial population&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Basic Description==&lt;br /&gt;
&lt;br /&gt;
The [http://opensource.adobe.com/gil/ Generic Image Library (GIL)] was added to ASL 1.0.12. &amp;lt;code&amp;gt;adobe::image_t&amp;lt;/code&amp;gt; is essentially a placeholder for displaying a picture in a dialog.&lt;br /&gt;
&lt;br /&gt;
==Semantics / Rationale==&lt;br /&gt;
&lt;br /&gt;
The rationale for the picture widget is a visually rich label, used to enhance the user experience with &amp;quot;metadata&amp;quot; that helps the user accomplish their task within the dialog. This is simply an icon in an alert dialog or a picture. Eventually we would like to consider adding functionality to the point of making it a preview pane that shows realtime updates of the command parameters in action.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
A Picture View widget should be able to do the following:&lt;br /&gt;
* Bind to and display a GIL image in the Adam sheet.&lt;br /&gt;
* Report its best bounds based on the GIL image it's bound to.&lt;br /&gt;
** Trigger a relayout when the image size changes.&lt;br /&gt;
* Show an image scaled to fit inside the bounds of the Picture View (stretched and scaled).&lt;br /&gt;
* Alpha-blend the image onto the UI if the image has an alpha channel.&lt;br /&gt;
&lt;br /&gt;
==API==&lt;br /&gt;
&lt;br /&gt;
===Location===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;adobe/future/widgets/headers/image_t.hpp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ASL Public Interface===&lt;br /&gt;
&lt;br /&gt;
The picture widget has changed quite a bit over the past several days. Instead of a standalone class with encapsulated functionality, we have decided to make it a platform-specific struct that is accessed with several free functions. The interface for this struct is common for all platforms, however the data contained within the struct varies on a platform basis:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct image_t&lt;br /&gt;
{&lt;br /&gt;
    image_t(GIL::rgba8_image&amp;amp; image);&lt;br /&gt;
&lt;br /&gt;
    image_t(const image_t&amp;amp; rhs);&lt;br /&gt;
&lt;br /&gt;
    image_t&amp;amp; operator=(const image_t&amp;amp; rhs);&lt;br /&gt;
&lt;br /&gt;
    /* .... member variables are implementation-defined .... */&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The free functions for the platform struct also have the same interface across platform implementations, but their bodies are platform-specific. The signatures are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void initialize(image_t&amp;amp; value);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
initialize is not meant to be used outside of the platform implementation -- it is used to execute common code between the constructors of the struct&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
extents_t::slice_t measure_horizontal(image_t&amp;amp; value);&lt;br /&gt;
extents_t::slice_t measure_vertical(image_t&amp;amp; value, const extents_t::slice_t&amp;amp; horizontal);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two functions form the sum total of the measurement of the widget to be returned to a piece of code requiring them (for instance, a dialog layout engine). This has been split into two functions because we are exploring the concept space ([http://video.google.com/videoplay?docid=-7718210058143075450 cowbell]) of what it means to be a &amp;quot;UI Element&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void place(image_t&amp;amp; value, const point_2d_t&amp;amp; position, const extents_t&amp;amp; extents);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the place call common to all the ASL widgets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void enable(image_t&amp;amp; value, bool make_enabled);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows for enabling and disabling the widget. We're not quite sure what this &amp;quot;means&amp;quot; for an image_t, but have it here as we have been exploring the UI Element concept. Enablement is definitely a part of being a UI Element, but we're not convinced if it is a requirement or, if it is, whether it belongs in the UI Element concept directly or as part of a refined concept.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void set(image_t&amp;amp; value, GIL::rgba8_image&amp;amp; image);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be used to refresh the image at any point after the widget has been constructed. Currently this does not trigger a relayout of the view system to which the image_t is attached; the new image will be scaled to fit into the original bounds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool operator==(const adobe::image_t&amp;amp; x, const adobe::image_t&amp;amp; y);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks for equality. Currently this is componentwise comparison of the struct member variables.&lt;br /&gt;
&lt;br /&gt;
==Related Work==&lt;br /&gt;
&lt;br /&gt;
We have work on a [[GIL File Format Import/Export Factory]] in place (with budding documentation).&lt;/div&gt;</summary>
		<author><name>FosterBrereton</name></author>	</entry>

	</feed>