class Fzeet::FileOpenDialog

Public Instance Methods

multiselect=(multiselect) click to toggle source
# File lib/fzeet/windows/comdlg/FileDialog.rb, line 197
def multiselect=(multiselect)
        (multiselect) ?
                @struct[:Flags] |= Windows::OFN_ALLOWMULTISELECT :
                @struct[:Flags] &= ~Windows::OFN_ALLOWMULTISELECT
end
paths() click to toggle source
# File lib/fzeet/windows/comdlg/FileDialog.rb, line 182
def paths
        return [path] if
                (path = @buf.read_string).length + 1 != @struct[:nFileOffset]

        result, tip = [], path.length + 1

        until @buf.get_bytes(tip, 2) == "\0\0"
                result << (name = @buf.get_string(tip))

                tip += name.length + 1
        end

        result.map! { |last| "#{path}\\#{last}" }
end
show(window = Application.window) click to toggle source
# File lib/fzeet/windows/comdlg/FileDialog.rb, line 176
def show(window = Application.window)
        @struct[:hwndOwner] = window.handle

        DialogResult.new((Windows.GetOpenFileName(@struct) == 0) ? Windows::IDCANCEL : Windows::IDOK)
end