Zerenity

Summary

Zerenity is an API for Ruby that allows for the easy creation of simple graphical dialogs from your application.

Version

1.3

Features

Zerenity allows for the creation of the following dialogs

Dependencies

Zerenity requires GTK2 and Ruby/GTK2.

Installation

Zerenity is avaiable as a Ruby gem from http://www.aimred.com/gems/zerenity-1.3.gem.

The code is also available via it’s Git repository at Github.

Example Usage

User Input and Display

 require 'zerenity'

 if (name = Zerenity::Entry(:text=>"What is your name?")) 
   Zerenity::Info(:text=>"Hello #{name}")
 else
    Zerenity::Info(:text=>"No name entered") 
 end

Progress

 require 'zerenity'

 fileList = filesToProcess(folder)
 Zerenity::Progress(:text=>'Processing files',:autoClose=>true) do |progress|
  fileList.each_index do |file,index|
    processFile(file)
    progress.update(index/fileList.length,"#{100*index/fileList.length}% processed...")
  end
 end
 

License

Zerenity is released under the BSD license.

Copyright

© 2006 – 2013 Aimred CC