looper/backends/ui/haiku/image_view.h

22 lines
523 B
C
Raw Normal View History

#pragma once
#include <View.h>
#include <Bitmap.h>
#include <Alignment.h>
#include <Rect.h>
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);
};