Class: Wx::BitmapDataObject
- Inherits:
-
DataObjectSimple
- Object
- DataObject
- DataObjectSimple
- Wx::BitmapDataObject
- Defined in:
- lib/wx/doc/gen/data_object.rb
Overview
BitmapDataObject is a specialization of DataObject for bitmap data.
It can be used without change to paste data into the Clipboard or a DropSource. A user may wish to derive a new class from this class for providing a bitmap on-demand in order to minimize memory consumption when offering data in several formats, such as a bitmap and GIF. This class may be used as is, but #get_bitmap may be overridden to increase efficiency.
Category: Clipboard and Drag & Drop
Instance Method Summary collapse
-
#get_bitmap ⇒ Wx::Bitmap
(also: #bitmap)
Returns the bitmap associated with the data object.
-
#initialize(bitmap = Wx::NULL_BITMAP) ⇒ Wx::BitmapDataObject
constructor
Constructor, optionally passing a bitmap (otherwise use #set_bitmap later).
-
#set_bitmap(bitmap) ⇒ void
(also: #bitmap=)
Sets the bitmap associated with the data object.
Methods inherited from DataObjectSimple
#get_data_here, #get_data_size, #get_format, #set_data
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(bitmap = Wx::NULL_BITMAP) ⇒ Wx::BitmapDataObject
Constructor, optionally passing a bitmap (otherwise use #set_bitmap later).
251 |
# File 'lib/wx/doc/gen/data_object.rb', line 251 def initialize(bitmap=Wx::NULL_BITMAP) end |
Instance Method Details
#get_bitmap ⇒ Wx::Bitmap Also known as: bitmap
Returns the bitmap associated with the data object.
You may wish to override this method when offering data on-demand, but this is not required by wxWidgets’ internals. Use this method to get data in bitmap form from the Clipboard.
257 |
# File 'lib/wx/doc/gen/data_object.rb', line 257 def get_bitmap; end |
#set_bitmap(bitmap) ⇒ void Also known as: bitmap=
This method returns an undefined value.
Sets the bitmap associated with the data object.
This method is called when the data object receives data. Usually there will be no reason to override this function.
265 |
# File 'lib/wx/doc/gen/data_object.rb', line 265 def set_bitmap(bitmap) end |