2 * Copyright 2002-2007, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
8 * Axel Dörfler, axeld@pinc-software.de
10 #ifndef STYLED_EDIT_VIEW_H
11 #define STYLED_EDIT_VIEW_H
23 class StyledEditView
: public BTextView
{
25 StyledEditView(BRect viewframe
, BRect textframe
,
27 virtual ~StyledEditView();
29 virtual void FrameResized(float width
, float height
);
30 virtual void DeleteText(int32 start
, int32 finish
);
31 virtual void InsertText(const char* text
, int32 length
,
33 const text_run_array
* runs
= NULL
);
34 virtual void Select(int32 start
, int32 finish
);
37 void SetSuppressChanges(bool suppressChanges
);
38 status_t
GetStyledText(BPositionIO
* stream
,
39 const char* forceEncoding
= NULL
);
40 status_t
WriteStyledEditFile(BFile
* file
);
42 void SetEncoding(uint32 encoding
);
43 uint32
GetEncoding() const;
48 BMessenger
* fMessenger
;
49 bool fSuppressChanges
;
51 rgb_color fInitialColor
;
55 #endif // STYLED_EDIT_VIEW_H