2 * Copyright 2013, Stephan Aßmus <superstippi@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
11 #include "Paragraph.h"
12 #include "ParagraphLayout.h"
15 class TextView
: public BView
{
17 TextView(const char* name
= NULL
);
20 virtual void Draw(BRect updateRect
);
22 virtual void AttachedToWindow();
23 virtual void FrameResized(float width
, float height
);
25 virtual BSize
MinSize();
26 virtual BSize
MaxSize();
27 virtual BSize
PreferredSize();
29 virtual bool HasHeightForWidth();
30 virtual void GetHeightForWidth(float width
, float* min
,
31 float* max
, float* preferred
);
33 void SetText(const BString
& text
);
34 void SetParagraphStyle(const ::ParagraphStyle
& style
);
35 const ::ParagraphStyle
& ParagraphStyle() const
36 { return fText
.Style(); }
40 ParagraphLayout fTextLayout
;