[Openmcl-devel] Lisp User Interface LUI

Alexander Repenning ralex at cs.colorado.edu
Sat Jan 10 07:05:20 UTC 2009


On Jan 9, 2009, at 12:58 AM, Terje Norderhaug wrote:

> On Jan 8, 2009, at 9:41 PM, Terje Norderhaug wrote:
>> On Jan 2, 2009, at 11:30 AM, Alexander Repenning wrote:
>>> This may be a good moment to discuss some of the ideas regarding
>>> the creation of LUI, the "Lisp User Interface as a cross platform,
>>> but Mac first" open source GUI tool.
>>
>> One technique that I have found very useful through the years is to
>> automatically generate the user interface from extended/amended type
>> declarations of the information to be presented and/or modified.  I
>> know other LISP developers are using similar strategies.
>
> Applying this to the previous examples, consider the "OpenGL 3D"  
> window in the earliers posting.  It contains sliders that (with  
> style information separated out) are represented by elements like  
> this in an XML based layout template:
>
>     <slider name="red" action="adjust-vertex-color-action" max- 
> value="1.0"/>
>
> Say the LISP application declares the red, green and blue editable  
> variable values to be real numbers between 0.0 and 1.0, using  
> constructs like:
>
>    (defvalue red-vertex 0.0
> 	(:documentation "the amount of red color")
> 	(:name "red")
>        (:type (real 0.0 1.0))
>        (:action adjust-vertex-color-action)
>        (:group color))


Makes sense. Have a peek at:

http://www.cs.colorado.edu/~ralex/papers/PDF/AVI08_end-user_visualizations.pdf 
   and
http://www.cs.colorado.edu/~ralex/papers/PDF/AVI08demo.pdf


>
>
> This declaration provides sufficient information to infer that the  
> red-quantity can be presented and modified using a slider on a Mac,  
> and that the value is between 0 and 1. Thus an external layout for  
> the window would no longer have to specify the use of sliders nor  
> the max value, but may use a more general value placeholder. This  
> leaves more to the user interface engine, opening for automatically  
> adapting the presentation to the platform and/or context.
>
> <unknown.tiff>
> Using that the application has more information about the editable  
> and presentable information, the layout might be simplified and more  
> of the presentation can be defined in the stylesheet (or  
> alternatively inferred by the interface engine), perhaps leading to  
> a layout like e.g. this:
>
> <application-window>
>   <value name="red"/>
>   <value name="green"/>
>   <value name="blue"/>
>  <visual name="opengl"/>
>  <group>
>    <visual name="opengl2"/>
>    <visual name="opengl3"/>
>  </group>
> </application-window>
>
> Here is a possible corresponding stylesheet:
>
> <style select="application-window" title="OpenGL 3D" margin="12"  
> width="300" height="300" display="column" align="stretch"  
> valign="stretch" />
> <style select="value" flex="1" display="row" minimize="vertical"  
> align="stretch" valign="middle"/>
> <style select="value#red" label="Red">
> <style select="value#green" label="Green">
> <style select="value#blue" label="Blue">
> <style select="value:label" align="right" width="50"/>
> <style select="visual" vflex="1"/>
> <style select="visual#opengl" display="row" margin-top="12/>
> <style select="group" display="row" align="stretch" valign="stretch"  
> vflex="2" margin-top="12"/>
> <style select="visual#opengl2" margin-right="6"/>
> <style select="visual#opengl3" margin-left="6"/>
>
> Processing this information, the user interface engine can build the  
> same window as the original "OpenGL 3D" application-window XMLisp  
> template.

I think one could do this with X-expression transformers.

alex


>
>
> -- Terje Norderhaug
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel

Prof. Alexander Repenning

University of Colorado
Computer Science Department
Boulder, CO 80309-430

vCard: http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clozure.com/pipermail/openmcl-devel/attachments/20090110/d6709f2e/attachment.html>


More information about the Openmcl-devel mailing list