2 * Copyright 2005-2011, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
8 * Copyright 1999, Be Incorporated. All Rights Reserved.
9 * This file may be used under the terms of the Be Sample Code License.
11 #ifndef ATTRIBUTE_TEXT_CONTROL_H
12 #define ATTRIBUTE_TEXT_CONTROL_H
15 #include <TextControl.h>
18 class AttributeTextControl
: public BTextControl
{
20 AttributeTextControl(const char* label
,
21 const char* attribute
);
22 virtual ~AttributeTextControl();
24 virtual void MouseDown(BPoint
);
25 virtual void MouseMoved(BPoint
, uint32
, const BMessage
*);
31 const BString
& Attribute() const
32 { return fAttribute
; }
35 const BString
& _MakeUniformUrl(BString
&url
) const;
36 const BString
& _BuildMimeString(BString
&mimeType
,
37 const BString
&url
) const;
39 bool _ContainsUrl() const;
41 BRect
_VisibleLabelBounds() const;
42 void _HandleLabelClicked(const char*);
46 BString fOriginalValue
;
49 #endif // ATTRIBUTE_TEXT_CONTROL_H