2 * Copyright 2011, Haiku.
3 * Distributed under the terms of the MIT License.
20 const uint32 kMsgLoadImage
= 'mLIM';
23 class PictureView
: public BView
{
25 PictureView(float width
, float height
,
26 const entry_ref
* ref
);
27 virtual ~PictureView();
32 void Update(const entry_ref
* ref
);
35 uint32
SuggestedType();
36 const char* SuggestedMIMEType();
38 virtual void MessageReceived(BMessage
* message
);
39 virtual void Draw(BRect updateRect
);
40 virtual void MouseDown(BPoint point
);
41 virtual void KeyDown(const char* bytes
, int32 numBytes
);
42 virtual void WindowActivated(bool active
);
43 virtual void MakeFocus(bool focused
);
46 void _BeginDrag(BPoint sourcePoint
);
47 void _HandleDrop(BMessage
* message
);
48 void _ShowPopUpMenu(BPoint screen
);
49 BBitmap
* _CopyPicture(uint8 alpha
);
51 status_t
_LoadPicture(const entry_ref
* ref
);
52 void _SetPicture(BBitmap
* bitmap
);
55 BBitmap
* fOriginalPicture
;
56 BBitmap
* fDefaultPicture
;
57 bool fShowingPopUpMenu
;
60 BString fPictureMIMEType
;
62 BFilePanel
* fOpenPanel
;