wxStaticBitmap(3)
β¨ wxStaticBitmap β¨
okay bestie, welcome to wxStaticBitmap(3) β the Erlang module definition page for a static bitmap control π it's giving "picture frame that just sits there and looks cute," and honestly? we stan.
πΈ NAME πΈ
wxStaticBitmap β a static bitmap control displays a bitmap. that's it, that's the whole vibe. a lil guy that shows a picture. πΌοΈ
π DESCRIPTION π
so here's the tea, bestie: on some platforms the native implementations are only meant for display of the small icons in the dialog boxes. like, tiny icon energy only. π
if you want to display larger images portably, you may use the generic implementation wxGenericStaticBitmap, declared in <wx/generic/statbmpg.h>. use that one if you're tryna go big fr fr.
also, notice this: for the best results, the size of the control should be the same as the size of the image displayed in it β which happens by default if it's not resized explicitly. lowkey elegant. otherwise, the behaviour depends on the platform π:
- under MSW, the bitmap is drawn centred inside the control
- everywhere else, it is drawn at the origin of the control
and you can use SetScaleMode() (not implemented in wx, so don't @ her) to control how the image is scaled inside the control.
heads up π
β SetScaleMode() is not implemented in wx. so that one's a look-don't-touch situation, no cap.
See: wxBitmap
this class is derived, and can use functions, from:
wxControlwxWindowwxEvtHandler
wxWidgets docs: wxStaticBitmap β iykyk β¨
π¦ DATA TYPES π¦
wxStaticBitmap() :: wx:wx_object().
yes she's an object. main character energy. π
π FUNCTIONS π
create(This, Parent, Id, Label, [Option]) -> boolean()
when
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 the details, go peep new/4. she has the lore.
destroy(This :: wxStaticBitmap()) -> ok.
destroys the object π rip to her but she had a good run.
getBitmap(This) -> wxBitmap:wxBitmap()
when 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. so like, she's flexible bestie, she's not gonna gatekeep your bitmap.
See: setBitmap/2
new() -> wxStaticBitmap().
default constructor. the blank-slate era π±
new(Parent, Id, Label, [Option]) -> wxStaticBitmap()
when
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. not just making her β showing her off. iconic behavior β¨π
See: create/5
setBitmap(This, Label) -> ok
when
This :: wxStaticBitmap(),
Label :: wxBitmap:wxBitmap().
sets the bitmap label π swap the pic, slay.
See: getBitmap/1
and that's the whole page bestie, no notes π₯ this little gem comes to you from Ericsson AB, wx 2.6 β mwah π go forth and display ur bitmaps, periodt. ππ¦πΈ
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms