vfs: check userland buffers before reading them.
[haiku.git] / src / apps / overlayimage / OverlayView.h
bloba45632139180cd292d2556722b76af58ecc140c2
1 /*
2 * Copyright 1999-2010, Be Incorporated. All Rights Reserved.
3 * This file may be used under the terms of the Be Sample Code License.
5 * OverlayImage is based on the code presented in this article:
6 * http://www.haiku-os.org/documents/dev/replishow_a_replicable_image_viewer
8 * Authors:
9 * Seth Flexman
10 * Hartmuth Reh
11 * Humdinger <humdingerb@gmail.com>
14 #ifndef OVERLAY_VIEW_H
15 #define OVERLAY_VIEW_H
17 #include <stdio.h>
19 #include <Alert.h>
20 #include <Bitmap.h>
21 #include <Dragger.h>
22 #include <Entry.h>
23 #include <Path.h>
24 #include <TranslationUtils.h>
25 #include <View.h>
26 #include <Window.h>
29 class _EXPORT OverlayView;
31 class OverlayView : public BView {
32 public:
33 OverlayView(BRect frame);
34 OverlayView(BMessage *data);
35 ~OverlayView();
36 virtual void Draw(BRect);
37 virtual void MessageReceived(BMessage *msg);
38 static BArchivable *Instantiate(BMessage *archive);
39 virtual status_t Archive(BMessage *data, bool deep = true) const;
40 void OverlayAboutRequested();
42 private:
43 BBitmap *fBitmap;
44 bool fReplicated;
45 BTextView *fText;
48 #endif // OVERLAY_VIEW_H