-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathProxyView.cpp
More file actions
68 lines (50 loc) · 1.28 KB
/
ProxyView.cpp
File metadata and controls
68 lines (50 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright 2009, Ryan Leavengood, leavengood@gmail.com
// All rights reserved.
//
// Distributed under the terms of the MIT License.
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include "ProxyView.h"
#include "Constants.h"
#include <Application.h>
#include <MessageFilter.h>
#include <String.h>
#include <Window.h>
#include <stdio.h>
#include <syslog.h>
ProxyView::ProxyView(BRect frame, const char *name)
: BView(frame, name, B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_FRAME_EVENTS)
{
}
ProxyView::~ProxyView()
{
}
void
ProxyView::Draw(BRect updateRect)
{
}
void
ProxyView::FrameResized(float width, float height)
{
}
void
ProxyView::MouseDown(BPoint point)
{
syslog(LOG_DEBUG, "Tranquility, ProxyView: received mouse down message, forwarding it to be_app");
_ForwardCurrentMessage();
}
void
ProxyView::MouseMoved(BPoint point, uint32 transit, const BMessage* message)
{
syslog(LOG_DEBUG, "Tranquility, ProxyView: received mouse moved message, forwarding it to be_app");
_ForwardCurrentMessage();
}
void
ProxyView::_ForwardCurrentMessage()
{
BMessage forward(kMsgForward);
forward.AddMessage("original", Window()->CurrentMessage());
be_app->PostMessage(&forward);
}