module Fzeet::HeaderMethods
Constants
- Prefix
Public Instance Methods
count()
click to toggle source
# File lib/fzeet/windows/comctl/Header.rb, line 156 def count; sendmsg(:getitemcount) end
insertItem(i, text, width)
click to toggle source
# File lib/fzeet/windows/comctl/Header.rb, line 158 def insertItem(i, text, width) hdi = Windows::HDITEM.new hdi[:mask] = Fzeet.flags([:width, :text, :format, :order], :hdi_) hdi[:cxy] = width hdi[:pszText] = ptext = FFI::MemoryPointer.from_string(text) hdi[:fmt] = Fzeet.flags([:left, :string], :hdf_) hdi[:iOrder] = i sendmsg(:insertitem, 0, hdi.pointer) self ensure ptext.free end
modifyItem(i, text, style = 0)
click to toggle source
# File lib/fzeet/windows/comctl/Header.rb, line 174 def modifyItem(i, text, style = 0) hdi = Windows::HDITEM.new hdi[:mask] = Fzeet.flags([:text, :format], :hdi_) hdi[:pszText] = ptext = FFI::MemoryPointer.from_string(text) hdi[:fmt] = Fzeet.flags([:left, :string], :hdf_) hdi[:fmt] |= Fzeet.flags([*style].compact, :hdf_) sendmsg(:setitem, i, hdi.pointer) self ensure ptext.free end