pimento 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/{spec/spec.opts → .rspec} +0 -0
- data/Gemfile +4 -0
- data/README.rdoc +6 -5
- data/Rakefile +6 -41
- data/examples/banner.rb +74 -0
- data/lib/pimento.rb +4 -2
- data/lib/pimento/canvas.rb +55 -13
- data/lib/pimento/component.rb +69 -0
- data/lib/pimento/component/bevel_button.rb +5 -0
- data/lib/pimento/component/check_box.rb +5 -0
- data/lib/pimento/component/circular_progress_indicator.rb +7 -0
- data/lib/pimento/component/disclosure_button.rb +5 -0
- data/lib/pimento/component/disclosure_triangle.rb +5 -0
- data/lib/pimento/component/help_button.rb +5 -0
- data/lib/pimento/component/horizontal_slider.rb +5 -0
- data/lib/pimento/component/popup_button.rb +5 -0
- data/lib/pimento/component/progress_indicator.rb +7 -0
- data/lib/pimento/component/round_button.rb +5 -0
- data/lib/pimento/component/rounded_rect_button.rb +5 -0
- data/lib/pimento/component/search_field.rb +5 -0
- data/lib/pimento/component/vertical_slider.rb +5 -0
- data/lib/pimento/renderable.rb +8 -0
- data/lib/pimento/util.rb +11 -0
- data/pimento.gemspec +17 -59
- data/spec/fixtures/1dot.xib +207 -222
- data/spec/fixtures/empty.xib +164 -174
- data/spec/pimento_spec.rb +2 -0
- data/spec/spec_helper.rb +7 -4
- data/template/bevel_button_ro.xml.erb +24 -0
- data/template/{canvas.xib.erb → canvas.xml.erb} +15 -52
- data/template/check_box_ro.xml.erb +31 -0
- data/template/circular_progress_indicator_ro.xml.erb +10 -0
- data/template/disclosure_button_ro.xml.erb +44 -0
- data/template/disclosure_triangle_ro.xml.erb +24 -0
- data/template/help_button_ro.xml.erb +24 -0
- data/template/horizontal_slider_ro.xml.erb +27 -0
- data/template/or_1.xml.erb +5 -0
- data/template/or_2.xml.erb +14 -0
- data/template/popup_button_ro.xml.erb +23 -0
- data/template/progress_indicator_ro.xml.erb +10 -0
- data/template/round_button_ro.xml.erb +24 -0
- data/template/rounded_rect_button_ro.xml.erb +24 -0
- data/template/search_field_ro.xml.erb +39 -0
- data/template/vertical_slider_ro.xml.erb +26 -0
- metadata +98 -69
- data/.document +0 -5
- data/examples/hello.rb +0 -32
- data/lib/pimento/dot.rb +0 -12
data/lib/pimento/util.rb
ADDED
data/pimento.gemspec
CHANGED
@@ -1,65 +1,23 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
5
3
|
|
6
|
-
|
7
|
-
s.name = %q{pimento}
|
8
|
-
s.version = "0.0.1"
|
4
|
+
require 'pimento'
|
9
5
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"LICENSE",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".gitignore",
|
22
|
-
"LICENSE",
|
23
|
-
"README.rdoc",
|
24
|
-
"Rakefile",
|
25
|
-
"VERSION",
|
26
|
-
"examples/hello.rb",
|
27
|
-
"lib/pimento.rb",
|
28
|
-
"lib/pimento/canvas.rb",
|
29
|
-
"lib/pimento/dot.rb",
|
30
|
-
"pimento.gemspec",
|
31
|
-
"spec/fixtures/1dot.xib",
|
32
|
-
"spec/fixtures/empty.xib",
|
33
|
-
"spec/pimento_spec.rb",
|
34
|
-
"spec/spec.opts",
|
35
|
-
"spec/spec_helper.rb",
|
36
|
-
"template/canvas.xib.erb"
|
37
|
-
]
|
38
|
-
s.homepage = %q{http://github.com/youpy/pimento}
|
39
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
40
|
-
s.require_paths = ["lib"]
|
41
|
-
s.rubygems_version = %q{1.3.6}
|
42
|
-
s.summary = %q{Draw graphics using Mac OS X GUI Components}
|
43
|
-
s.test_files = [
|
44
|
-
"spec/pimento_spec.rb",
|
45
|
-
"spec/spec_helper.rb",
|
46
|
-
"examples/hello.rb"
|
47
|
-
]
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.authors = ["youpy"]
|
8
|
+
gem.email = ["youpy@buycheapviagraonlinenow.com"]
|
9
|
+
gem.description = %q{Draw graphics using Mac OS X GUI Components}
|
10
|
+
gem.summary = %q{Draw graphics using Mac OS X GUI Components}
|
11
|
+
gem.homepage = ""
|
48
12
|
|
49
|
-
|
50
|
-
|
51
|
-
|
13
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
14
|
+
gem.files = `git ls-files`.split("\n")
|
15
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
gem.name = %q{pimento}
|
17
|
+
gem.require_paths = ["lib"]
|
18
|
+
gem.version = Pimento::VERSION
|
52
19
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
else
|
57
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
58
|
-
s.add_dependency(%q<libxml-ruby>, [">= 0"])
|
59
|
-
end
|
60
|
-
else
|
61
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
62
|
-
s.add_dependency(%q<libxml-ruby>, [">= 0"])
|
63
|
-
end
|
20
|
+
gem.add_dependency('libxml-ruby')
|
21
|
+
gem.add_development_dependency('rspec', ['~> 2.8.0'])
|
22
|
+
gem.add_development_dependency('rake')
|
64
23
|
end
|
65
|
-
|
data/spec/fixtures/1dot.xib
CHANGED
@@ -1,225 +1,210 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
|
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
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
<object class="NSArray" key="dict.sortedKeys">
|
211
|
-
<bool key="EncodedWithXMLCoder">YES</bool>
|
212
|
-
</object>
|
213
|
-
<object class="NSMutableArray" key="dict.values">
|
214
|
-
<bool key="EncodedWithXMLCoder">YES</bool>
|
215
|
-
</object>
|
216
|
-
</object>
|
217
|
-
<nil key="sourceID"/>
|
218
|
-
<int key="maxID">4</int>
|
219
|
-
</object>
|
220
|
-
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
221
|
-
<int key="IBDocument.localizationMode">0</int>
|
222
|
-
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
|
223
|
-
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
224
|
-
</data>
|
3
|
+
<data>
|
4
|
+
<int key="IBDocument.SystemTarget">1050</int>
|
5
|
+
<string key="IBDocument.SystemVersion">9L30</string>
|
6
|
+
<string key="IBDocument.InterfaceBuilderVersion">677</string>
|
7
|
+
<string key="IBDocument.AppKitVersion">949.54</string>
|
8
|
+
<string key="IBDocument.HIToolboxVersion">353.00</string>
|
9
|
+
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
10
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
11
|
+
<integer value="2"/>
|
12
|
+
</object>
|
13
|
+
<object class="NSArray" key="IBDocument.PluginDependencies">
|
14
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
15
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
16
|
+
</object>
|
17
|
+
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
18
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
19
|
+
<object class="NSArray" key="dict.sortedKeys">
|
20
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
21
|
+
</object>
|
22
|
+
<object class="NSMutableArray" key="dict.values">
|
23
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
24
|
+
</object>
|
25
|
+
</object>
|
26
|
+
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
27
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
28
|
+
<object class="NSCustomObject" id="1001">
|
29
|
+
<string key="NSClassName">NSObject</string>
|
30
|
+
</object>
|
31
|
+
<object class="NSCustomObject" id="1003">
|
32
|
+
<string key="NSClassName">FirstResponder</string>
|
33
|
+
</object>
|
34
|
+
<object class="NSCustomObject" id="1004">
|
35
|
+
<string key="NSClassName">NSApplication</string>
|
36
|
+
</object>
|
37
|
+
<object class="NSWindowTemplate" id="1005">
|
38
|
+
<int key="NSWindowStyleMask">15</int>
|
39
|
+
<int key="NSWindowBacking">2</int>
|
40
|
+
<string key="NSWindowRect">{{120, 240}, {100, 200}}</string>
|
41
|
+
<int key="NSWTFlags">536870912</int>
|
42
|
+
<string key="NSWindowTitle">Window</string>
|
43
|
+
<string key="NSWindowClass">NSWindow</string>
|
44
|
+
<nil key="NSViewClass"/>
|
45
|
+
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
|
46
|
+
<object class="NSView" key="NSWindowView" id="1006">
|
47
|
+
<reference key="NSNextResponder"/>
|
48
|
+
<int key="NSvFlags">256</int>
|
49
|
+
<object class="NSMutableArray" key="NSSubviews">
|
50
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
51
|
+
<object class="NSButton" id="741820390">
|
52
|
+
<reference key="NSNextResponder" ref="1006"/>
|
53
|
+
<int key="NSvFlags">268</int>
|
54
|
+
<string key="NSFrame">{{-4, 156}, {39, 38}}</string>
|
55
|
+
<reference key="NSSuperview" ref="1006"/>
|
56
|
+
<bool key="NSEnabled">YES</bool>
|
57
|
+
<object class="NSButtonCell" key="NSCell" id="741820391">
|
58
|
+
<int key="NSCellFlags">67239424</int>
|
59
|
+
<int key="NSCellFlags2">0</int>
|
60
|
+
<string key="NSContents"/>
|
61
|
+
<object class="NSFont" key="NSSupport">
|
62
|
+
<string key="NSName">LucidaGrande</string>
|
63
|
+
<double key="NSSize">1.000000e+01</double>
|
64
|
+
<int key="NSfFlags">2843</int>
|
65
|
+
</object>
|
66
|
+
<reference key="NSControlView" ref="741820390"/>
|
67
|
+
<int key="NSButtonFlags">-2037645057</int>
|
68
|
+
<int key="NSButtonFlags2">135</int>
|
69
|
+
<string key="NSAlternateContents"/>
|
70
|
+
<string key="NSKeyEquivalent"/>
|
71
|
+
<int key="NSPeriodicDelay">200</int>
|
72
|
+
<int key="NSPeriodicInterval">25</int>
|
73
|
+
</object>
|
74
|
+
</object>
|
75
|
+
</object>
|
76
|
+
<string key="NSFrameSize">{100, 200}</string>
|
77
|
+
<reference key="NSSuperview"/>
|
78
|
+
</object>
|
79
|
+
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
|
80
|
+
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
|
81
|
+
</object>
|
82
|
+
</object>
|
83
|
+
<object class="IBObjectContainer" key="IBDocument.Objects">
|
84
|
+
<object class="NSMutableArray" key="connectionRecords">
|
85
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
86
|
+
</object>
|
87
|
+
<object class="IBMutableOrderedSet" key="objectRecords">
|
88
|
+
<object class="NSArray" key="orderedObjects">
|
89
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
90
|
+
<object class="IBObjectRecord">
|
91
|
+
<int key="objectID">0</int>
|
92
|
+
<object class="NSArray" key="object" id="1002">
|
93
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
94
|
+
</object>
|
95
|
+
<reference key="children" ref="1000"/>
|
96
|
+
<nil key="parent"/>
|
97
|
+
</object>
|
98
|
+
<object class="IBObjectRecord">
|
99
|
+
<int key="objectID">-2</int>
|
100
|
+
<reference key="object" ref="1001"/>
|
101
|
+
<reference key="parent" ref="1002"/>
|
102
|
+
<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
|
103
|
+
</object>
|
104
|
+
<object class="IBObjectRecord">
|
105
|
+
<int key="objectID">-1</int>
|
106
|
+
<reference key="object" ref="1003"/>
|
107
|
+
<reference key="parent" ref="1002"/>
|
108
|
+
<string key="objectName">First Responder</string>
|
109
|
+
</object>
|
110
|
+
<object class="IBObjectRecord">
|
111
|
+
<int key="objectID">-3</int>
|
112
|
+
<reference key="object" ref="1004"/>
|
113
|
+
<reference key="parent" ref="1002"/>
|
114
|
+
<string key="objectName">Application</string>
|
115
|
+
</object>
|
116
|
+
<object class="IBObjectRecord">
|
117
|
+
<int key="objectID">1</int>
|
118
|
+
<reference key="object" ref="1005"/>
|
119
|
+
<object class="NSMutableArray" key="children">
|
120
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
121
|
+
<reference ref="1006"/>
|
122
|
+
</object>
|
123
|
+
<reference key="parent" ref="1002"/>
|
124
|
+
</object>
|
125
|
+
<object class="IBObjectRecord">
|
126
|
+
<int key="objectID">2</int>
|
127
|
+
<reference key="object" ref="1006"/>
|
128
|
+
<object class="NSMutableArray" key="children">
|
129
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
130
|
+
<reference ref="741820390"/>
|
131
|
+
</object>
|
132
|
+
<reference key="parent" ref="1005"/>
|
133
|
+
</object>
|
134
|
+
<object class="IBObjectRecord">
|
135
|
+
<int key="objectID">3</int>
|
136
|
+
<reference key="object" ref="741820390"/>
|
137
|
+
<object class="NSMutableArray" key="children">
|
138
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
139
|
+
<reference ref="741820391"/>
|
140
|
+
</object>
|
141
|
+
<reference key="parent" ref="1006"/>
|
142
|
+
</object>
|
143
|
+
<object class="IBObjectRecord">
|
144
|
+
<int key="objectID">4</int>
|
145
|
+
<reference key="object" ref="741820391"/>
|
146
|
+
<reference key="parent" ref="741820390"/>
|
147
|
+
</object>
|
148
|
+
</object>
|
149
|
+
</object>
|
150
|
+
<object class="NSMutableDictionary" key="flattenedProperties">
|
151
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
152
|
+
<object class="NSMutableArray" key="dict.sortedKeys">
|
153
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
154
|
+
<string>-1.IBPluginDependency</string>
|
155
|
+
<string>-2.IBPluginDependency</string>
|
156
|
+
<string>-3.IBPluginDependency</string>
|
157
|
+
<string>1.IBEditorWindowLastContentRect</string>
|
158
|
+
<string>1.IBPluginDependency</string>
|
159
|
+
<string>1.IBWindowTemplateEditedContentRect</string>
|
160
|
+
<string>1.NSWindowTemplate.visibleAtLaunch</string>
|
161
|
+
<string>1.WindowOrigin</string>
|
162
|
+
<string>1.editorWindowContentRectSynchronizationRect</string>
|
163
|
+
<string>2.IBPluginDependency</string>
|
164
|
+
<string>4.IBPluginDependency</string>
|
165
|
+
<string>5.IBPluginDependency</string>
|
166
|
+
</object>
|
167
|
+
<object class="NSMutableArray" key="dict.values">
|
168
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
169
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
170
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
171
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
172
|
+
<string>{{0, 475}, {100, 200}}</string>
|
173
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
174
|
+
<string>{{0, 475}, {100, 200}}</string>
|
175
|
+
<integer value="1"/>
|
176
|
+
<string>{120, 240}</string>
|
177
|
+
<string>{{357, 418}, {100, 200}}</string>
|
178
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
179
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
180
|
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
181
|
+
</object>
|
182
|
+
</object>
|
183
|
+
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
184
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
185
|
+
<object class="NSArray" key="dict.sortedKeys">
|
186
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
187
|
+
</object>
|
188
|
+
<object class="NSMutableArray" key="dict.values">
|
189
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
190
|
+
</object>
|
191
|
+
</object>
|
192
|
+
<nil key="activeLocalization"/>
|
193
|
+
<object class="NSMutableDictionary" key="localizations">
|
194
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
195
|
+
<object class="NSArray" key="dict.sortedKeys">
|
196
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
197
|
+
</object>
|
198
|
+
<object class="NSMutableArray" key="dict.values">
|
199
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
200
|
+
</object>
|
201
|
+
</object>
|
202
|
+
<nil key="sourceID"/>
|
203
|
+
<int key="maxID">5</int>
|
204
|
+
</object>
|
205
|
+
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
206
|
+
<int key="IBDocument.localizationMode">0</int>
|
207
|
+
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
|
208
|
+
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
209
|
+
</data>
|
225
210
|
</archive>
|