public
Fork of danlucraft/zerenity
Description: Pure Ruby implementation of Gnome's Zenity with extra features
Homepage:
Clone URL: git://github.com/farrel/zerenity.git
zerenity / README
100644 64 lines (49 sloc) 1.649 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
= Zerenity
 
== Version
1.3
 
== Author
Farrel Lifson http://www.lifson.info http://www.aimred.com
 
== Contributors
Daniel Lucraft http://www.daniellucraft.com
 
== Synopsis
Zerenity is an almost clone of Zenity(http://freshmeat.net/projects/zenity) for Ruby. It allows for the easy creation of simple graphical dialogs from a Ruby script.
 
== Features
Zerenity allows for the creation of the following dialogs
* Date selection
* Text entry
* Error display
* File/directory selection
* Information display
* List display and selection
* Progress display
* Question display
* Text information display and editing
* Warning display
* Sliding scales
* Color selection
 
== Dependencies
Zerenity requires GTK2(http://www.gtk.org) and Ruby/GTK2(http://ruby-gnome2.sourceforge.jp/hiki.cgi).
 
== Installation
Zerenity is avaiable as a Ruby gem. Links to the latest release can be found at http://www.aimred.com/files/projects/zerenity.
 
The code is also available via it's Github repository at http://github.com/farrel/zerenity/tree/master
 
== Example Usage
=== User Input and Display
 require 'zerenity'
 
 if (name = Zerenity::Entry(:text=>"What is your name?"))
   Zerenity::Info(:text=>"Hello #{name}")
 else
   puts "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
(c) 2006 - 2009 Farrel Lifson