xref: /haiku/src/apps/stylededit/StyledEditView.h (revision ed48868f638d5129cdd21b59f36e8e227a05aaaa)
1f7afd44bSPhil Greenway #ifndef STYLED_EDIT_VIEW_H
2f7afd44bSPhil Greenway #define STYLED_EDIT_VIEW_H
3f7afd44bSPhil Greenway 
4f7afd44bSPhil Greenway #include <TextView.h>
5*ed48868fSshatty #include <DataIO.h>
6f7afd44bSPhil Greenway 
7f7afd44bSPhil Greenway class StyledEditView : public BTextView {
8f7afd44bSPhil Greenway public:
9f7afd44bSPhil Greenway 	StyledEditView(BRect viewframe, BRect textframe, BHandler *handler);
10f7afd44bSPhil Greenway 	~StyledEditView();
11f7afd44bSPhil Greenway 
12f7afd44bSPhil Greenway 	virtual void Select(int32 start, int32 finish);
13f7afd44bSPhil Greenway 	virtual void FrameResized(float width, float height);
14*ed48868fSshatty 
15*ed48868fSshatty 	virtual void Reset();
16*ed48868fSshatty 	virtual status_t GetStyledText(BPositionIO * stream);
17f7afd44bSPhil Greenway protected:
18f7afd44bSPhil Greenway 	virtual void InsertText(const char *text, int32 length, int32 offset, const text_run_array *runs);
19f7afd44bSPhil Greenway 	virtual void DeleteText(int32 start, int32 finish);
20f7afd44bSPhil Greenway 
21f7afd44bSPhil Greenway private:
22f7afd44bSPhil Greenway 	BHandler	*fHandler;
23f7afd44bSPhil Greenway 	BMessage	*fChangeMessage;
24f7afd44bSPhil Greenway 	BMessenger 	*fMessenger;
25*ed48868fSshatty 	bool		fSuppressChanges;
26f7afd44bSPhil Greenway };
27f7afd44bSPhil Greenway 
28*ed48868fSshatty #endif // STYLED_EDIT_VIEW_H
29