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