vfs: check userland buffers before reading them.
[haiku.git] / src / tests / servers / app / newClipping / MyView.h
blob846ae2b792890964d1d7eecbe854389c6382f020
1 #include <OS.h>
2 #include <View.h>
3 #include <Region.h>
5 class Layer;
7 class MyView: public BView
9 public:
10 MyView(BRect frame, const char *name, uint32 resizingMode, uint32 flags);
11 virtual ~MyView();
13 virtual void Draw(BRect area);
14 virtual void MouseDown(BPoint where);
15 virtual void MouseUp(BPoint where);
16 virtual void MouseMoved(BPoint where, uint32 code, const BMessage *a_message);
17 virtual void MessageReceived(BMessage*);
19 void CopyRegion(BRegion *region, int32 xOffset, int32 yOffset);
20 void RequestRedraw();
22 Layer* FindLayer(Layer *lay, BPoint &where) const;
24 Layer *topLayer;
25 BRegion fRedrawReg;
26 private:
27 void DrawSubTree(Layer* lay);
29 bool fTracking;
30 BPoint fLastPos;
31 Layer *fMovingLayer;
32 bool fIsResize;
33 bool fIs2ndButton;