Class: Fzeet::ListView
- Includes:
- ListViewMethods
- Defined in:
- lib/fzeet/windows/comctl/ListView.rb
Constant Summary collapse
- Prefix =
{ xstyle: [:lvs_ex_, :ws_ex_], style: [:lvs_, :ws_], message: [:lvm_, :ccm_, :wm_], notification: [:lvn_, :nm_] }
Constants included from WindowMethods
Instance Attribute Summary collapse
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Attributes inherited from Control
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(parent, id, opts = {}, &block) ⇒ ListView
constructor
A new instance of ListView.
- #on(notification, &block) ⇒ Object
Methods included from ListViewMethods
#clear, #insertColumn, #insertItem, #sort, #xstyle, #xstyle?
Methods inherited from Control
Methods included from WindowMethods
#[], #capture=, #capture?, #dialog=, #dialog?, #dlgmsg?, #drawMenuBar, #eachChild, #enabled=, #enabled?, #focus=, #focus?, #invalidate, #location, #location=, #long, #menu, #menu=, #message, #paint, #position, #position=, #postmsg, #question, #rect, #reframe, #sendmsg, #show, #size, #size=, #style, #style?, #text, #text=, #textlen, #topmost=, #topmost?, #update, #visible=, #visible?, #xstyle, #xstyle?
Methods included from Toggle
Constructor Details
#initialize(parent, id, opts = {}, &block) ⇒ ListView
Returns a new instance of ListView.
448 449 450 451 452 453 454 455 456 |
# File 'lib/fzeet/windows/comctl/ListView.rb', line 448 def initialize(parent, id, opts = {}, &block) super('SysListView32', parent, id, opts) @header = Handle.wrap(FFI::Pointer.new(sendmsg(:getheader)), WindowMethods, HeaderMethods) @items = [] @parent.on(:notify, @id, &block) if block end |
Instance Attribute Details
#header ⇒ Object (readonly)
Returns the value of attribute header.
458 459 460 |
# File 'lib/fzeet/windows/comctl/ListView.rb', line 458 def header @header end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
458 459 460 |
# File 'lib/fzeet/windows/comctl/ListView.rb', line 458 def items @items end |
Class Method Details
.crackNotification(args) ⇒ Object
440 441 442 443 444 445 446 |
# File 'lib/fzeet/windows/comctl/ListView.rb', line 440 def self.crackNotification(args) case args[:notification] when Windows::LVN_COLUMNCLICK args[:nmlv] = Windows::NMLISTVIEW.new(FFI::Pointer.new(args[:lParam])) args[:index] = args[:nmlv][:iSubItem] end end |