1f7afd44bSPhil Greenway #ifndef STYLED_EDIT_VIEW_H 2f7afd44bSPhil Greenway #define STYLED_EDIT_VIEW_H 3f7afd44bSPhil Greenway 40b46ec98Sshatty #include <File.h> 5f7afd44bSPhil Greenway #include <TextView.h> 6ed48868fSshatty #include <DataIO.h> 7f7afd44bSPhil Greenway 8f7afd44bSPhil Greenway class StyledEditView : public BTextView { 9f7afd44bSPhil Greenway public: 10f7afd44bSPhil Greenway StyledEditView(BRect viewframe, BRect textframe, BHandler *handler); 11f7afd44bSPhil Greenway ~StyledEditView(); 12f7afd44bSPhil Greenway 13f7afd44bSPhil Greenway virtual void Select(int32 start, int32 finish); 14f7afd44bSPhil Greenway virtual void FrameResized(float width, float height); 15ed48868fSshatty 16ed48868fSshatty virtual void Reset(); 17ed48868fSshatty virtual status_t GetStyledText(BPositionIO * stream); 18670567f9Sshatty virtual status_t WriteStyledEditFile(BFile * file); 19670567f9Sshatty 20670567f9Sshatty virtual void SetEncoding(uint32 encoding); 21670567f9Sshatty virtual uint32 GetEncoding() const; 22f7afd44bSPhil Greenway protected: 23*ebf4610fSshatty virtual void InsertText(const char *text, int32 length, int32 offset, const text_run_array *runs = NULL); 24f7afd44bSPhil Greenway virtual void DeleteText(int32 start, int32 finish); 25f7afd44bSPhil Greenway 26f7afd44bSPhil Greenway private: 27f7afd44bSPhil Greenway BHandler *fHandler; 28f7afd44bSPhil Greenway BMessage *fChangeMessage; 29f7afd44bSPhil Greenway BMessenger *fMessenger; 30ed48868fSshatty bool fSuppressChanges; 31670567f9Sshatty uint32 fEncoding; 32f7afd44bSPhil Greenway }; 33f7afd44bSPhil Greenway 34ed48868fSshatty #endif // STYLED_EDIT_VIEW_H 35