-
-
Notifications
You must be signed in to change notification settings - Fork 336
/
TextView.h
38 lines (27 loc) · 829 Bytes
/
TextView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* Copyright 2013, Stephan Aßmus <superstippi@gmx.de>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef TEXT_VIEW_H
#define TEXT_VIEW_H
#include <String.h>
#include <View.h>
#include "TextLayout.h"
class TextView : public BView {
public:
TextView(const char* name = NULL);
virtual ~TextView();
virtual void Draw(BRect updateRect);
virtual void AttachedToWindow();
virtual void FrameResized(float width, float height);
virtual BSize MinSize();
virtual BSize MaxSize();
virtual BSize PreferredSize();
virtual bool HasHeightForWidth();
virtual void GetHeightForWidth(float width, float* min,
float* max, float* preferred);
void SetText(const BString& text);
private:
TextLayout fTextLayout;
};
#endif // TEXT_VIEW_H