From: Michael Davis Date: 2002-03-17T07:11:06+09:00 Subject: ANN: Locana GUI and GUI Builder version 0.81 I am pleased to announce release 0.81 of Locana. Locana is a GUI interface for Ruby that includes a GUI Builder. More information can be found at http://www.locana.org. Here is a brief list of the changes since 0.80: - Added an applets directory containing several little applets that provide some good examples of how to use Locana. Currently, there are four versions of a simple calculator each showing a different way to put objects into a window. - Added an HTML widget binding and a HTTP server. Start the HTTP server (locana_server.rb) and you can run Ruby applets with Locana using a web browser. Ruby and Locana only need to be installed on the computer running locana_server. Here are some working examples: This runs a test applet: http://locana.org:8080/tst/tst_locana.rb This allows you to run the various apples: http://locana.org:8080/applets/applets.rb This shows how many times the server has responded to requests: http://locana.org:8080/locana_stats - Converted the x,y,w,h parameters to an attribute. You can now position objects using the new :pos=>[x,y,w,h] attribute. X and y is the position of the object in pixels within its parent. W and h are optional and specify the size of the object. This makes it easy to add new layout managers to Locana in the future. - Added the following new object attributes allowing greater flexibility for putting objects in a window: > :sticky => 'nsew' allows you to 'stick' the object to one or more of it's parents borders. Any combination of nsew can be used. > :above => :object_name will place the object directly above :object_name. > :below => :object_name will place the object directly below :object_name. > :before => :object_name will place the object directly before :object_name. > :after => :object_name will place the object directly after :object_name. > :spanw => :object_name will cause this objects width to match :object_name.x + :object_name.w. > :spanh => :object_name will cause this objects height to match :object_name.y + :object_name.h. > :startx => object_name will cause this objects x to match :object_name.x. > :starty => :object_name will cause this objects y to match :object_name.y. There are examples of the using new attributes in tst_locana.rb (click on the 'Test packing' or 'Test spanning' buttons) and the four calculator.rb applets available from applets.rb (click the applets.rb link provided above). - All attribute names and object names have been converted from strings to symbols. For example 'text'=>'test this', 'value'=>3 is now :test=>'test this', :value=>3. - Added a module called Locana making it easier/simpler to access many of the Locana objects. - Added a missing_method() that supports a lot of new possibilities. For example, you can change an attribute of an object using: :object_name.value = 5. Where value is the :value attribute (or any attribute) of an object. Events are also supported, for example: :object_name.after_update = proc{|event| print 'do something with the after_update event'} What's next: - add support for menus, pop-up menus, dialogs, and images. - add new attributes to support color and fonts. Enjoy! -- Thanks, Michael Davis Database Architect and Senior Software Engineer, Seva Inc. Email: mdavis@sevainc.com