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, uint32 charSet = 0); 19 protected: 20 virtual void InsertText(const char *text, int32 length, int32 offset, const text_run_array *runs); 21 virtual void DeleteText(int32 start, int32 finish); 22 23 private: 24 BHandler *fHandler; 25 BMessage *fChangeMessage; 26 BMessenger *fMessenger; 27 bool fSuppressChanges; 28 }; 29 30 #endif // STYLED_EDIT_VIEW_H 31