Module: Fzeet::DCMethods
- Included in:
- ClientDC
- Defined in:
- lib/fzeet/Common.rb
Instance Method Summary collapse
- #color ⇒ Object
- #color=(color) ⇒ Object
- #fillRect(rect, brush) ⇒ Object
- #line(x, y) ⇒ Object
- #move(x, y) ⇒ Object
- #select(*objects) ⇒ Object
- #sms(message) ⇒ Object
- #text(text, rect, flags = 0) ⇒ Object
Instance Method Details
#color ⇒ Object
299 |
# File 'lib/fzeet/Common.rb', line 299 def color; Windows.GetTextColor(@handle) end |
#color=(color) ⇒ Object
300 |
# File 'lib/fzeet/Common.rb', line 300 def color=(color) Windows.SetTextColor(@handle, color) end |
#fillRect(rect, brush) ⇒ Object
302 |
# File 'lib/fzeet/Common.rb', line 302 def fillRect(rect, brush) Windows.DetonateLastError(0, :FillRect, @handle, rect, brush.handle); self end |
#line(x, y) ⇒ Object
317 |
# File 'lib/fzeet/Common.rb', line 317 def line(x, y) Windows.DetonateLastError(0, :LineTo, @handle, x, y); self end |
#move(x, y) ⇒ Object
316 |
# File 'lib/fzeet/Common.rb', line 316 def move(x, y) Windows.DetonateLastError(0, :MoveToEx, @handle, x, y, nil); self end |
#select(*objects) ⇒ Object
285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/fzeet/Common.rb', line 285 def select(*objects) holds = [] objects.each { |object| holds << Windows.DetonateLastError(FFI::Pointer::NULL, :SelectObject, @handle, object.handle) } yield self self ensure holds.each { |hold| Windows.SelectObject(@handle, hold) } end |
#sms(message) ⇒ Object
306 307 308 309 310 311 312 313 314 |
# File 'lib/fzeet/Common.rb', line 306 def sms() r = window.rect r[:top] += window.ribbon.height if window.ribbon text(, r, [:singleline, :center, :vcenter]) self end |