Class: Wx::URLDataObject

Inherits:
DataObject show all
Defined in:
lib/wx/doc/gen/data_object.rb

Overview

URLDataObject is a DataObject containing an URL and can be used e.g.

when you need to put an URL on or retrieve it from the clipboard:

Wx::Clipboard.open { |clip| clip.place(Wx::URLDataObject.new(url))
Note:

The actual base class of this class is not always DataObject itself, but rather either DataObjectComposite in WXMSW and WXGTK or TextDataObject in the other ports. Please don't rely on the exact base class, it is not guaranteed that it won't change in the future.

Category: Clipboard and Drag & Drop

See Also:

Requires:

  • USE_CLIPBOARD

Instance Method Summary collapse

Methods inherited from DataObject

#get_all_formats, #get_data_here, #get_data_size, #get_format_count, #get_preferred_format, #is_supported, #set_data

Constructor Details

#initialize(url = ('')) ⇒ Wx::URLDataObject

Constructor, may be used to initialize the URL.

If url is empty, #set_url can be used later.

Parameters:

  • url (String) (defaults to: (''))


427
# File 'lib/wx/doc/gen/data_object.rb', line 427

def initialize(url=('')) end

Instance Method Details

#get_urlString Also known as: url

Returns the URL stored by this object, as a string.

Returns:

  • (String)


431
# File 'lib/wx/doc/gen/data_object.rb', line 431

def get_url; end

#set_url(url) ⇒ void Also known as: url=

This method returns an undefined value.

Sets the URL stored by this object.

Parameters:

  • url (String)


437
# File 'lib/wx/doc/gen/data_object.rb', line 437

def set_url(url) end