sugarcube 0.20.21 → 0.20.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,46 +38,22 @@ end
38
38
 
39
39
 
40
40
  class NSAttributedString
41
- NSSuperscriptAttributeName = 'NSSuperscript'
42
- NSAttachmentAttributeName = 'NSAttachment'
43
- NSBaselineOffsetAttributeName = 'NSBaselineOffset'
44
- NSLinkAttributeName = 'NSLink'
45
- NSUnderlineColorAttributeName = 'NSUnderlineColor'
46
- NSStrikethroughColorAttributeName = 'NSStrikethroughColor'
47
- NSObliquenessAttributeName = 'NSObliqueness'
48
- NSExpansionAttributeName = 'NSExpansion'
49
- NSCursorAttributeName = 'NSCursor'
50
- NSToolTipAttributeName = 'NSToolTip'
51
- NSMarkedClauseSegmentAttributeName = 'NSMarkedClauseSegment'
52
- NSWritingDirectionAttributeName = 'NSWritingDirection'
53
- NSTextAlternativesAttributeName = 'NSTextAlternatives'
54
41
 
55
42
  def dummy
43
+ # make sure NSAttributedString constants get compiled
56
44
  foo = NSFontAttributeName
57
45
  foo = NSParagraphStyleAttributeName
58
46
  foo = NSForegroundColorAttributeName
59
- foo = NSUnderlineStyleAttributeName
60
- foo = NSSuperscriptAttributeName
61
47
  foo = NSBackgroundColorAttributeName
62
- foo = NSAttachmentAttributeName
63
48
  foo = NSLigatureAttributeName
64
- foo = NSBaselineOffsetAttributeName
65
49
  foo = NSKernAttributeName
66
- foo = NSLinkAttributeName
67
- foo = NSStrokeWidthAttributeName
68
- foo = NSStrokeColorAttributeName
69
- foo = NSUnderlineColorAttributeName
70
50
  foo = NSStrikethroughStyleAttributeName
71
- foo = NSStrikethroughColorAttributeName
51
+ foo = NSUnderlineStyleAttributeName
52
+ foo = NSStrokeColorAttributeName
53
+ foo = NSStrokeWidthAttributeName
72
54
  foo = NSShadowAttributeName
73
- foo = NSObliquenessAttributeName
74
- foo = NSExpansionAttributeName
75
- foo = NSCursorAttributeName
76
- foo = NSToolTipAttributeName
77
- foo = NSMarkedClauseSegmentAttributeName
78
- foo = NSWritingDirectionAttributeName
79
55
  foo = NSVerticalGlyphFormAttributeName
80
- foo = NSTextAlternativesAttributeName
56
+ # make sure alignments get compiled
81
57
  foo = NSLeftTextAlignment
82
58
  foo = NSRightTextAlignment
83
59
  foo = NSCenterTextAlignment
@@ -130,35 +106,19 @@ class NSAttributedString
130
106
  with_attributes({NSUnderlineStyleAttributeName => value})
131
107
  end
132
108
 
133
- def superscript(value)
134
- with_attributes({NSSuperscriptAttributeName => value})
135
- end
136
-
137
109
  def background_color(value)
138
110
  with_attributes({NSBackgroundColorAttributeName => value.uicolor})
139
111
  end
140
112
  alias bg_color background_color
141
113
 
142
- def attachment(value)
143
- with_attributes({NSAttachmentAttributeName => value})
144
- end
145
-
146
114
  def ligature(value)
147
115
  with_attributes({NSLigatureAttributeName => value})
148
116
  end
149
117
 
150
- def baseline_offset(value)
151
- with_attributes({NSBaselineOffsetAttributeName => value})
152
- end
153
-
154
118
  def kern(value)
155
119
  with_attributes({NSKernAttributeName => value})
156
120
  end
157
121
 
158
- def link(value)
159
- with_attributes({NSLinkAttributeName => value})
160
- end
161
-
162
122
  def stroke_width(value)
163
123
  with_attributes({NSStrokeWidthAttributeName => value})
164
124
  end
@@ -167,54 +127,18 @@ class NSAttributedString
167
127
  with_attributes({NSStrokeColorAttributeName => value.uicolor})
168
128
  end
169
129
 
170
- def underline_color(value)
171
- with_attributes({NSUnderlineColorAttributeName => value.uicolor})
172
- end
173
-
174
130
  def strikethrough_style(value)
175
131
  with_attributes({NSStrikethroughStyleAttributeName => value})
176
132
  end
177
133
 
178
- def strikethrough_color(value)
179
- with_attributes({NSStrikethroughColorAttributeName => value.uicolor})
180
- end
181
-
182
134
  def shadow(value)
183
135
  with_attributes({NSShadowAttributeName => value})
184
136
  end
185
137
 
186
- def obliqueness(value)
187
- with_attributes({NSObliquenessAttributeName => value})
188
- end
189
-
190
- def expansion(value)
191
- with_attributes({NSExpansionAttributeName => value})
192
- end
193
-
194
- def cursor(value)
195
- with_attributes({NSCursorAttributeName => value})
196
- end
197
-
198
- def tool_tip(value)
199
- with_attributes({NSToolTipAttributeName => value})
200
- end
201
-
202
- def marked_clause_segment(value)
203
- with_attributes({NSMarkedClauseSegmentAttributeName => value})
204
- end
205
-
206
- def writing_direction(value)
207
- with_attributes({NSWritingDirectionAttributeName => value})
208
- end
209
-
210
138
  def vertical_glyph_form(value)
211
139
  with_attributes({NSVerticalGlyphFormAttributeName => value})
212
140
  end
213
141
 
214
- def text_alternatives(value)
215
- with_attributes({NSTextAlternativesAttributeName => value})
216
- end
217
-
218
142
  def with_attributes(attributes)
219
143
  retval = NSMutableAttributedString.alloc.initWithAttributedString(self)
220
144
  retval.addAttributes(attributes, range:[0, self.length])
@@ -1,3 +1,3 @@
1
1
  module SugarCube
2
- Version = '0.20.21'
2
+ Version = '0.20.22'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugarcube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.21
4
+ version: 0.20.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-05-14 00:00:00.000000000 Z
16
+ date: 2013-05-29 00:00:00.000000000 Z
17
17
  dependencies: []
18
18
  description: ! '== Description
19
19