xref: /haiku/src/tests/servers/app/newClipping/MyView.h (revision a4aff61d76253ff2252743e427cffac008d5de54)
1 #include <OS.h>
2 #include <View.h>
3 #include <Region.h>
4 
5 class Layer;
6 
7 class MyView: public BView
8 {
9 public:
10 						MyView(BRect frame, const char *name, uint32 resizingMode, uint32 flags);
11 	virtual				~MyView();
12 
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*);
18 
19 			void		CopyRegion(BRegion *region, int32 xOffset, int32 yOffset);
20 			void		RequestRedraw();
21 
22 			Layer*		FindLayer(Layer *lay, BPoint &where) const;
23 
24 			Layer		*topLayer;
25 			BRegion		fRedrawReg;
26 private:
27 			void		DrawSubTree(Layer* lay);
28 
29 			bool		fTracking;
30 			BPoint		fLastPos;
31 			Layer		*fMovingLayer;
32 			bool		fIsResize;
33 			bool		fIs2ndButton;
34 };