Class: Fzeet::ShellFileOpenDialog

Inherits:
Windows::FileOpenDialog
  • Object
show all
Includes:
ShellFileDialogMethods
Defined in:
lib/fzeet/Dialog/ShellFileDialog.rb

Instance Method Summary collapse

Methods included from ShellFileDialogMethods

#Show, #item, #items, #path, #paths, #show

Constructor Details

#initialize(opts = {}) ⇒ ShellFileOpenDialog

Returns a new instance of ShellFileOpenDialog.



53
54
55
56
57
58
59
60
61
# File 'lib/fzeet/Dialog/ShellFileDialog.rb', line 53

def initialize(opts = {})
  super()

  begin
    yield self
  ensure
    Release()
  end if block_given?
end

Instance Method Details

#multiselect=(multiselect) ⇒ Object



63
64
65
66
67
68
69
70
71
72
73
# File 'lib/fzeet/Dialog/ShellFileDialog.rb', line 63

def multiselect=(multiselect)
  if multiselect
    SetOptions(Windows::FOS_ALLOWMULTISELECT)
  else
    opts = nil

    FFI::MemoryPointer.new(:pointer) { |p| GetOptions(p); opts = p.get_ulong(0) }

    SetOptions(opts & ~Windows::FOS_ALLOWMULTISELECT)
  end
end