public:
BitmapView( BRect frame, const char* name, BBitmap* bitmap, uint32 resizingMode, uint32 flags );
Sets up a new BitmapView, using a given BBitmap*.
Name Description frame See BView::BView(). name See BView::BView(). bitmap A pointer to the bitmap to display. The BitmapView will assume ownership of this bitmap. If bitmap is NULL, an empty 32x32 black-and-white bitmap will be created and used. resizingMode See BView::BView(). flags see BView::BView(). These flags will be |ed with B_WILL_DRAW.
public:
BitmapView( BRect frame, const char* bitmapName, uint32 resizingMode, uint32 flags );
Sets up a new BitmapView, using the bitmap with a given name.
Name Description frame See BView::BView(). name See BView::BView(). bitmapName Either a filename of a bitmap to display, or the name of a B_TRANSLATOR_BITMAP application resource to display. resizingMode See BView::BView(). flags see BView::BView(). These flags will be |ed with B_WILL_DRAW.
public:
virtual void Draw( BRect updateRect );
This function is called whenever the view needs to be redrawn.
Name Description updateRect The rectangle that needs updating, expressed in the view coordinate system.
public:
inline BBitmap* GetBitmap() { return fBitmap; };
Returns a pointer to the view's current bitmap. This is the actual bitmap contained in the view; you may modify it but you must not delete it. If you modify it, you should call Invalidate() afterwards.
Result: The view's current bitmap.public:
virtual void GetPreferredSize( float* width, float* height );
This function returns this BitmapView's preferred size (namely, the size of the bitmap).
Name Description width Pointer to a variable that will receive this view's preferred width. height Pointer to a variable that will receive this view's preferred height.
public:
void SetBitmap( BBitmap* bitmap );
Sets the displayed bitmap to bitmap, and assumes ownership of it. Deletes the view's previous bitmap.
Name Description bitmap The new bitmap to display. This parameter may not be NULL.
public:
~BitmapView();
Deletes the BitmapView, freeing all memory associated with it (including its bitmap).
© 2000 BeUnited (Last Updated 5/10/2000)