definitions). * Minor cleanup here and there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
50 lines
1.1 KiB
C++
50 lines
1.1 KiB
C++
/*
|
|
* Copyright 2002-2007, Haiku, Inc. All Rights Reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Mattias Sundblad
|
|
* Andrew Bachmann
|
|
* Axel Dörfler, [email protected]
|
|
*/
|
|
#ifndef STYLED_EDIT_VIEW_H
|
|
#define STYLED_EDIT_VIEW_H
|
|
|
|
|
|
#include <String.h>
|
|
#include <TextView.h>
|
|
|
|
class BFile;
|
|
class BHandler;
|
|
class BMessenger;
|
|
class BPositionIO;
|
|
|
|
|
|
class StyledEditView : public BTextView {
|
|
public:
|
|
StyledEditView(BRect viewframe, BRect textframe,
|
|
BHandler *handler);
|
|
virtual ~StyledEditView();
|
|
|
|
virtual void Select(int32 start, int32 finish);
|
|
virtual void DeleteText(int32 start, int32 finish);
|
|
virtual void FrameResized(float width, float height);
|
|
virtual void InsertText(const char *text, int32 length, int32 offset,
|
|
const text_run_array *runs = NULL);
|
|
|
|
void Reset();
|
|
status_t GetStyledText(BPositionIO* stream);
|
|
status_t WriteStyledEditFile(BFile* file);
|
|
|
|
void SetEncoding(uint32 encoding);
|
|
uint32 GetEncoding() const;
|
|
|
|
private:
|
|
BMessenger *fMessenger;
|
|
bool fSuppressChanges;
|
|
BString fEncoding;
|
|
};
|
|
|
|
#endif // STYLED_EDIT_VIEW_H
|
|
|