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, rgb_color color); 17 18 virtual void MouseMoved(BPoint where, uint32 transit, 19 const BMessage* dragMessage); 20 virtual void MouseDown(BPoint where); 21 22 virtual void Draw(BRect updateRect); 23 24 void SetEnabled(bool enabled); 25 26 private: 27 void _UpdateLinkColor(); 28 29 private: 30 rgb_color fNormalColor; 31 rgb_color fHoverColor; 32 33 bool fEnabled; 34 bool fMouseInside; 35 }; 36 37 38 #endif // LINK_VIEW_H 39