2010-05-07 04:47:10 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Pier Luigi Fiorini. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _PICTURE_VIEW_H
|
|
|
|
#define _PICTURE_VIEW_H
|
|
|
|
|
|
|
|
#include <View.h>
|
|
|
|
|
|
|
|
class BBitmap;
|
|
|
|
|
|
|
|
class PictureView : public BView {
|
|
|
|
public:
|
|
|
|
PictureView(const char* name, const char* filename,
|
2013-01-04 07:52:14 -06:00
|
|
|
uint32 flags = B_WILL_DRAW);
|
2010-05-07 04:47:10 -05:00
|
|
|
~PictureView();
|
|
|
|
|
|
|
|
status_t InitCheck();
|
|
|
|
|
|
|
|
virtual BSize MinSize();
|
|
|
|
virtual BSize MaxSize();
|
|
|
|
virtual BSize PreferredSize();
|
|
|
|
|
|
|
|
virtual void Draw(BRect frame);
|
|
|
|
|
|
|
|
private:
|
|
|
|
BBitmap* fBitmap;
|
|
|
|
float fWidth;
|
|
|
|
float fHeight;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _PICTURE_VIEW_H
|