#pragma once #include #include #include #include class LImageView : public BView { BBitmap *bitmap; BAlignment align; BRect img_bounds; public: void GetPreferredSize(float *w, float *h) override; void SetBitmap(BBitmap *bitmap); BBitmap *Bitmap(); void SetAlignment(BAlignment align); BAlignment Alignment(); void Draw(BRect updateRect) override; void FrameResized(float newW, float newH) override; LImageView(const char *name, BBitmap *bitmap, BAlignment align); };