wxBitmapDataObject(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– wxBitmapDataObject πŸ’–

okay bestie, real talk: this is the Erlang module definition for wxBitmapDataObject, and it's literally the specialization of wxDataObject for bitmap data. she's a main character who only does one thing and does it gorgeously πŸ’…


✨ NAME ✨

wxBitmapDataObject β€” wxBitmapDataObject is a specialization of wxDataObject for bitmap data. no cap, that's the whole assignment and she ate πŸŽ€


🌸 DESCRIPTION 🌸

You can use this class without changing a single thing to paste data into the wxClipboard or a wxDropSource (which β€” heads up β€” is not implemented in wx πŸ™ˆ).

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. yes queen, lazy-loading your bitmaps, iconic behavior ✨

This class may be used as is, but getBitmap/1 may be overridden to increase efficiency. see? she's flexible like that πŸ¦‹

See:

  • Overview dnd
  • wxDataObject
  • wxFileDataObject
  • wxTextDataObject
  • wxDataObject

This class is derived, and can use functions, from:

  • wxDataObject

wxWidgets docs: wxBitmapDataObject


πŸ’œ DATA TYPES πŸ’œ

wxBitmapDataObject() :: wx:wx_object().

πŸ‘‘ FUNCTIONS πŸ‘‘

  • destroy(This :: wxBitmapDataObject()) -> ok. β€” Destroys the object. bye bestie, it was real πŸ˜­πŸ’€
  • getBitmap(This) -> wxBitmap:wxBitmap() when This :: wxBitmapDataObject(). β€” 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 wxClipboard. fr fr, this is the plug 🫢

  • new([Option]) -> wxBitmapDataObject() when Option :: {bitmap, wxBitmap:wxBitmap()}; (Bitmap) -> wxBitmapDataObject() when Bitmap :: wxBitmap:wxBitmap(). β€” Constructor, optionally passing a bitmap (otherwise use setBitmap/2 later). pick your fighter: bitmap now or bitmap later 🌈
  • setBitmap(This, Bitmap) -> ok when This :: wxBitmapDataObject(), Bitmap :: wxBitmap:wxBitmap(). β€” 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. lowkey just let her cook πŸ”₯

heads up: wxDropSource is not implemented in wx β€” so don't come for me when that part's missing, okay? πŸ’€

Ericsson AB Β· wx 2.6 Β· wxBitmapDataObject(3) β€” that's the source, version and date bestie, love u, go slay some bitmaps πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from