wxStaticBitmap(3erl)

πŸ’– wxStaticBitmap πŸ’–

okay so this is the wxStaticBitmap(3erl) page from the Erlang Module Definition manual, and bestie, it’s literally all about the wxStaticBitmap class. We’re keeping every type, every arity, and every tiny caveat β€” no cap, no skipped details, just vibes and facts πŸ’…βœ¨


✨ NAME ✨

wxStaticBitmap β€” Functions for wxStaticBitmap class. Short, iconic, to the point πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

A static bitmap control displays a bitmap β€” that’s the whole job, and it’s serving. Native implementations on some platforms are only meant for display of the small icons in the dialog boxes, so don’t expect them to be main-character big-image machines everywhere, iykyk.

If you want to display larger images portably, you may use generic implementation wxGenericStaticBitmap declared in <wx/generic/statbmpg.h>.

Heads up, bestie: for the best results, the size of the control should be the same as the size of the image displayed in it, as happens by default if it’s not resized explicitly. Otherwise, behaviour depends on the platform: under MSW, the bitmap is drawn centred inside the control, while elsewhere it is drawn at the origin of the control. You can use SetScaleMode() (not implemented in wx) to control how the image is scaled inside the control.

See: wxBitmap.

This class is derived (and can use functions) from: wxControl, wxWindow, wxEvtHandler.

wxWidgets docs: wxStaticBitmap.


🌈 DATA TYPES 🌈

wxStaticBitmap() = wx:wx_object()

yup, that’s the type, and it’s giving wx:wx_object() energy 🫢


πŸ‘‘ EXPORTS πŸ‘‘

okay bestie, here come all the exports in order β€” every arity, every type, every see-reference. Buckle up πŸ’…

🌸 new() -> wxStaticBitmap()

Default constructor. Literally the no-args default constructor, periodt.

πŸŽ€ new(Parent, Id, Label) -> wxStaticBitmap()

Types:

Parent = wxWindow:wxWindow()
Id = integer()
Label = wxBitmap:wxBitmap()

This three-arg constructor is here with the basics: Parent, Id, and Label.

πŸ¦‹ new(Parent, Id, Label, Options :: [Option]) -> wxStaticBitmap()

Types:

Parent = wxWindow:wxWindow()
Id = integer()
Label = wxBitmap:wxBitmap()
Option =
    {pos, {X :: integer(), Y :: integer()}} |
    {size, {W :: integer(), H :: integer()}} |
    {style, integer()}

Constructor, creating and showing a static bitmap control. Yes, it’s doing both, and we love that for it.

See: create/5.

πŸ’… create(This, Parent, Id, Label) -> boolean()

Types:

This = wxStaticBitmap()
Parent = wxWindow:wxWindow()
Id = integer()
Label = wxBitmap:wxBitmap()

Here are the types for the four-arg create, clean and exact.

πŸ”₯ create(This, Parent, Id, Label, Options :: [Option]) -> boolean()

Types:

This = wxStaticBitmap()
Parent = wxWindow:wxWindow()
Id = integer()
Label = wxBitmap:wxBitmap()
Option =
    {pos, {X :: integer(), Y :: integer()}} |
    {size, {W :: integer(), H :: integer()}} |
    {style, integer()}

Creation function, for two-step construction.

For details see new/4.

πŸ“ getBitmap(This) -> wxBitmap:wxBitmap()

Types:

This = wxStaticBitmap()

Returns the bitmap currently used in the control.

Notice that this method can be called even if SetIcon() (not implemented in wx) had been used.

See: setBitmap/2.

🧚 setBitmap(This, Label) -> ok

Types:

This = wxStaticBitmap()
Label = wxBitmap:wxBitmap()

Sets the bitmap label.

See: getBitmap/1.

⭐ destroy(This :: wxStaticBitmap()) -> ok

Destroys the object. bye-bye object πŸ‘‹


Catch u later, bestie! This page came from the wxWidgets team, version wx 2.2.2.1, under the wxStaticBitmap(3erl) banner β€” and the footer didn’t print a date, so we’re not inventing one. Keep slaying those static bitmaps πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from