1 /* 2 * Copyright 2014, Stephan Aßmus <superstippi@gmx.de>. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 #ifndef LINK_VIEW_H 6 #define LINK_VIEW_H 7 8 9 #include <Invoker.h> 10 #include <StringView.h> 11 12 13 class LinkView : public BStringView, public BInvoker { 14 public: 15 LinkView(const char* name, const char* string, 16 BMessage* message); 17 18 virtual void AttachedToWindow(); 19 20 virtual void MouseMoved(BPoint where, uint32 transit, 21 const BMessage* dragMessage); 22 virtual void MouseDown(BPoint where); 23 24 virtual void Draw(BRect updateRect); 25 26 virtual void MessageReceived(BMessage* message); 27 void SetEnabled(bool enabled); 28 29 private: 30 void _UpdateLinkColor(); 31 32 private: 33 34 bool fEnabled; 35 bool fMouseInside; 36 }; 37 38 39 #endif // LINK_VIEW_H 40