Commit f2c3d18e authored by Gustavo Carneiro's avatar Gustavo Carneiro
Browse files

Move HistoryScrollNone Class to a new file.

parent 2d52fb86
......@@ -67,6 +67,7 @@ set(konsoleprivate_SRCS ${sessionadaptors_SRCS}
HistoryFile.cpp
HistoryScroll.cpp
HistoryScrollFile.cpp
HistoryScrollNone.cpp
HistorySizeDialog.cpp
widgets/HistorySizeWidget.cpp
widgets/IncrementalSearchBar.cpp
......
......@@ -60,47 +60,6 @@ using namespace Konsole;
at constant costs.
*/
// History Scroll None //////////////////////////////////////
HistoryScrollNone::HistoryScrollNone() :
HistoryScroll(new HistoryTypeNone())
{
}
HistoryScrollNone::~HistoryScrollNone() = default;
bool HistoryScrollNone::hasScroll()
{
return false;
}
int HistoryScrollNone::getLines()
{
return 0;
}
int HistoryScrollNone::getLineLen(int)
{
return 0;
}
bool HistoryScrollNone::isWrappedLine(int /*lineno*/)
{
return false;
}
void HistoryScrollNone::getCells(int, int, int, Character [])
{
}
void HistoryScrollNone::addCells(const Character [], int)
{
}
void HistoryScrollNone::addLine(bool)
{
}
////////////////////////////////////////////////////////////////
// Compact History Scroll //////////////////////////////////////
////////////////////////////////////////////////////////////////
......
......@@ -34,32 +34,14 @@
// History
#include "HistoryFile.h"
#include "HistoryScroll.h"
#include "HistoryScrollFile.h"
#include "HistoryScrollNone.h"
// Konsole
#include "Character.h"
namespace Konsole {
//////////////////////////////////////////////////////////////////////
// Nothing-based history (no history :-)
//////////////////////////////////////////////////////////////////////
class KONSOLEPRIVATE_EXPORT HistoryScrollNone : public HistoryScroll
{
public:
HistoryScrollNone();
~HistoryScrollNone() override;
bool hasScroll() override;
int getLines() override;
int getLineLen(int lineno) override;
void getCells(int lineno, int colno, int count, Character res[]) override;
bool isWrappedLine(int lineno) override;
void addCells(const Character a[], int count) override;
void addLine(bool previousWrapped = false) override;
};
//////////////////////////////////////////////////////////////////////
// History using compact storage
// This implementation uses a list of fixed-sized blocks
......
/*
This file is part of Konsole, an X terminal.
Copyright 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
*/
// Own
#include "HistoryScrollNone.h"
#include "History.h"
using namespace Konsole;
// History Scroll None //////////////////////////////////////
HistoryScrollNone::HistoryScrollNone() :
HistoryScroll(new HistoryTypeNone())
{
}
HistoryScrollNone::~HistoryScrollNone() = default;
bool HistoryScrollNone::hasScroll()
{
return false;
}
int HistoryScrollNone::getLines()
{
return 0;
}
int HistoryScrollNone::getLineLen(int)
{
return 0;
}
bool HistoryScrollNone::isWrappedLine(int /*lineno*/)
{
return false;
}
void HistoryScrollNone::getCells(int, int, int, Character [])
{
}
void HistoryScrollNone::addCells(const Character [], int)
{
}
void HistoryScrollNone::addLine(bool)
{
}
/*
This file is part of Konsole, an X terminal.
Copyright 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
*/
#ifndef HISTORYSCROLLNONE_H
#define HISTORYSCROLLNONE_H
#include "konsoleprivate_export.h"
#include "HistoryScroll.h"
namespace Konsole
{
//////////////////////////////////////////////////////////////////////
// Nothing-based history (no history :-)
//////////////////////////////////////////////////////////////////////
class KONSOLEPRIVATE_EXPORT HistoryScrollNone : public HistoryScroll
{
public:
HistoryScrollNone();
~HistoryScrollNone() override;
bool hasScroll() override;
int getLines() override;
int getLineLen(int lineno) override;
void getCells(int lineno, int colno, int count, Character res[]) override;
bool isWrappedLine(int lineno) override;
void addCells(const Character a[], int count) override;
void addLine(bool previousWrapped = false) override;
};
}
#endif
......@@ -26,7 +26,6 @@
#include "../session/Session.h"
#include "../Emulation.h"
#include "../History.h"
#include "../HistoryScrollFile.h"
using namespace Konsole;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment