Module: Fzeet::DCMethods
Instance Method Summary collapse
- #background ⇒ Object
- #background=(background) ⇒ Object
- #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
- #textExtent(text) ⇒ Object
Instance Method Details
#background ⇒ Object
282 |
# File 'lib/fzeet/windows/core/Common.rb', line 282 def background; Windows.GetBkColor(@handle) end |
#background=(background) ⇒ Object
283 |
# File 'lib/fzeet/windows/core/Common.rb', line 283 def background=(background) Windows.SetBkColor(@handle, background) end |
#color ⇒ Object
279 |
# File 'lib/fzeet/windows/core/Common.rb', line 279 def color; Windows.GetTextColor(@handle) end |
#color=(color) ⇒ Object
280 |
# File 'lib/fzeet/windows/core/Common.rb', line 280 def color=(color) Windows.SetTextColor(@handle, color) end |
#fillRect(rect, brush) ⇒ Object
285 |
# File 'lib/fzeet/windows/core/Common.rb', line 285 def fillRect(rect, brush) Windows.DetonateLastError(0, :FillRect, @handle, rect, (brush.kind_of?(FFI::Pointer)) ? brush : brush.handle); self end |
#line(x, y) ⇒ Object
300 |
# File 'lib/fzeet/windows/core/Common.rb', line 300 def line(x, y) Windows.DetonateLastError(0, :LineTo, @handle, x, y); self end |
#move(x, y) ⇒ Object
299 |
# File 'lib/fzeet/windows/core/Common.rb', line 299 def move(x, y) Windows.DetonateLastError(0, :MoveToEx, @handle, x, y, nil); self end |
#select(*objects) ⇒ Object
263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/fzeet/windows/core/Common.rb', line 263 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
289 290 291 292 293 294 295 296 297 |
# File 'lib/fzeet/windows/core/Common.rb', line 289 def sms() r = window.rect r[:top] += window.ribbon.height if window.ribbon text(, r, [:singleline, :center, :vcenter]) self end |