libraries/lineeditor/src/cconsolebase_writer.cpp
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // cconsolebase_writer.cpp
       
     2 // 
       
     3 // Copyright (c) 2008 - 2010 Accenture. All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 // 
       
     9 // Initial Contributors:
       
    10 // Accenture - Initial contribution
       
    11 //
       
    12 
       
    13 #include <e32base.h>
       
    14 #include "cconsolebase_writer.h"
       
    15 #include <e32cons.h>
       
    16 
       
    17 //______________________________________________________________________________
       
    18 //						TConsoleBaseAdaptor
       
    19 EXPORT_C TConsoleBaseAdaptor::TConsoleBaseAdaptor(CConsoleBase& aConsole)
       
    20 	: iConsole(aConsole)
       
    21 	{
       
    22 	}
       
    23 
       
    24 TInt TConsoleBaseAdaptor::GetCursorPos(TPoint& aPos) const
       
    25 	{
       
    26 	aPos = iConsole.CursorPos();
       
    27 	return KErrNone;
       
    28 	}
       
    29 
       
    30 TInt TConsoleBaseAdaptor::SetCursorPosAbs(const TPoint& aPos)
       
    31 	{
       
    32 	iConsole.SetCursorPosAbs(aPos);
       
    33 	return KErrNone;
       
    34 	}
       
    35 
       
    36 TInt TConsoleBaseAdaptor::SetCursorPosRel(const TPoint& aPos)
       
    37 	{
       
    38 	iConsole.SetCursorPosRel(aPos);
       
    39 	return KErrNone;
       
    40 	}
       
    41 
       
    42 TInt TConsoleBaseAdaptor::SetCursorHeight(TInt aPercentage)
       
    43 	{
       
    44 	iConsole.SetCursorHeight(aPercentage);
       
    45 	return KErrNone;
       
    46 	}
       
    47 
       
    48 TInt TConsoleBaseAdaptor::SetTitle(const TDesC& aTitle)
       
    49 	{
       
    50 	iConsole.SetTitle(aTitle);
       
    51 	return KErrNone;
       
    52 	}
       
    53 
       
    54 TInt TConsoleBaseAdaptor::ClearScreen()
       
    55 	{
       
    56 	iConsole.ClearScreen();
       
    57 	return KErrNone;
       
    58 	}
       
    59 
       
    60 TInt TConsoleBaseAdaptor::ClearToEndOfLine()
       
    61 	{
       
    62 	iConsole.ClearToEndOfLine();
       
    63 	return KErrNone;
       
    64 	}
       
    65 
       
    66 TInt TConsoleBaseAdaptor::GetScreenSize(TSize& aSize) const
       
    67 	{
       
    68 	aSize = iConsole.ScreenSize();
       
    69 	return KErrNone;
       
    70 	}
       
    71 
       
    72 TInt TConsoleBaseAdaptor::Write(const TDesC& aDes)
       
    73 	{
       
    74 	iConsole.Write(aDes);
       
    75 	return KErrNone;
       
    76 	}