Zachary Hall
f2bf642db2
Some checks failed
Build / download-system-deps (push) Failing after 0s
Build / get-source-code (push) Has been skipped
Build / build-deb (push) Has been skipped
Build / build-appimage (push) Has been skipped
Build / build-android (push) Has been skipped
Build / build-windows (push) Has been skipped
Build / build-gentoo (push) Failing after 1m6s
21 lines
523 B
C++
21 lines
523 B
C++
#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);
|
|
};
|