2 * Copyright 2014, Stephan Aßmus <superstippi@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
7 #include "LinkedBitmapView.h"
12 LinkedBitmapView::LinkedBitmapView(const char* name
, BMessage
* message
)
15 BInvoker(message
, NULL
),
23 LinkedBitmapView::AllAttached()
25 // We don't want to use BitmapView's default behavior here.
30 LinkedBitmapView::MouseMoved(BPoint where
, uint32 transit
,
31 const BMessage
* dragMessage
)
33 // TODO: Check that no buttons are pressed, don't indicate clickable
34 // link if a button is held.
35 if (transit
== B_ENTERED_VIEW
) {
38 } else if (transit
== B_EXITED_VIEW
) {
46 LinkedBitmapView::MouseDown(BPoint where
)
54 LinkedBitmapView::SetEnabled(bool enabled
)
56 if (fEnabled
!= enabled
) {
64 LinkedBitmapView::_UpdateViewCursor()
66 if (fEnabled
&& fMouseInside
) {
67 BCursor
cursor(B_CURSOR_ID_FOLLOW_LINK
);
68 SetViewCursor(&cursor
, true);
70 BCursor
cursor(B_CURSOR_SYSTEM_DEFAULT
);
71 SetViewCursor(&cursor
, true);