Class: Wx::DropSource
- Inherits:
-
Object
- Object
- Wx::DropSource
- Defined in:
- lib/wx/doc/gen/drag_drop.rb
Overview
This class represents a source for a drag and drop operation.
Category: Clipboard and Drag & Drop
Instance Method Summary collapse
-
#do_drag_drop(flags = Wx::Drag_CopyOnly) ⇒ Wx::DragResult
Starts the drag-and-drop operation which will terminate when the user releases the mouse.
-
#get_data_object ⇒ Wx::DataObject
(also: #data_object)
Returns the DataObject object that has been assigned previously.
-
#give_feedback(effect) ⇒ Boolean
You may give some custom UI feedback during the drag and drop operation by overriding this function.
-
#initialize(*args) ⇒ DropSource
constructor
A new instance of DropSource.
-
#set_cursor(res, cursor) ⇒ void
Set the icon to use for a certain drag result.
-
#set_data(data) ⇒ void
(also: #data=)
Sets the data DataObject associated with the drop source.
-
#set_icon(res, icon) ⇒ void
Set the icon to use for a certain drag result.
Constructor Details
#initialize(win = nil, iconCopy = Wx::NULL_CURSOR, iconMove = Wx::NULL_CURSOR, iconNone = Wx::NULL_CURSOR) ⇒ Wx::DropSource #initialize(data, win = nil, iconCopy = Wx::NULL_CURSOR, iconMove = Wx::NULL_CURSOR, iconNone = Wx::NULL_CURSOR) ⇒ Wx::DropSource #initialize(win = nil, iconCopy = Wx::NULL_ICON, iconMove = Wx::NULL_ICON, iconNone = Wx::NULL_ICON) ⇒ Wx::DropSource #initialize(data, win = nil, iconCopy = Wx::NULL_ICON, iconMove = Wx::NULL_ICON, iconNone = Wx::NULL_ICON) ⇒ Wx::DropSource
Returns a new instance of DropSource.
120 |
# File 'lib/wx/doc/gen/drag_drop.rb', line 120 def initialize(*args) end |
Instance Method Details
#do_drag_drop(flags = Wx::Drag_CopyOnly) ⇒ Wx::DragResult
Starts the drag-and-drop operation which will terminate when the user releases the mouse.
Call this in response to a mouse button press, for example.
The operation requested by the user, may be Wx::DragResult::DragCopy, Wx::DragResult::DragMove, Wx::DragResult::DragLink, Wx::DragResult::DragCancel or Wx::DragResult::DragNone if an error occurred.
129 |
# File 'lib/wx/doc/gen/drag_drop.rb', line 129 def do_drag_drop(flags=Wx::Drag_CopyOnly) end |
#get_data_object ⇒ Wx::DataObject Also known as: data_object
Returns the Wx::DataObject object that has been assigned previously.
133 |
# File 'lib/wx/doc/gen/drag_drop.rb', line 133 def get_data_object; end |
#give_feedback(effect) ⇒ Boolean
You may give some custom UI feedback during the drag and drop operation by overriding this function.
It is called on each mouse move, so your implementation must not be too slow.
false if you want default feedback, or true if you implement your own feedback. The return value is ignored under GTK.
143 |
# File 'lib/wx/doc/gen/drag_drop.rb', line 143 def give_feedback(effect) end |
#set_cursor(res, cursor) ⇒ void
This method returns an undefined value.
Set the icon to use for a certain drag result.
Availability: only available for the WXMSW, WXOSX/Cocoa ports.
152 |
# File 'lib/wx/doc/gen/drag_drop.rb', line 152 def set_cursor(res, cursor) end |
#set_data(data) ⇒ void Also known as: data=
This method returns an undefined value.
Sets the data Wx::DataObject associated with the drop source.
This will not delete any previously associated data.
168 |
# File 'lib/wx/doc/gen/drag_drop.rb', line 168 def set_data(data) end |
#set_icon(res, icon) ⇒ void
This method returns an undefined value.
Set the icon to use for a certain drag result.
Availability: only available for the WXGTK port.
161 |
# File 'lib/wx/doc/gen/drag_drop.rb', line 161 def set_icon(res, icon) end |