Class: Wx::FileDropTarget

Inherits:
DropTarget show all
Defined in:
lib/wx/doc/gen/drag_drop.rb

Overview

This is a drop target which accepts files (dragged from File Manager or Explorer).

Category: Clipboard and Drag & Drop

See Also:

Requires:

  • USE_DRAG_AND_DROP

Instance Method Summary collapse

Methods inherited from DropTarget

#get_data, #get_data_object, #get_default_action, #on_data, #on_drag_over, #on_drop, #on_enter, #on_leave, #set_data_object, #set_default_action

Constructor Details

#initializeWx::FileDropTarget

Constructor.



290
# File 'lib/wx/doc/gen/drag_drop.rb', line 290

def initialize; end

Instance Method Details

#on_drop_files(x, y, filenames) ⇒ Boolean

Override this function to receive dropped files.

Return true to accept the data, or false to veto the operation.

Parameters:

  • x (Integer)

    The x coordinate of the mouse.

  • y (Integer)

    The y coordinate of the mouse.

  • filenames (Array<String>)

    An array of filenames.

Returns:

  • (Boolean)


299
# File 'lib/wx/doc/gen/drag_drop.rb', line 299

def on_drop_files(x, y, filenames) end