libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / apps / people / PictureView.h
blobb8e330f881a6237692fd00cd347bad170577fe55
1 /*
2 * Copyright 2011, Haiku.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Philippe Houdoin
7 */
8 #ifndef PICTURE_VIEW_H
9 #define PICTURE_VIEW_H
12 #include <Node.h>
13 #include <String.h>
14 #include <View.h>
17 class BBitmap;
18 class BFilePanel;
20 const uint32 kMsgLoadImage = 'mLIM';
23 class PictureView : public BView {
24 public:
25 PictureView(float width, float height,
26 const entry_ref* ref);
27 virtual ~PictureView();
29 bool HasChanged();
30 void Revert();
31 void Update();
32 void Update(const entry_ref* ref);
34 BBitmap* Bitmap();
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);
45 private:
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);
54 BBitmap* fPicture;
55 BBitmap* fOriginalPicture;
56 BBitmap* fDefaultPicture;
57 bool fShowingPopUpMenu;
58 BRect fPictureRect;
59 uint32 fPictureType;
60 BString fPictureMIMEType;
61 bool fFocusChanging;
62 BFilePanel* fOpenPanel;
65 #endif