Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
82 lines (64 sloc) 2.34 KB
* Copyright (C) 2009, Alexander Stigsen,
* This software is licensed under the Open Company License as described
* in the file license.txt, which you should have received as part of this
* distribution. The terms are also available at
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
#include "LineList.h"
class FixedLine;
class DocumentWrapper;
class LineListNoWrap : public LineList {
LineListNoWrap(FixedLine& l, const DocumentWrapper& dw);
virtual ~LineListNoWrap() {};
unsigned int offset(unsigned int index);
unsigned int end(unsigned int index);
unsigned int top(unsigned int index);
unsigned int bottom(unsigned int index);
unsigned int size() const;
unsigned int last() const;
unsigned int height() const;
unsigned int length() const;
unsigned int width() const {return m_maxWidth;};
bool IsLineEnd(unsigned int pos);
unsigned int EndFromPos(unsigned int pos);
unsigned int StartFromPos(unsigned int pos);
std::vector<unsigned int>& GetOffsets();
void SetOffsets(const std::vector<unsigned int>& offsets);
void NewOffsets();
void insert(unsigned int index, int newend);
void insertlines(unsigned int index, std::vector<unsigned int>& newlines);
void update(unsigned int index, unsigned int newend);
void update_parsed_line(unsigned int index);
void update_line_extent(unsigned int index, unsigned int extent);
void remove(unsigned int start, unsigned int end);
void clear();
int find_offset(int offset);
int find_ypos(unsigned int ypos);
void invalidate(int index=0);
void widthchanged(int) {};
int prepare(int) {return 0;};
int OnIdle() {return 0;};
bool NeedIdle() const {return false;};
void Print();
void verify(bool deep=false) const;
bool IsValidIndex(unsigned int index) const;
// Member variables
FixedLine& m_line;
const DocumentWrapper& m_doc;
unsigned int m_maxWidth;
std::vector<unsigned int> m_textOffsets;
std::vector<unsigned int> m_lineWidths;
LineListNoWrap& operator = (const LineListNoWrap& other);