Class: Fzeet::ShellFileOpenDialog

Inherits:
Windows::FileOpenDialog
  • Object
show all
Includes:
ShellFileDialogMethods
Defined in:
lib/fzeet/windows/comdlg/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.



72
73
74
75
76
77
78
79
80
# File 'lib/fzeet/windows/comdlg/ShellFileDialog.rb', line 72

def initialize(opts = {})
	super()

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

Instance Method Details

#multiselect=(multiselect) ⇒ Object



82
83
84
85
86
87
88
89
90
91
92
# File 'lib/fzeet/windows/comdlg/ShellFileDialog.rb', line 82

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