vfs: check userland buffers before reading them.
[haiku.git] / src / tests / servers / app / newerClipping / drawing / DrawView.cpp
blob8263feb2fa41f8bae08c01d535a88b6ab6605a13
2 #include <stdio.h>
4 #include <Message.h>
6 #include "Desktop.h"
8 #include "DrawView.h"
10 // constructor
11 DrawView::DrawView(BRect frame)
12 : BView(frame, "desktop", B_FOLLOW_ALL, 0),
13 fDesktop(NULL)
15 SetViewColor(B_TRANSPARENT_COLOR);
18 // destructor
19 DrawView::~DrawView()
23 // MouseDown
24 void
25 DrawView::MouseDown(BPoint where)
27 SetMouseEventMask(B_POINTER_EVENTS, B_LOCK_WINDOW_FOCUS);
29 fDesktop->PostMessage(Window()->CurrentMessage());
32 // MouseUp
33 void
34 DrawView::MouseUp(BPoint where)
36 fDesktop->PostMessage(Window()->CurrentMessage());
39 // MouseMoved
40 void
41 DrawView::MouseMoved(BPoint where, uint32 code, const BMessage* dragMessage)
43 fDesktop->PostMessage(Window()->CurrentMessage());
46 // SetDesktop
47 void
48 DrawView::SetDesktop(Desktop* desktop)
50 fDesktop = desktop;