Chat-O-Matic/libs/libinterface/BitmapView.h
plfiorini b314c7abd8 * Rewrote BitmapView's MinSize(), MaxSize() and PreferredSize() methods.
* Added BitmapView::Bitmap() method.
* BitmapView::SetBitmap() now doesn't resize the view anymore.
* BitmapView has now a minimum size of 32x32.
* Draw bitmap on BitmapView using B_FILTER_BITMAP_BILINEAR.
* StatusView sets now explicit max and preferred size to 50x50 for the avatar icon view and doesn't resize the bitmap explicitely.
* Small style violation fixes.
2010-05-20 18:11:32 +00:00

36 lines
646 B
C++

/*
* Copyright 2009, Pier Luigi Fiorini. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _BITMAP_VIEW_H
#define _BITMAP_VIEW_H
#include <View.h>
class BBitmap;
class BitmapView : public BView {
public:
BitmapView(const char* name, uint32 flags
= B_WILL_DRAW);
~BitmapView();
status_t InitCheck();
BBitmap* Bitmap() const;
void SetBitmap(BBitmap* bitmap);
virtual BSize MinSize();
virtual BSize MaxSize();
virtual BSize PreferredSize();
virtual void Draw(BRect frame);
private:
BBitmap* fBitmap;
float fWidth;
float fHeight;
};
#endif // _BITMAP_VIEW_H