int CompactHistoryScroll::getLineLen ( int lineNumber ) { Q_ASSERT ( lineNumber >= 0 && lineNumber < lines.size() ); CompactHistoryLine* line = lines[lineNumber]; //kDebug() << "request for line at address " << line; return line->getLength(); }
void CompactHistoryScroll::getCells ( int lineNumber, int startColumn, int count, Character buffer[] ) { if ( count == 0 ) return; Q_ASSERT ( lineNumber < lines.size() ); CompactHistoryLine* line = lines[lineNumber]; Q_ASSERT ( startColumn >= 0 ); Q_ASSERT ( (unsigned int)startColumn <= line->getLength() - count ); line->getCharacters ( buffer, count, startColumn ); }
int CompactHistoryScroll::getLineLen(int lineNumber) { if ((lineNumber < 0) || (lineNumber >= _lines.size())) { //qDebug() << "requested line invalid: 0 < " << lineNumber << " < " <<_lines.size(); //Q_ASSERT(lineNumber >= 0 && lineNumber < _lines.size()); return 0; } CompactHistoryLine* line = _lines[lineNumber]; ////qDebug() << "request for line at address " << line; return line->getLength(); }
void CompactHistoryScroll::addLine ( bool previousWrapped ) { CompactHistoryLine *line = lines.last(); //kDebug() << "last line at address " << line; line->setWrapped(previousWrapped); }