* style fixes to textview_support class LineBuffer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38005 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -6,8 +6,10 @@
|
|||||||
* Marc Flerackers ([email protected])
|
* Marc Flerackers ([email protected])
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "LineBuffer.h"
|
#include "LineBuffer.h"
|
||||||
|
|
||||||
|
|
||||||
BTextView::LineBuffer::LineBuffer()
|
BTextView::LineBuffer::LineBuffer()
|
||||||
: _BTextViewSupportBuffer_<STELine>(20, 2)
|
: _BTextViewSupportBuffer_<STELine>(20, 2)
|
||||||
{
|
{
|
||||||
@@ -20,7 +22,7 @@ BTextView::LineBuffer::~LineBuffer()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BTextView::LineBuffer::InsertLine(STELine *inLine, int32 index)
|
BTextView::LineBuffer::InsertLine(STELine* inLine, int32 index)
|
||||||
{
|
{
|
||||||
InsertItemsAt(1, index, inLine);
|
InsertItemsAt(1, index, inLine);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
* Authors:
|
* Authors:
|
||||||
* Marc Flerackers ([email protected])
|
* Marc Flerackers ([email protected])
|
||||||
*/
|
*/
|
||||||
|
#ifndef __LINE_BUFFER_H
|
||||||
|
#define __LINE_BUFFER_H
|
||||||
|
|
||||||
|
|
||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
#include <TextView.h>
|
#include <TextView.h>
|
||||||
@@ -22,22 +25,23 @@ struct STELine {
|
|||||||
class BTextView::LineBuffer : public _BTextViewSupportBuffer_<STELine> {
|
class BTextView::LineBuffer : public _BTextViewSupportBuffer_<STELine> {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LineBuffer();
|
LineBuffer();
|
||||||
virtual ~LineBuffer();
|
virtual ~LineBuffer();
|
||||||
|
|
||||||
void InsertLine(STELine *inLine, int32 index);
|
void InsertLine(STELine* inLine, int32 index);
|
||||||
void RemoveLines(int32 index, int32 count = 1);
|
void RemoveLines(int32 index, int32 count = 1);
|
||||||
void RemoveLineRange(int32 fromOffset, int32 toOffset);
|
void RemoveLineRange(int32 fromOffset,
|
||||||
|
int32 toOffset);
|
||||||
|
|
||||||
int32 OffsetToLine(int32 offset) const;
|
int32 OffsetToLine(int32 offset) const;
|
||||||
int32 PixelToLine(float pixel) const;
|
int32 PixelToLine(float pixel) const;
|
||||||
|
|
||||||
void BumpOrigin(float delta, int32 index);
|
void BumpOrigin(float delta, int32 index);
|
||||||
void BumpOffset(int32 delta, int32 index);
|
void BumpOffset(int32 delta, int32 index);
|
||||||
|
|
||||||
long NumLines() const;
|
long NumLines() const;
|
||||||
float MaxWidth() const;
|
float MaxWidth() const;
|
||||||
STELine * operator[](int32 index) const;
|
STELine* operator[](int32 index) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -53,3 +57,6 @@ BTextView::LineBuffer::operator[](int32 index) const
|
|||||||
{
|
{
|
||||||
return &fBuffer[index];
|
return &fBuffer[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif // __LINE_BUFFER_H
|
||||||
|
|||||||
Reference in New Issue
Block a user