2002-09-23 23:01:55 +00:00
|
|
|
#ifndef STYLED_EDIT_VIEW_H
|
|
|
|
|
#define STYLED_EDIT_VIEW_H
|
|
|
|
|
|
2002-11-22 05:53:58 +00:00
|
|
|
#include <File.h>
|
2002-09-23 23:01:55 +00:00
|
|
|
#include <TextView.h>
|
2002-11-05 09:24:25 +00:00
|
|
|
#include <DataIO.h>
|
2002-09-23 23:01:55 +00:00
|
|
|
|
|
|
|
|
class StyledEditView : public BTextView {
|
2002-11-05 09:24:25 +00:00
|
|
|
public:
|
|
|
|
|
StyledEditView(BRect viewframe, BRect textframe, BHandler *handler);
|
|
|
|
|
~StyledEditView();
|
|
|
|
|
|
|
|
|
|
virtual void Select(int32 start, int32 finish);
|
|
|
|
|
virtual void FrameResized(float width, float height);
|
2002-09-23 23:01:55 +00:00
|
|
|
|
2002-11-05 09:24:25 +00:00
|
|
|
virtual void Reset();
|
|
|
|
|
virtual status_t GetStyledText(BPositionIO * stream);
|
2003-07-06 04:05:22 +00:00
|
|
|
virtual status_t WriteStyledEditFile(BFile * file);
|
|
|
|
|
|
|
|
|
|
virtual void SetEncoding(uint32 encoding);
|
|
|
|
|
virtual uint32 GetEncoding() const;
|
2002-11-05 09:24:25 +00:00
|
|
|
protected:
|
|
|
|
|
virtual void InsertText(const char *text, int32 length, int32 offset, const text_run_array *runs);
|
|
|
|
|
virtual void DeleteText(int32 start, int32 finish);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
BHandler *fHandler;
|
|
|
|
|
BMessage *fChangeMessage;
|
|
|
|
|
BMessenger *fMessenger;
|
|
|
|
|
bool fSuppressChanges;
|
2003-07-06 04:05:22 +00:00
|
|
|
uint32 fEncoding;
|
2002-09-23 23:01:55 +00:00
|
|
|
};
|
|
|
|
|
|
2002-11-05 09:24:25 +00:00
|
|
|
#endif // STYLED_EDIT_VIEW_H
|