20 lines
451 B
C
20 lines
451 B
C
|
#pragma once
|
||
|
#include <View.h>
|
||
|
#include <Bitmap.h>
|
||
|
#include <Alignment.h>
|
||
|
#include <Rect.h>
|
||
|
|
||
|
class LImageView : public BView {
|
||
|
BBitmap *bitmap;
|
||
|
BAlignment align;
|
||
|
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;
|
||
|
|
||
|
LImageView(const char *name, BBitmap *bitmap, BAlignment align);
|
||
|
};
|