rickyzheng-GtkSimpleLayout 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +18 -18
- metadata +1 -1
data/README
CHANGED
@@ -1,13 +1,26 @@
|
|
1
|
-
== GtkSimpleLayout
|
1
|
+
== GtkSimpleLayout ==
|
2
2
|
|
3
|
-
The
|
3
|
+
The GtkSimpleLayout is a helper module for RubyGnome2, it provides a builder
|
4
4
|
style layout producing much better readable UI codes.
|
5
5
|
|
6
6
|
Copy Right 2009, Ricky Zheng <ricky_gz_zheng@yahoo.co.nz>
|
7
7
|
|
8
8
|
Licence: GPLv2
|
9
9
|
|
10
|
-
==
|
10
|
+
== Main functions ==
|
11
|
+
* builder-style layout
|
12
|
+
* UI group
|
13
|
+
* attribute proxy
|
14
|
+
* event handler map
|
15
|
+
* sigleton event helper
|
16
|
+
* component reference by name
|
17
|
+
* inspector
|
18
|
+
|
19
|
+
About inspector:
|
20
|
+
- set environment variable INSPECTOR_ENABLE=1 will enable inspector
|
21
|
+
- inspector boxes border width can be setup by e.g. INSPECTOR_BORDER_WIDTH=5
|
22
|
+
|
23
|
+
== Example ==
|
11
24
|
|
12
25
|
require 'gtk2'
|
13
26
|
require 'simple_layout'
|
@@ -24,21 +37,8 @@ class MyWin < Gtk::Window
|
|
24
37
|
|
25
38
|
def my_layout
|
26
39
|
vbox do
|
27
|
-
|
28
|
-
|
29
|
-
label 'Label 1'
|
30
|
-
button 'Button 1, fixed'
|
31
|
-
button "Button 2, I'm flexiable", :layout => [true, true]
|
32
|
-
end
|
33
|
-
end
|
34
|
-
frame 'frame 2' do
|
35
|
-
vbox do
|
36
|
-
label 'Label 2'
|
37
|
-
label 'Label 3'
|
38
|
-
button 'Button 3'
|
39
|
-
button 'Button 4'
|
40
|
-
end
|
41
|
-
end
|
40
|
+
label 'Hello'
|
41
|
+
button 'World !'
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|