~macslow/nux/nux.fix-839476

« back to all changes in this revision

Viewing changes to Nux/TextView/TextViewKeyNav.cpp

  • Committer: Neil Jagdish Patel
  • Date: 2010-09-01 22:11:16 UTC
  • Revision ID: neil.patel@canonical.com-20100901221116-4hb351fcg6s5nka0
Initial Nux integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2010 Inalogic Inc.
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify it 
 
5
 * under the terms of the GNU Lesser General Public License version 3, as
 
6
 * published by the  Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful, but 
 
9
 * WITHOUT ANY WARRANTY; without even the implied warranties of 
 
10
 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR 
 
11
 * PURPOSE.  See the applicable version of the GNU Lesser General Public 
 
12
 * License for more details.
 
13
 * 
 
14
 * You should have received a copy of both the GNU Lesser General Public 
 
15
 * License version 3 along with this program.  If not, see 
 
16
 * <http://www.gnu.org/licenses/>
 
17
 *
 
18
 * Authored by: Jay Taoko <jay.taoko_AT_gmail_DOT_com>
 
19
 *
 
20
 */
 
21
 
 
22
 
 
23
#include "Nux.h"
 
24
#include "TextView.h"
 
25
#include "TextViewInternal.h"
 
26
 
 
27
NAMESPACE_BEGIN_GUI
 
28
 
 
29
//
 
30
//      Move caret up specified number of lines
 
31
//
 
32
void TextView::MoveLineUp(int numLines)
 
33
{
 
34
//     USPDATA                  * uspData;
 
35
//     ULONG                      lineOffset;
 
36
// 
 
37
//     int                                charPos;
 
38
//     BOOL                       trailing;
 
39
// 
 
40
//     m_nCurrentLine -= min(m_nCurrentLine, (unsigned)numLines);
 
41
// 
 
42
//     // get Uniscribe data for prev line
 
43
//     uspData = GetUspData(0, m_nCurrentLine, &lineOffset);
 
44
// 
 
45
//     // move up to character nearest the caret-anchor positions
 
46
//     UspXToOffset(uspData, m_nAnchorPosX, &charPos, &trailing, 0);
 
47
// 
 
48
//     m_nCursorOffset = lineOffset + charPos + trailing;
 
49
}
 
50
 
 
51
//
 
52
//      Move caret down specified number of lines
 
53
//
 
54
// VOID TextView::MoveLineDown(int numLines)
 
55
// {
 
56
//     USPDATA                  * uspData;
 
57
//     ULONG                      lineOffset;
 
58
// 
 
59
//     int                                charPos;
 
60
//     BOOL                       trailing;
 
61
// 
 
62
//     m_nCurrentLine += min(m_nLineCount-m_nCurrentLine-1, (unsigned)numLines);
 
63
// 
 
64
//     // get Uniscribe data for prev line
 
65
//     uspData = GetUspData(0, m_nCurrentLine, &lineOffset);
 
66
// 
 
67
//     // move down to character nearest the caret-anchor position
 
68
//     UspXToOffset(uspData, m_nAnchorPosX, &charPos, &trailing, 0);
 
69
// 
 
70
//     m_nCursorOffset = lineOffset + charPos + trailing;
 
71
// }
 
72
 
 
73
 
 
74
 NAMESPACE_END_GUI
 
75