[dasher: 156/217] Added EDIT_PAGE edit distance to core.
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher: 156/217] Added EDIT_PAGE edit distance to core.
- Date: Sat, 27 Feb 2016 12:13:26 +0000 (UTC)
commit ea71818ce2b310309593b58ab5a3169765d014a2
Author: Ada Majorek <amajorek google com>
Date: Thu Dec 31 15:52:30 2015 -0800
Added EDIT_PAGE edit distance to core.
Src/DasherCore/ControlManager.cpp | 6 ++++++
Src/DasherCore/ControlManager.h | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/Src/DasherCore/ControlManager.cpp b/Src/DasherCore/ControlManager.cpp
index 12112ec..0bbcf2d 100644
--- a/Src/DasherCore/ControlManager.cpp
+++ b/Src/DasherCore/ControlManager.cpp
@@ -330,6 +330,7 @@ CControlManager::CControlManager(CSettingsUser *pCreateFrom, CNodeCreationManage
m_actions["pause"] = new Pause();
if (pInterface->SupportsSpeech()) {
m_actions["speak what=all"] = new TextDistanceAction(m_pSpeech, EDIT_FILE);
+ m_actions["speak what=page"] = new TextDistanceAction(m_pSpeech, EDIT_PAGE);
m_actions["speak what=paragraph"] = new TextDistanceAction(m_pSpeech, EDIT_PARAGRAPH);
m_actions["speak what=sentence"] = new TextDistanceAction(m_pSpeech, EDIT_SENTENCE);
m_actions["speak what=line"] = new TextDistanceAction(m_pSpeech, EDIT_LINE);
@@ -340,6 +341,7 @@ CControlManager::CControlManager(CSettingsUser *pCreateFrom, CNodeCreationManage
}
if (pInterface->SupportsClipboard()) {
m_actions["copy what=all"] = new TextDistanceAction(m_pCopy, EDIT_FILE);
+ m_actions["copy what=page"] = new TextDistanceAction(m_pCopy, EDIT_PAGE);
m_actions["copy what=paragraph"] = new TextDistanceAction(m_pCopy, EDIT_PARAGRAPH);
m_actions["copy what=sentence"] = new TextDistanceAction(m_pCopy, EDIT_SENTENCE);
m_actions["copy what=line"] = new TextDistanceAction(m_pCopy, EDIT_LINE);
@@ -352,6 +354,7 @@ CControlManager::CControlManager(CSettingsUser *pCreateFrom, CNodeCreationManage
m_actions["move dist=line forward=yes"] = new Move(true, EDIT_LINE);
m_actions["move dist=sentence forward=yes"] = new Move(true, EDIT_SENTENCE);
m_actions["move dist=paragraph forward=yes"] = new Move(true, EDIT_PARAGRAPH);
+ m_actions["move dist=page forward=yes"] = new Move(true, EDIT_PAGE);
m_actions["move dist=all forward=yes"] = new Move(true, EDIT_FILE);
m_actions["move dist=char forward=no"] = new Move(false, EDIT_CHAR);
@@ -359,6 +362,7 @@ CControlManager::CControlManager(CSettingsUser *pCreateFrom, CNodeCreationManage
m_actions["move dist=line forward=no"] = new Move(false, EDIT_LINE);
m_actions["move dist=sentence forward=no"] = new Move(false, EDIT_SENTENCE);
m_actions["move dist=paragraph forward=no"] = new Move(false, EDIT_PARAGRAPH);
+ m_actions["move dist=page forward=no"] = new Move(false, EDIT_PAGE);
m_actions["move dist=all forward=no"] = new Move(false, EDIT_FILE);
m_actions["delete dist=char forward=yes"] = new Delete(true, EDIT_CHAR);
@@ -366,6 +370,7 @@ CControlManager::CControlManager(CSettingsUser *pCreateFrom, CNodeCreationManage
m_actions["delete dist=line forward=yes"] = new Delete(true, EDIT_LINE);
m_actions["delete dist=sentence forward=yes"] = new Delete(true, EDIT_SENTENCE);
m_actions["delete dist=paragraph forward=yes"] = new Delete(true, EDIT_PARAGRAPH);
+ m_actions["delete dist=page forward=yes"] = new Delete(true, EDIT_PAGE);
m_actions["delete dist=all forward=yes"] = new Delete(true, EDIT_FILE);
m_actions["delete dist=char forward=no"] = new Delete(false, EDIT_CHAR);
@@ -373,6 +378,7 @@ CControlManager::CControlManager(CSettingsUser *pCreateFrom, CNodeCreationManage
m_actions["delete dist=line forward=no"] = new Delete(false, EDIT_LINE);
m_actions["delete dist=sentence forward=no"] = new Delete(false, EDIT_SENTENCE);
m_actions["delete dist=paragraph forward=no"] = new Delete(false, EDIT_PARAGRAPH);
+ m_actions["delete dist=page forward=no"] = new Delete(false, EDIT_PAGE);
m_actions["delete dist=all forward=no"] = new Delete(false, EDIT_FILE);
m_pInterface->ScanFiles(this, "control.xml"); //just look for the one
diff --git a/Src/DasherCore/ControlManager.h b/Src/DasherCore/ControlManager.h
index dee835f..3e8feb7 100644
--- a/Src/DasherCore/ControlManager.h
+++ b/Src/DasherCore/ControlManager.h
@@ -184,7 +184,7 @@ namespace Dasher {
void HandleEvent(int iParameter);
typedef enum {
- EDIT_CHAR, EDIT_WORD, EDIT_SENTENCE, EDIT_PARAGRAPH, EDIT_FILE, EDIT_LINE, EDIT_SELECTION,
+ EDIT_CHAR, EDIT_WORD, EDIT_SENTENCE, EDIT_PARAGRAPH, EDIT_FILE, EDIT_LINE, EDIT_PAGE, EDIT_SELECTION,
} EditDistance;
///Recomputes which of pause, stop, speak and copy the root control node should have amongst its
children.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]