module Fzeet::DCMethods
Public Instance Methods
background()
click to toggle source
# File lib/fzeet/windows/core/Common.rb, line 282 def background; Windows.GetBkColor(@handle) end
background=(background)
click to toggle source
# File lib/fzeet/windows/core/Common.rb, line 283 def background=(background) Windows.SetBkColor(@handle, background) end
color()
click to toggle source
# File lib/fzeet/windows/core/Common.rb, line 279 def color; Windows.GetTextColor(@handle) end
color=(color)
click to toggle source
# File lib/fzeet/windows/core/Common.rb, line 280 def color=(color) Windows.SetTextColor(@handle, color) end
fillRect(rect, brush)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# 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) { |self| ... }
click to toggle source
# 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)
click to toggle source
# File lib/fzeet/windows/core/Common.rb, line 289 def sms(message) r = window.rect r[:top] += window.ribbon.height if window.ribbon text(message, r, [:singleline, :center, :vcenter]) self end
text(text, rect, flags = 0)
click to toggle source
# File lib/fzeet/windows/core/Common.rb, line 287 def text(text, rect, flags = 0) Windows.DetonateLastError(0, :DrawText, @handle, text, -1, rect, Fzeet.flags(flags, :dt_)); self end
textExtent(text)
click to toggle source
# File lib/fzeet/windows/core/Common.rb, line 277 def textExtent(text) Windows.DetonateLastError(0, :GetTextExtentPoint, @handle, text, text.length, s = Size.new); s end