From: Ralph T. <ra...@gm...> - 2006-08-10 21:33:02
|
Hi. I have developed ASL out in a certain direction, more details here: http://www.missioncode.org/ . I am currently building a little photo app that uses the GTK+ toolkit (and is developed and tested on Linux). Some of the big changes I made are: 1. Binding to things in my app that aren't in the Adam sheet, for example I can make a popup menu that lists all of the digital cameras plugged into the system and a button to import photos like this: popup( bind: gphoto_selected_camera(), items: gphoto_camera_list() ); button( name: "Import", action: gphoto_import( album: "Test Album" ) ); 2. Support for custom layouts in Eve. The only one I have written so far is "table", which lays it's children out like most icon views do (in a grid that shows more items when the container is bigger). 3. Generating a list of views from an array, so I can make a set of icons corresponding to the photos in an album in a table arrangement like this (this example is simlified a little, I have a few more abstractions over files, etc. in the real thing): table() { generator( bind: db_query( "select filename from photos where album = 'Test Album';" ), iterator: @i ) { icon( filename: @i ); text( name: basename( @i ) ); // binding to a function of the filename. } } I also have a whole bunch of different things that I can bind to, including inline Adam rules, database queries (which go into arrays of dictionaries) and string substitutions. It's also possible to compose these bindable objects (called "datapumps" in my documentation, but still binder_t in my code) together, e.g.: db_query( substitute( "select filename from photos where album = '@album;';", { album: @cell_with_album_name_in } ) ); I'm getting close to making another release, unfortunately it will be licensed GPL rather than MIT as it is using two small GPL libraries (a widget and some code to reorient images and embedded thumbnails according to the EXIF orientation tag). But I plan on rewriting these libraries for the next release, and then I'll be able to license my code as MIT again. I'm interested in getting some of these changes into ASL (or better versions of my changes), particularly the ability to bind to other parts of the app. Ralph http://www.missioncode.org/ On 8/9/06, Sean Parent <sp...@ad...> wrote: > Moving the conversation to the developer list - > > > Seriously, I > > am more interested with the dynamic/data-driven nature of > > GUI description. My interest lies in dynamic layouting and > > its binding to application code; again in a declarative form. > > I've written such a GUI framework before, heavily influenced by > > Fresco. > > Very cool - the basic model we're following is: > > Define the various Concepts involved in UI - write the UI components > as models of these concepts. We're using type erasure techniques (see > the regular_object library) to provide runtime polymorphism with > value semantics and without imposing inheritance hierarchies on the > individual types. > > We currently have three Concepts governing a "widget" - > > Controller - a controller allows you to monitor it by registering a > function to be called. A call to the function is a request to change > a model (in MVC terms - not generic terms - terminology gets > confusing!). We've started to adopt a PropertyModel as the MVC model. > A controller can also be notified that it is disconnected when it can > not have any effect on the model. A controller has an associated > model_type which it can manipulate. > > View - a view has a single function, display() which is called with a > model_type (also an associated type for a View). Controller and View > are separate concepts - calling display() on a View does not end up > invoking the Controller monitor function. > > Placeable - a Placable object can be measured (providing an extents > struct) and can be placed within a coordinate space. > > Placable objects connect to the layout library (Eve). > Controllers and Views connect to the property model library (Adam). > > > I'm just starting to play around with ASL and I am not quite > > sure as to what extent ASL will cover. For example, I am also > > quite interested with vector based (scalable) GUIs. I'm sure > > Adobe has its own vector graphics engine. Will such an engine > > be available with ASL? Right now, I'm particularly interested > > with anti-grain (http://www.antigrain.com/). It would be interesting > > to have a vector based extension for the Eve layout engine. > > Adobe has a few vector based libraries (key ones for rendering PDF > and Flash). I've yet to convince either team to open source their > efforts, however, Flash is fairly programmable through the Flex > product - but the programming happens in ActionScript (a variant of > JavaScript) - but one possibility is to port the libraries to > ActionScript. My understanding is that Flex components provide a rich > enough geometry to be used effectively with something like the layout > library. > > I'd also be interested in integration with antigrain (I've been > keeping my eye on the project, just haven't had the bandwidth to do > anything). We have an image widget which ties our Generic Image > Library (a raster library) into the rest but having something like > antigrain rendering into a GIL image and adding an event model for > interaction would let us extend the libraries into document content. > > Long term - I'm interested in building out all the parts needed for a > generic application - so we've got a lot of opportunity and a long > way to go. > > Sean > > > |