[dasher: 6/21] Remove ActionButton, HandleClickDown/Up, don't pass coords to KeyDown/Up
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher: 6/21] Remove ActionButton, HandleClickDown/Up, don't pass coords to KeyDown/Up
- Date: Thu, 14 Jul 2011 17:31:39 +0000 (UTC)
commit 44e7651d0a51dfbe68c2ba43591e08d7c86e0f7c
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date: Sun Jul 10 15:26:23 2011 +0100
Remove ActionButton, HandleClickDown/Up, don't pass coords to KeyDown/Up
(should always be obtained from input device)
Gtk2+Mac, use 101=right mouse button; Win32 TODO; iPhone ???
Also change int iTime param to KeyDown/KeyUp into an unsigned long.
Rm corresponding "ExecuteCommand" method, and associated Gtk2 methods
- preserving some that are needed for standard commands like "Save"...
Data/GUI/dasher.compose.ui | 1 -
Data/GUI/dasher.direct.ui | 1 -
Data/GUI/dasher.fullscreen.ui | 1 -
Data/GUI/dasher.gameWIP.ui | 1 -
Data/GUI/dasher.traditional.ui | 1 -
Src/DasherCore/ActionButton.cpp | 49 ------------
Src/DasherCore/ActionButton.h | 37 ---------
Src/DasherCore/ButtonMode.cpp | 4 +-
Src/DasherCore/ButtonMode.h | 2 +-
Src/DasherCore/ButtonMultiPress.cpp | 2 +-
Src/DasherCore/ButtonMultiPress.h | 4 +-
Src/DasherCore/DasherButtons.cpp | 2 +-
Src/DasherCore/DasherButtons.h | 2 +-
Src/DasherCore/DasherInterfaceBase.cpp | 109 +--------------------------
Src/DasherCore/DasherInterfaceBase.h | 45 ++++-------
Src/DasherCore/DefaultFilter.cpp | 2 +-
Src/DasherCore/DefaultFilter.h | 2 +-
Src/DasherCore/DynamicButtons.cpp | 4 +-
Src/DasherCore/DynamicButtons.h | 4 +-
Src/DasherCore/InputFilter.h | 12 +--
Src/DasherCore/Makefile.am | 2 -
Src/DasherCore/OneButtonDynamicFilter.cpp | 14 ++--
Src/DasherCore/OneButtonDynamicFilter.h | 4 +-
Src/DasherCore/OneButtonFilter.cpp | 2 +-
Src/DasherCore/OneButtonFilter.h | 2 +-
Src/DasherCore/StylusFilter.cpp | 4 +-
Src/DasherCore/StylusFilter.h | 4 +-
Src/DasherCore/TwoButtonDynamicFilter.cpp | 28 ++++---
Src/DasherCore/TwoButtonDynamicFilter.h | 4 +-
Src/DasherCore/TwoPushDynamicFilter.cpp | 18 ++---
Src/DasherCore/TwoPushDynamicFilter.h | 4 +-
Src/Gtk2/DasherControl.cpp | 11 +--
Src/Gtk2/DasherControl.h | 3 -
Src/Gtk2/GtkDasherControl.cpp | 10 ---
Src/Gtk2/GtkDasherControl.h | 2 -
Src/Gtk2/dasher_editor_internal.cpp | 1 -
Src/Gtk2/dasher_editor_internal.h | 3 -
Src/Gtk2/dasher_main.cpp | 61 +--------------
Src/MacOSX/Dasher.xcodeproj/project.pbxproj | 8 --
Src/MacOSX/DasherViewOpenGL.mm | 8 +--
Src/Win32/Widgets/Canvas.cpp | 10 +--
Src/iPhone/Classes/EAGLView.mm | 4 +-
Src/iPhone/Classes/IPhoneFilters.h | 6 +-
Src/iPhone/Classes/IPhoneFilters.mm | 6 +-
Src/iPhone/Dasher.xcodeproj/project.pbxproj | 6 --
45 files changed, 97 insertions(+), 413 deletions(-)
---
diff --git a/Data/GUI/dasher.compose.ui b/Data/GUI/dasher.compose.ui
index 7f302af..f8558d4 100644
--- a/Data/GUI/dasher.compose.ui
+++ b/Data/GUI/dasher.compose.ui
@@ -459,7 +459,6 @@
<signal handler="on_lock_info" name="dasher_lock_info"/>
<signal handler="convert_cb" name="dasher_edit_convert"/>
<signal handler="protect_cb" name="dasher_edit_protect"/>
- <signal handler="on_command" name="dasher_command"/>
</object>
<packing>
<property name="shrink">True</property>
diff --git a/Data/GUI/dasher.direct.ui b/Data/GUI/dasher.direct.ui
index 71855e2..de09950 100644
--- a/Data/GUI/dasher.direct.ui
+++ b/Data/GUI/dasher.direct.ui
@@ -63,7 +63,6 @@
<signal handler="on_lock_info" name="dasher_lock_info"/>
<signal handler="convert_cb" name="dasher_edit_convert"/>
<signal handler="protect_cb" name="dasher_edit_protect"/>
- <signal handler="on_command" name="dasher_command"/>
</object>
<packing>
<property name="shrink">True</property>
diff --git a/Data/GUI/dasher.fullscreen.ui b/Data/GUI/dasher.fullscreen.ui
index 99ab982..00f183a 100644
--- a/Data/GUI/dasher.fullscreen.ui
+++ b/Data/GUI/dasher.fullscreen.ui
@@ -179,7 +179,6 @@
<signal handler="on_lock_info" last_modification_time="Wed, 22 Mar 2006 10:38:44 GMT" name="dasher_lock_info"/>
<signal handler="convert_cb" last_modification_time="Tue, 30 May 2006 14:21:15 GMT" name="dasher_edit_convert"/>
<signal handler="protect_cb" last_modification_time="Tue, 30 May 2006 14:21:26 GMT" name="dasher_edit_protect"/>
- <signal handler="on_command" last_modification_time="Thu, 14 Sep 2006 12:13:36 GMT" name="dasher_command"/>
</object>
</child>
</object>
diff --git a/Data/GUI/dasher.gameWIP.ui b/Data/GUI/dasher.gameWIP.ui
index c45a632..efded7d 100644
--- a/Data/GUI/dasher.gameWIP.ui
+++ b/Data/GUI/dasher.gameWIP.ui
@@ -654,7 +654,6 @@
<signal handler="on_lock_info" last_modification_time="Wed, 22 Mar 2006 10:38:44 GMT" name="dasher_lock_info"/>
<signal handler="convert_cb" last_modification_time="Tue, 30 May 2006 14:21:15 GMT" name="dasher_edit_convert"/>
<signal handler="protect_cb" last_modification_time="Tue, 30 May 2006 14:21:26 GMT" name="dasher_edit_protect"/>
- <signal handler="on_command" last_modification_time="Thu, 14 Sep 2006 12:13:36 GMT" name="dasher_command"/>
<signal handler="test_focus_handler" last_modification_time="Fri, 02 Feb 2007 14:30:40 GMT" name="focus-in-event"/>
</object>
<packing>
diff --git a/Data/GUI/dasher.traditional.ui b/Data/GUI/dasher.traditional.ui
index dbb49cc..4ebc02e 100644
--- a/Data/GUI/dasher.traditional.ui
+++ b/Data/GUI/dasher.traditional.ui
@@ -259,7 +259,6 @@
<signal handler="on_lock_info" name="dasher_lock_info"/>
<signal handler="convert_cb" name="dasher_edit_convert"/>
<signal handler="protect_cb" name="dasher_edit_protect"/>
- <signal handler="on_command" name="dasher_command"/>
<signal handler="test_focus_handler" name="focus-in-event"/>
</object>
<packing>
diff --git a/Src/DasherCore/ButtonMode.cpp b/Src/DasherCore/ButtonMode.cpp
index 5e8134a..69157c8 100644
--- a/Src/DasherCore/ButtonMode.cpp
+++ b/Src/DasherCore/ButtonMode.cpp
@@ -188,7 +188,7 @@ bool CButtonMode::Timer(unsigned long Time, CDasherView *pView, CDasherInput *pI
return CDasherButtons::Timer(Time, pView, pInput, pModel, pol);
}
-void CButtonMode::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog, bool bPos, int iX, int iY)
+void CButtonMode::KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog)
{
if (iId == 100 && !m_bMenu) {
//Mouse!
@@ -206,7 +206,7 @@ void CButtonMode::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *
}
//not in any box. Fall through, just to be conservative...
}
- CInputFilter::KeyDown(iTime, iId, pView, pInput, pModel, pUserLog, bPos, iX, iY);
+ CInputFilter::KeyDown(iTime, iId, pView, pInput, pModel, pUserLog);
}
void CButtonMode::DirectKeyDown(int iTime, int iId, CDasherView *pView, CDasherModel *pModel, CUserLogBase *pUserLog) {
diff --git a/Src/DasherCore/ButtonMode.h b/Src/DasherCore/ButtonMode.h
index 8126207..1c24798 100644
--- a/Src/DasherCore/ButtonMode.h
+++ b/Src/DasherCore/ButtonMode.h
@@ -28,7 +28,7 @@ class CButtonMode : public CDasherButtons
bool DecorateView(CDasherView *pView, CDasherInput *pInput);
//override to get mouse clicks/taps back again
- virtual void KeyDown(int Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog, bool bPos, int iX, int iY);
+ virtual void KeyDown(unsigned long Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
bool GetSettings(SModuleSettings **pSettings, int *iCount);
protected:
diff --git a/Src/DasherCore/ButtonMultiPress.cpp b/Src/DasherCore/ButtonMultiPress.cpp
index fdb4028..ca83c8f 100644
--- a/Src/DasherCore/ButtonMultiPress.cpp
+++ b/Src/DasherCore/ButtonMultiPress.cpp
@@ -27,7 +27,7 @@ CButtonMultiPress::CButtonMultiPress(CSettingsUser *pCreator, CDasherInterfaceBa
: CDynamicButtons(pCreator, pInterface, pFramerate, iID, szName) {
}
-void CButtonMultiPress::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
+void CButtonMultiPress::KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
if (m_bKeyDown) return;
diff --git a/Src/DasherCore/ButtonMultiPress.h b/Src/DasherCore/ButtonMultiPress.h
index d783429..bc7a7d8 100644
--- a/Src/DasherCore/ButtonMultiPress.h
+++ b/Src/DasherCore/ButtonMultiPress.h
@@ -33,7 +33,7 @@ class CButtonMultiPress : public CDynamicButtons {
public:
CButtonMultiPress(CSettingsUser *pCreator, CDasherInterfaceBase *pInterface, CFrameRate *pFramerate, ModuleID_t iID, const char *szName);
- virtual void KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
+ virtual void KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
protected:
virtual unsigned int maxClickCount()=0;
@@ -45,7 +45,7 @@ class CButtonMultiPress : public CDynamicButtons {
virtual void RevertPresses(int iCount) {};
int m_iQueueId;
- std::deque<int> m_deQueueTimes;
+ std::deque<unsigned long> m_deQueueTimes;
};
}
diff --git a/Src/DasherCore/DasherButtons.cpp b/Src/DasherCore/DasherButtons.cpp
index 47a8339..ec8bd19 100644
--- a/Src/DasherCore/DasherButtons.cpp
+++ b/Src/DasherCore/DasherButtons.cpp
@@ -39,7 +39,7 @@ void CDasherButtons::Activate() {
m_iScanTime = std::numeric_limits<int>::min();
}
-void CDasherButtons::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
+void CDasherButtons::KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
if(m_bMenu) {
switch(iId) {
diff --git a/Src/DasherCore/DasherButtons.h b/Src/DasherCore/DasherButtons.h
index fb3de08..dccfa77 100644
--- a/Src/DasherCore/DasherButtons.h
+++ b/Src/DasherCore/DasherButtons.h
@@ -27,7 +27,7 @@ class CDasherButtons : public CInputFilter, protected CSettingsUser
virtual bool DecorateView(CDasherView *pView, CDasherInput *pInput)=0;
- void KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
+ void KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
bool Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, CExpansionPolicy **pol);
void Activate();
diff --git a/Src/DasherCore/DasherInterfaceBase.cpp b/Src/DasherCore/DasherInterfaceBase.cpp
index ff4b980..3ae2b41 100644
--- a/Src/DasherCore/DasherInterfaceBase.cpp
+++ b/Src/DasherCore/DasherInterfaceBase.cpp
@@ -22,7 +22,6 @@
#include "DasherInterfaceBase.h"
-//#include "ActionButton.h"
#include "DasherViewSquare.h"
#include "ControlManager.h"
#include "DasherScreen.h"
@@ -168,7 +167,6 @@ void CDasherInterfaceBase::Realize(unsigned long ulTime) {
ChangeAlphabet(); // This creates the NodeCreationManager, the Alphabet,
//and the tree of nodes in the model.
- SetupActionButtons();
HandleEvent(LP_NODE_BUDGET);
// FIXME - need to rationalise this sort of thing.
@@ -209,11 +207,6 @@ CDasherInterfaceBase::~CDasherInterfaceBase() {
delete m_pFramerate;
- for (std::vector<CActionButton *>::iterator it=m_vLeftButtons.begin(); it != m_vLeftButtons.end(); ++it)
- delete *it;
-
- for (std::vector<CActionButton *>::iterator it=m_vRightButtons.begin(); it != m_vRightButtons.end(); ++it)
- delete *it;
}
void CDasherInterfaceBase::PreSetNotify(int iParameter, const std::string &sNewValue) {
@@ -588,10 +581,6 @@ bool CDasherInterfaceBase::Redraw(unsigned long ulTime, bool bRedrawNodes, CExpa
if(m_pInputFilter) {
if (m_pInputFilter->DecorateView(m_pDasherView, m_pInput)) bRedrawNodes=true;
}
-
-#ifdef EXPERIMENTAL_FEATURES
- if (DrawActionButtons()) bRedrawNodes=true;
-#endif
return bRedrawNodes;
@@ -652,7 +641,6 @@ void CDasherInterfaceBase::ScreenResized(CDasherScreen *pScreen) {
if (!m_pDasherView) return;
m_pDasherView->ScreenResized(m_DasherScreen);
- PositionActionButtons();
//Really, would like to do a Redraw _immediately_, but this will have to do.
ScheduleRedraw();
}
@@ -720,12 +708,12 @@ CUserLogBase* CDasherInterfaceBase::GetUserLogPtr() {
return m_pUserLog;
}
-void CDasherInterfaceBase::KeyDown(int iTime, int iId, bool bPos, int iX, int iY) {
+void CDasherInterfaceBase::KeyDown(unsigned long iTime, int iId) {
if(isLocked())
return;
if(m_pInputFilter) {
- m_pInputFilter->KeyDown(iTime, iId, m_pDasherView, m_pInput, m_pDasherModel, m_pUserLog, bPos, iX, iY);
+ m_pInputFilter->KeyDown(iTime, iId, m_pDasherView, m_pInput, m_pDasherModel, m_pUserLog);
}
if(m_pInput) {
@@ -733,12 +721,12 @@ void CDasherInterfaceBase::KeyDown(int iTime, int iId, bool bPos, int iX, int iY
}
}
-void CDasherInterfaceBase::KeyUp(int iTime, int iId, bool bPos, int iX, int iY) {
+void CDasherInterfaceBase::KeyUp(int iTime, int iId) {
if(isLocked())
return;
if(m_pInputFilter) {
- m_pInputFilter->KeyUp(iTime, iId, m_pDasherView, m_pInput, m_pDasherModel, bPos, iX, iY);
+ m_pInputFilter->KeyUp(iTime, iId, m_pDasherView, m_pInput, m_pDasherModel);
}
if(m_pInput) {
@@ -832,95 +820,6 @@ bool CDasherInterfaceBase::GetModuleSettings(const std::string &strName, SModule
return GetModuleByName(strName)->GetSettings(pSettings, iCount);
}
-void CDasherInterfaceBase::SetupActionButtons() {
- m_vLeftButtons.push_back(new CActionButton(this, "Exit", true));
- m_vLeftButtons.push_back(new CActionButton(this, "Preferences", false));
- m_vLeftButtons.push_back(new CActionButton(this, "Help", false));
- m_vLeftButtons.push_back(new CActionButton(this, "About", false));
-}
-
-void CDasherInterfaceBase::DestroyActionButtons() {
- // TODO: implement and call this
-}
-
-void CDasherInterfaceBase::PositionActionButtons() {
- if(!m_DasherScreen)
- return;
-
- int iCurrentOffset(16);
-
- for(std::vector<CActionButton *>::iterator it(m_vLeftButtons.begin()); it != m_vLeftButtons.end(); ++it) {
- (*it)->SetPosition(16, iCurrentOffset, 32, 32);
- iCurrentOffset += 48;
- }
-
- iCurrentOffset = 16;
-
- for(std::vector<CActionButton *>::iterator it(m_vRightButtons.begin()); it != m_vRightButtons.end(); ++it) {
- (*it)->SetPosition(m_DasherScreen->GetWidth() - 144, iCurrentOffset, 128, 32);
- iCurrentOffset += 48;
- }
-}
-
-bool CDasherInterfaceBase::DrawActionButtons() {
- if(!m_DasherScreen)
- return false;
-
- bool bVisible(GetBoolParameter(BP_DASHER_PAUSED));
-
- bool bRV(bVisible != m_bOldVisible);
- m_bOldVisible = bVisible;
-
- for(std::vector<CActionButton *>::iterator it(m_vLeftButtons.begin()); it != m_vLeftButtons.end(); ++it)
- (*it)->Draw(m_DasherScreen, bVisible);
-
- for(std::vector<CActionButton *>::iterator it(m_vRightButtons.begin()); it != m_vRightButtons.end(); ++it)
- (*it)->Draw(m_DasherScreen, bVisible);
-
- return bRV;
-}
-
-
-void CDasherInterfaceBase::HandleClickUp(int iTime, int iX, int iY) {
-#ifdef EXPERIMENTAL_FEATURES
- bool bVisible(GetBoolParameter(BP_DASHER_PAUSED));
-
- for(std::vector<CActionButton *>::iterator it(m_vLeftButtons.begin()); it != m_vLeftButtons.end(); ++it) {
- if((*it)->HandleClickUp(iTime, iX, iY, bVisible))
- return;
- }
-
- for(std::vector<CActionButton *>::iterator it(m_vRightButtons.begin()); it != m_vRightButtons.end(); ++it) {
- if((*it)->HandleClickUp(iTime, iX, iY, bVisible))
- return;
- }
-#endif
-
- KeyUp(iTime, 100, true, iX, iY);
-}
-
-void CDasherInterfaceBase::HandleClickDown(int iTime, int iX, int iY) {
-#ifdef EXPERIMENTAL_FEATURES
- bool bVisible(GetBoolParameter(BP_DASHER_PAUSED));
-
- for(std::vector<CActionButton *>::iterator it(m_vLeftButtons.begin()); it != m_vLeftButtons.end(); ++it) {
- if((*it)->HandleClickDown(iTime, iX, iY, bVisible))
- return;
- }
-
- for(std::vector<CActionButton *>::iterator it(m_vRightButtons.begin()); it != m_vRightButtons.end(); ++it) {
- if((*it)->HandleClickDown(iTime, iX, iY, bVisible))
- return;
- }
-#endif
-
- KeyDown(iTime, 100, true, iX, iY);
-}
-
-void CDasherInterfaceBase::AddActionButton(const std::string &strName) {
- m_vRightButtons.push_back(new CActionButton(this, strName, false));
-}
-
void CDasherInterfaceBase::SetOffset(int iOffset, bool bForce) {
m_pDasherModel->SetOffset(iOffset, m_pNCManager->GetAlphabetManager(), m_pDasherView, bForce);
//ACL TODO note that CTL_MOVE, etc., do not come here (that would probably
diff --git a/Src/DasherCore/DasherInterfaceBase.h b/Src/DasherCore/DasherInterfaceBase.h
index b9845a7..df67d7a 100644
--- a/Src/DasherCore/DasherInterfaceBase.h
+++ b/Src/DasherCore/DasherInterfaceBase.h
@@ -34,7 +34,6 @@
#include "Messages.h"
#include "../Common/NoClones.h"
#include "../Common/ModuleSettings.h"
-#include "ActionButton.h"
#include "Alphabet/AlphIO.h"
#include "AutoSpeedControl.h"
#include "ColourIO.h"
@@ -294,29 +293,24 @@ public:
/// @}
- /// @name Action buttons
- /// TODO, how much of this was ever implemented???
- /// @{
- /// ACL in answer to previous: not much, not sure whether it's worth keeping anything;
- /// but for now, I'm preserving this as overridable by subclasses which do want to handle
- /// commands, so they can make it do something. The default implementation does nothing.
- virtual void ExecuteCommand(const std::string &strName) {};
-
- void AddActionButton(const std::string &strName);
-
- /// @}
-
/// @name User input
/// Deals with forwarding user input to the core
/// @{
-
- void KeyDown(int iTime, int iId, bool bPos = false, int iX = 0, int iY = 0);
-
- void KeyUp(int iTime, int iId, bool bPos = false, int iX = 0, int iY = 0);
-
- void HandleClickUp(int iTime, int iX, int iY);
-
- void HandleClickDown(int iTime, int iX, int iY);
+ /// Called from outside to indicate a key or mouse button has just been pushed down
+ /// \param iTime time at which button pressed
+ /// \param iId integer identifying button. TODO we need a better system here.
+ /// At present 1-4 are keys on the keyboard (or external), after mapping from e.g.
+ /// qwerty layout, such that for a user who can press 2 buttons, 1 is the primary, 2
+ /// secondary (maybe harder for them), etc. Direct mode can use an arbitrary number.
+ /// 100 is left mouse button, 101 right, 102 middle (if there is one), and so on.
+ /// (Note we do not specify the location at which mouse presses occur: the current
+ /// pointer location can be obtained from the input device if necessary)
+ void KeyDown(unsigned long iTime, int iId);
+
+ /// Called from outside to indicate a key or mouse button has just been released
+ /// \param iTime time at which button released
+ /// \param iId integer identifying button. See comments for KeyDown.
+ void KeyUp(int iTime, int iId);
/// @}
@@ -482,15 +476,6 @@ protected:
void ChangeColours();
void ChangeView();
- void SetupActionButtons();
- void DestroyActionButtons();
- void PositionActionButtons();
- bool DrawActionButtons();
-
- std::vector<CActionButton *> m_vLeftButtons;
- std::vector<CActionButton *> m_vRightButtons;
-
-
class WordSpeaker : public TransientObserver<const CEditEvent *> {
public:
WordSpeaker(CDasherInterfaceBase *pIntf);
diff --git a/Src/DasherCore/DefaultFilter.cpp b/Src/DasherCore/DefaultFilter.cpp
index 63ab85a..4e349bb 100644
--- a/Src/DasherCore/DefaultFilter.cpp
+++ b/Src/DasherCore/DefaultFilter.cpp
@@ -142,7 +142,7 @@ bool CDefaultFilter::Timer(unsigned long Time, CDasherView *pView, CDasherInput
return bDidSomething;
}
-void CDefaultFilter::KeyDown(int iTime, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
+void CDefaultFilter::KeyDown(unsigned long iTime, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
switch(iId) {
case 0: // Start on space
diff --git a/Src/DasherCore/DefaultFilter.h b/Src/DasherCore/DefaultFilter.h
index 6b9536f..8be3fb9 100644
--- a/Src/DasherCore/DefaultFilter.h
+++ b/Src/DasherCore/DefaultFilter.h
@@ -18,7 +18,7 @@ class CDefaultFilter : public CDynamicFilter, public CSettingsObserver {
virtual bool DecorateView(CDasherView *pView, CDasherInput *pInput);
virtual bool Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CExpansionPolicy **pol);
- virtual void KeyDown(int iTime, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
+ virtual void KeyDown(unsigned long iTime, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
virtual void Activate();
virtual void Deactivate();
bool GetSettings(SModuleSettings **, int *);
diff --git a/Src/DasherCore/DynamicButtons.cpp b/Src/DasherCore/DynamicButtons.cpp
index 06dcf37..9b8941f 100644
--- a/Src/DasherCore/DynamicButtons.cpp
+++ b/Src/DasherCore/DynamicButtons.cpp
@@ -53,7 +53,7 @@ bool CDynamicButtons::Timer(unsigned long iTime, CDasherView *pDasherView, CDash
return TimerImpl(iTime, pDasherView, m_pDasherModel, pol);
}
-void CDynamicButtons::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
+void CDynamicButtons::KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
m_pUserLog = pUserLog;
@@ -76,7 +76,7 @@ void CDynamicButtons::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInp
m_bKeyHandled = false;
}
-void CDynamicButtons::KeyUp(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel) {
+void CDynamicButtons::KeyUp(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel) {
if (iId == m_iHeldId) m_bKeyDown = false;
}
diff --git a/Src/DasherCore/DynamicButtons.h b/Src/DasherCore/DynamicButtons.h
index 9a4ce70..06c7cf6 100644
--- a/Src/DasherCore/DynamicButtons.h
+++ b/Src/DasherCore/DynamicButtons.h
@@ -34,8 +34,8 @@ class CDynamicButtons : public CDynamicFilter, public CSettingsObserver {
///when reversing, backs off; when paused, does nothing; when running, delegates to TimerImpl
virtual bool Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, CExpansionPolicy **pol);
- virtual void KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
- virtual void KeyUp(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel);
+ virtual void KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
+ virtual void KeyUp(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel);
//respond to changes to BP_DASHER_PAUSED to keep m_iState in sync
virtual void HandleEvent(int iParameter);
diff --git a/Src/DasherCore/InputFilter.h b/Src/DasherCore/InputFilter.h
index fae357d..316ffe1 100644
--- a/Src/DasherCore/InputFilter.h
+++ b/Src/DasherCore/InputFilter.h
@@ -21,12 +21,9 @@ class CInputFilter : public CDasherModule {
virtual bool DecorateView(CDasherView *pView, CDasherInput *pInput) { return false; };
- virtual void KeyDown(int Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog, bool bPos, int iX, int iY) {
- KeyDown(Time, iId, pDasherView, pInput, pModel, pUserLog);
- };
- virtual void KeyUp(int Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, bool bPos, int iX, int iY) {
- KeyUp(Time, iId, pDasherView, pInput, pModel);
- };
+ virtual void KeyDown(unsigned long Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {}
+
+ virtual void KeyUp(unsigned long Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel) {}
virtual bool Timer(unsigned long Time, CDasherView *m_pDasherView, CDasherInput *pInput, CDasherModel *m_pDasherModel, CExpansionPolicy **pol)=0;// { return false; };
@@ -41,9 +38,6 @@ class CInputFilter : public CDasherModule {
protected:
CDasherInterfaceBase *m_pInterface;
-
- virtual void KeyDown(int Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {};
- virtual void KeyUp(int Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel) {};
};
}
/// @}
diff --git a/Src/DasherCore/Makefile.am b/Src/DasherCore/Makefile.am
index b0137a2..c4aff81 100644
--- a/Src/DasherCore/Makefile.am
+++ b/Src/DasherCore/Makefile.am
@@ -20,8 +20,6 @@ libdashercore_a_SOURCES = \
Alphabet/GroupInfo.h \
AlternatingDirectMode.cpp \
AlternatingDirectMode.h \
- ActionButton.cpp \
- ActionButton.h \
AlphabetManager.cpp \
AlphabetManager.h \
AutoSpeedControl.cpp \
diff --git a/Src/DasherCore/OneButtonDynamicFilter.cpp b/Src/DasherCore/OneButtonDynamicFilter.cpp
index f4dbbaa..dcade6a 100644
--- a/Src/DasherCore/OneButtonDynamicFilter.cpp
+++ b/Src/DasherCore/OneButtonDynamicFilter.cpp
@@ -97,22 +97,20 @@ bool COneButtonDynamicFilter::DecorateView(CDasherView *pView, CDasherInput *pIn
return bRV;
}
-void COneButtonDynamicFilter::KeyDown(int Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog, bool bPos, int iX, int iY) {
+void COneButtonDynamicFilter::KeyDown(unsigned long Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
if (iId == 100 && !GetBoolParameter(BP_BACKOFF_BUTTON))
//mouse click - will be ignored by superclass method.
//simulate press of button 2...
- CButtonMultiPress::KeyDown(Time, 2, pDasherView, pInput, pModel, pUserLog);
- else
- CInputFilter::KeyDown(Time, iId, pDasherView, pInput, pModel, pUserLog, bPos, iX, iY);
+ iId=2;
+ CButtonMultiPress::KeyDown(Time, 2, pDasherView, pInput, pModel, pUserLog);
}
-void COneButtonDynamicFilter::KeyUp(int Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, bool bPos, int iX, int iY) {
+void COneButtonDynamicFilter::KeyUp(unsigned long Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel) {
if (iId == 100 && !GetBoolParameter(BP_BACKOFF_BUTTON))
//mouse click - will be ignored by superclass method.
//simulate press of button 2...
- CButtonMultiPress::KeyUp(Time, 2, pDasherView, pInput, pModel);
- else
- CInputFilter::KeyUp(Time, iId, pDasherView, pInput, pModel, bPos, iX, iY);
+ iId=2;
+ CButtonMultiPress::KeyUp(Time, iId, pDasherView, pInput, pModel);
}
bool COneButtonDynamicFilter::TimerImpl(unsigned long Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, CExpansionPolicy **pol) {
diff --git a/Src/DasherCore/OneButtonDynamicFilter.h b/Src/DasherCore/OneButtonDynamicFilter.h
index bd6ab3a..e1bb675 100644
--- a/Src/DasherCore/OneButtonDynamicFilter.h
+++ b/Src/DasherCore/OneButtonDynamicFilter.h
@@ -36,8 +36,8 @@ class COneButtonDynamicFilter : public CButtonMultiPress {
virtual bool GetSettings(SModuleSettings **pSettings, int *iCount);
//override to get mouse clicks / taps back again...
- virtual void KeyDown(int Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog, bool bPos, int iX, int iY);
- virtual void KeyUp(int Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, bool bPos, int iX, int iY);
+ virtual void KeyDown(unsigned long Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
+ virtual void KeyUp(unsigned long Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel);
private:
unsigned int maxClickCount() {return 2;} //double-click to reverse
diff --git a/Src/DasherCore/OneButtonFilter.cpp b/Src/DasherCore/OneButtonFilter.cpp
index f8305d1..e734d47 100644
--- a/Src/DasherCore/OneButtonFilter.cpp
+++ b/Src/DasherCore/OneButtonFilter.cpp
@@ -70,7 +70,7 @@ bool COneButtonFilter::Timer(unsigned long Time, CDasherView *pView, CDasherInpu
return m_pDasherModel->NextScheduledStep();
}
-void COneButtonFilter::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
+void COneButtonFilter::KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
if (bStarted) {
if (iLocation == 0) {
//back up by one zoom step.
diff --git a/Src/DasherCore/OneButtonFilter.h b/Src/DasherCore/OneButtonFilter.h
index 7fedb79..e607b46 100644
--- a/Src/DasherCore/OneButtonFilter.h
+++ b/Src/DasherCore/OneButtonFilter.h
@@ -13,7 +13,7 @@ class COneButtonFilter : public CInputFilter, private CSettingsUser {
virtual bool DecorateView(CDasherView *pView, CDasherInput *pInput);
virtual bool Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, CExpansionPolicy **pol);
- virtual void KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
+ virtual void KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
bool GetSettings(SModuleSettings **pSettings, int *iCount);
private:
///true iff the scan line is moving down/up, or is in the 'reverse' stage
diff --git a/Src/DasherCore/StylusFilter.cpp b/Src/DasherCore/StylusFilter.cpp
index a1ff5ac..83835bd 100644
--- a/Src/DasherCore/StylusFilter.cpp
+++ b/Src/DasherCore/StylusFilter.cpp
@@ -22,7 +22,7 @@ bool CStylusFilter::Timer(unsigned long iTime, CDasherView *pView, CDasherInput
return CDefaultFilter::Timer(iTime, pView, pInput, pModel, pol);
}
-void CStylusFilter::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
+void CStylusFilter::KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
if(iId == 100) {
pModel->ClearScheduledSteps();
Unpause(iTime);
@@ -30,7 +30,7 @@ void CStylusFilter::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput
}
}
-void CStylusFilter::KeyUp(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel) {
+void CStylusFilter::KeyUp(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel) {
if(iId == 100) {
if (iTime - m_iKeyDownTime < GetLongParameter(LP_TAP_TIME)) {
pInput->GetDasherCoords(m_iLastX, m_iLastY, pView);
diff --git a/Src/DasherCore/StylusFilter.h b/Src/DasherCore/StylusFilter.h
index a77e7d0..1b6fa90 100644
--- a/Src/DasherCore/StylusFilter.h
+++ b/Src/DasherCore/StylusFilter.h
@@ -14,8 +14,8 @@ class CStylusFilter : public CDefaultFilter {
/// - motion requires continually holding stylus against screen
virtual bool supportsPause() {return false;}
virtual bool Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CExpansionPolicy **pol);
- virtual void KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
- virtual void KeyUp(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel);
+ virtual void KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
+ virtual void KeyUp(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel);
protected:
///Transform coordinates of a click, to get location to zoom into.
/// Default is to call the same CZoomAdjuster::AdjustZoomCoords as CClickFilter
diff --git a/Src/DasherCore/TwoButtonDynamicFilter.cpp b/Src/DasherCore/TwoButtonDynamicFilter.cpp
index e13c7a2..7400488 100644
--- a/Src/DasherCore/TwoButtonDynamicFilter.cpp
+++ b/Src/DasherCore/TwoButtonDynamicFilter.cpp
@@ -92,22 +92,26 @@ bool CTwoButtonDynamicFilter::DecorateView(CDasherView *pView, CDasherInput *pIn
return bRV;
}
-void CTwoButtonDynamicFilter::KeyDown(int Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog, bool bPos, int iX, int iY) {
- if (iId == 100 && !GetBoolParameter(BP_BACKOFF_BUTTON))
- //mouse click - will be ignored by superclass method.
+void CTwoButtonDynamicFilter::KeyDown(unsigned long Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
+ if (iId == 100 && !GetBoolParameter(BP_BACKOFF_BUTTON)) {
+ //mouse click - will be ignored by superclass method.
//simulate press of button 2/3 according to whether click in top/bottom half
- CButtonMultiPress::KeyDown(Time, (iY < pView->Screen()->GetHeight()/2) ? 2 : 3, pView, pInput, pModel, pUserLog);
- else
- CInputFilter::KeyDown(Time, iId, pView, pInput, pModel, pUserLog, bPos, iX, iY);
+ myint iDasherX, iDasherY;
+ m_pInterface->GetActiveInputDevice()->GetDasherCoords(iDasherX, iDasherY, pView);
+ iId = (iDasherY < GetLongParameter(LP_OY)) ? 2 : 3;
+ }
+ CButtonMultiPress::KeyDown(Time, iId, pView, pInput, pModel, pUserLog);
}
-void CTwoButtonDynamicFilter::KeyUp(int Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, bool bPos, int iX, int iY) {
- if (iId == 100 && !GetBoolParameter(BP_BACKOFF_BUTTON))
- //mouse click - will be ignored by superclass method.
+void CTwoButtonDynamicFilter::KeyUp(unsigned long Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel) {
+ if (iId == 100 && !GetBoolParameter(BP_BACKOFF_BUTTON)) {
+ //mouse click - will be ignored by superclass method.
//simulate press of button 2/3 according to whether click in top/bottom half
- CButtonMultiPress::KeyUp(Time, (iY < pView->Screen()->GetHeight()/2) ? 2 : 3, pView, pInput,pModel);
- else
- CInputFilter::KeyUp(Time, iId, pView, pInput, pModel, bPos, iX, iY);
+ myint iDasherX, iDasherY;
+ m_pInterface->GetActiveInputDevice()->GetDasherCoords(iDasherX, iDasherY, pView);
+ iId = (iDasherY < GetLongParameter(LP_OY)) ? 2 : 3;
+ }
+ CButtonMultiPress::KeyUp(Time, iId, pView, pInput,pModel);
}
bool CTwoButtonDynamicFilter::TimerImpl(unsigned long Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, CExpansionPolicy **pol) {
diff --git a/Src/DasherCore/TwoButtonDynamicFilter.h b/Src/DasherCore/TwoButtonDynamicFilter.h
index 4953fbf..a74c784 100644
--- a/Src/DasherCore/TwoButtonDynamicFilter.h
+++ b/Src/DasherCore/TwoButtonDynamicFilter.h
@@ -50,8 +50,8 @@ class CTwoButtonDynamicFilter : public CButtonMultiPress {
virtual void reverse();
//override to inspect x,y coords of mouse clicks/taps
- virtual void KeyDown(int Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog, bool bPos, int iX, int iY);
- virtual void KeyUp(int Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, bool bPos, int iX, int iY);
+ virtual void KeyDown(unsigned long Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
+ virtual void KeyUp(unsigned long Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel);
private:
unsigned int maxClickCount() {return GetBoolParameter(BP_2B_INVERT_DOUBLE) ? 3 : 2;}
diff --git a/Src/DasherCore/TwoPushDynamicFilter.cpp b/Src/DasherCore/TwoPushDynamicFilter.cpp
index 74c4d5b..a719b66 100644
--- a/Src/DasherCore/TwoPushDynamicFilter.cpp
+++ b/Src/DasherCore/TwoPushDynamicFilter.cpp
@@ -167,22 +167,20 @@ m_bDecorationChanged = true;
}
}
-void CTwoPushDynamicFilter::KeyDown(int Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog, bool bPos, int iX, int iY) {
+void CTwoPushDynamicFilter::KeyDown(unsigned long Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
if (iId == 100 && !GetBoolParameter(BP_BACKOFF_BUTTON))
//mouse click - will be ignored by superclass method.
//simulate press of button 2...
- CDynamicButtons::KeyDown(Time, 2, pView, pInput, pModel, pUserLog);
- else
- CInputFilter::KeyDown(Time, iId, pView, pInput, pModel, pUserLog, bPos, iX, iY);
+ iId=2;
+ CDynamicButtons::KeyDown(Time, iId, pView, pInput, pModel, pUserLog);
}
-void CTwoPushDynamicFilter::KeyUp(int Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, bool bPos, int iX, int iY) {
+void CTwoPushDynamicFilter::KeyUp(unsigned long Time, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel) {
if (iId == 100 && !GetBoolParameter(BP_BACKOFF_BUTTON))
- //mouse click - will be ignored by superclass method.
- //simulate press of button 2...
- CDynamicButtons::KeyUp(Time, 2, pView, pInput, pModel);
- else
- CInputFilter::KeyUp(Time, iId, pView, pInput, pModel, bPos, iX, iY);
+ //mouse click - will be ignored by superclass method.
+ //simulate press of button 2...
+ iId=2;
+ CDynamicButtons::KeyUp(Time, iId, pView, pInput, pModel);
}
void CTwoPushDynamicFilter::ActionButton(int iTime, int iButton, int iType, CDasherModel *pModel, CUserLogBase *pUserLog) {
diff --git a/Src/DasherCore/TwoPushDynamicFilter.h b/Src/DasherCore/TwoPushDynamicFilter.h
index 51b7ccf..3835b7d 100644
--- a/Src/DasherCore/TwoPushDynamicFilter.h
+++ b/Src/DasherCore/TwoPushDynamicFilter.h
@@ -36,8 +36,8 @@ class CTwoPushDynamicFilter : public CDynamicButtons /*long push, but do our own
virtual bool GetSettings(SModuleSettings **pSettings, int *iCount);
//override to get mouse clicks / taps back again...
- virtual void KeyDown(int Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog, bool bPos, int iX, int iY);
- virtual void KeyUp(int Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, bool bPos, int iX, int iY);
+ virtual void KeyDown(unsigned long Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
+ virtual void KeyUp(unsigned long Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel);
protected:
virtual bool TimerImpl(unsigned long Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, CExpansionPolicy **pol);
diff --git a/Src/Gtk2/DasherControl.cpp b/Src/Gtk2/DasherControl.cpp
index 3d950e6..a06afa7 100644
--- a/Src/Gtk2/DasherControl.cpp
+++ b/Src/Gtk2/DasherControl.cpp
@@ -470,10 +470,6 @@ CGameModule *CDasherControl::CreateGameModule(CDasherView *pView,CDasherModel *p
return CDashIntfScreenMsgs::CreateGameModule(pView,pModel);
}
-void CDasherControl::ExecuteCommand(const std::string &strCommand) {
- g_signal_emit_by_name(GTK_WIDGET(m_pDasherControl), "dasher_command", strCommand.c_str());
-}
-
void CDasherControl::WriteTrainFile(const std::string &filename, const std::string &strNewText) {
if(strNewText.length() == 0)
return;
@@ -612,10 +608,13 @@ gboolean CDasherControl::ButtonPressEvent(GdkEventButton *event) {
// No - don't take the focus - give it to the text area instead
+ //GDK uses button 1=left, 2=middle, 3=right. We want 100, 102, 101
+ int button = event->button;
+ if (button&2) button^=1;
if(event->type == GDK_BUTTON_PRESS)
- HandleClickDown(get_time(), (int)event->x, (int)event->y);
+ KeyDown(get_time(), button+99 );
else if(event->type == GDK_BUTTON_RELEASE)
- HandleClickUp(get_time(), (int)event->x, (int)event->y);
+ KeyUp(get_time(), button+99);
return false;
}
diff --git a/Src/Gtk2/DasherControl.h b/Src/Gtk2/DasherControl.h
index 803be1f..e9aa8a1 100644
--- a/Src/Gtk2/DasherControl.h
+++ b/Src/Gtk2/DasherControl.h
@@ -172,9 +172,6 @@ private:
virtual void SetupPaths();
virtual void CreateModules();
virtual void SetupUI();
-
- /// Override to emit Gtk2 signals (previously in response to CCommandEvent)
- void ExecuteCommand(const std::string &strName);
GtkWidget *m_pVBox;
GtkWidget *m_pCanvas;
diff --git a/Src/Gtk2/GtkDasherControl.cpp b/Src/Gtk2/GtkDasherControl.cpp
index 147f78f..4e0c397 100644
--- a/Src/Gtk2/GtkDasherControl.cpp
+++ b/Src/Gtk2/GtkDasherControl.cpp
@@ -45,7 +45,6 @@ enum {
DASHER_REQUEST_SETTINGS,
DASHER_LOCK_INFO,
DASHER_MESSAGE,
- DASHER_COMMAND,
SIGNAL_NUM
};
@@ -89,8 +88,6 @@ gtk_dasher_control_class_init(GtkDasherControlClass *pClass) {
gtk_dasher_control_signals[DASHER_MESSAGE] = g_signal_new("dasher_message", G_TYPE_FROM_CLASS(pClass), static_cast < GSignalFlags > (G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION), G_STRUCT_OFFSET(GtkDasherControlClass, dasher_message), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
- gtk_dasher_control_signals[DASHER_COMMAND] = g_signal_new("dasher_command", G_TYPE_FROM_CLASS(pClass), static_cast < GSignalFlags > (G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION), G_STRUCT_OFFSET(GtkDasherControlClass, dasher_command), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
-
pClass->dasher_changed = NULL;
pClass->dasher_stop = NULL;
pClass->dasher_edit_insert = NULL;
@@ -101,7 +98,6 @@ gtk_dasher_control_class_init(GtkDasherControlClass *pClass) {
pClass->dasher_request_settings = NULL;
pClass->dasher_lock = NULL;
pClass->dasher_message = NULL;
- pClass->dasher_command = NULL;
// pClass->key_press_event = gtk_dasher_control_default_key_press_handler;
// pClass->key_release_event = gtk_dasher_control_default_key_release_handler;
}
@@ -297,12 +293,6 @@ gtk_dasher_control_force_pause(GtkDasherControl *pControl) {
pPrivate->pControl->Stop();
}
-void
-gtk_dasher_control_add_action_button(GtkDasherControl *pControl, const gchar *szCommand) {
- GtkDasherControlPrivate *pPrivate = GTK_DASHER_CONTROL_GET_PRIVATE(pControl);
- pPrivate->pControl->AddActionButton(szCommand);
-}
-
const char *
gtk_dasher_control_cl_set(GtkDasherControl *pControl, const gchar *szKey, const gchar *szValue) {
GtkDasherControlPrivate *pPrivate = GTK_DASHER_CONTROL_GET_PRIVATE(pControl);
diff --git a/Src/Gtk2/GtkDasherControl.h b/Src/Gtk2/GtkDasherControl.h
index d7ed426..59db145 100644
--- a/Src/Gtk2/GtkDasherControl.h
+++ b/Src/Gtk2/GtkDasherControl.h
@@ -52,7 +52,6 @@ struct _GtkDasherControlClass {
void (*dasher_request_settings) (GtkDasherControl * pDasherControl, gpointer data);
void (*dasher_lock) (GtkDasherControl * pDasherControl, gpointer pLockInfo, gpointer data);
void (*dasher_message) (GtkDasherControl * pDasherControl, gpointer pLockInfo, gpointer data);
- void (*dasher_command) (GtkDasherControl * pDasherControl, const gchar * szText, gpointer data);
};
GtkWidget *gtk_dasher_control_new();
@@ -85,7 +84,6 @@ gboolean gtk_dasher_control_get_module_settings(GtkDasherControl * pControl, con
GtkTextBuffer *gtk_dasher_control_game_text_buffer(GtkDasherControl *pPrivate);
void gtk_dasher_control_force_pause(GtkDasherControl *pControl);
-void gtk_dasher_control_add_action_button(GtkDasherControl *pControl, const gchar *szCommand);
void gtk_dasher_user_log_new_trial(GtkDasherControl * pControl);
void gtk_dasher_control_set_focus(GtkDasherControl * pControl);
const gchar* gtk_dasher_control_cl_set(GtkDasherControl *pControl, const gchar *szKey, const gchar *szValue);
diff --git a/Src/Gtk2/dasher_editor_internal.cpp b/Src/Gtk2/dasher_editor_internal.cpp
index 9caed7b..72e87b9 100644
--- a/Src/Gtk2/dasher_editor_internal.cpp
+++ b/Src/Gtk2/dasher_editor_internal.cpp
@@ -206,7 +206,6 @@ extern "C" void main_window_realized(DasherMain *pMain, gpointer pUserData);
extern "C" void action_button_callback(GtkWidget *pWidget, gpointer pUserData);
extern "C" void mark_set_handler(GtkWidget *widget, GtkTextIter *pIter, GtkTextMark *pMark, gpointer pUserData);
extern "C" void handle_stop_event(GtkDasherControl *pDasherControl, gpointer data);
-extern "C" void on_command(GtkDasherControl *pDasherControl, gchar *szCommand, gpointer pUserData);
extern "C" void handle_request_settings(GtkDasherControl * pDasherControl, gpointer data);
extern "C" void gtk2_edit_delete_callback(GtkDasherControl *pDasherControl, const gchar *szText, int iOffset, gpointer user_data);
extern "C" void gtk2_edit_output_callback(GtkDasherControl *pDasherControl, const gchar *szText, int iOffset, gpointer user_data);
diff --git a/Src/Gtk2/dasher_editor_internal.h b/Src/Gtk2/dasher_editor_internal.h
index 55e1a49..dec96a7 100644
--- a/Src/Gtk2/dasher_editor_internal.h
+++ b/Src/Gtk2/dasher_editor_internal.h
@@ -52,9 +52,6 @@ void dasher_editor_internal_initialise(DasherEditorInternal *pSelf, DasherAppSet
GType dasher_editor_internal_get_type();
-/* // TODO: Just have one 'handle event' method? */
-/* gboolean dasher_editor_internal_command(DasherEditorInternal *pSelf, const gchar *szCommand); */
-
/* void dasher_editor_internal_handle_font(DasherEditorInternal *pSelf, const gchar *szFont); */
/* /\* To be obsoleted by movement to GTK buffers *\/ */
diff --git a/Src/Gtk2/dasher_main.cpp b/Src/Gtk2/dasher_main.cpp
index 670772b..a58d638 100644
--- a/Src/Gtk2/dasher_main.cpp
+++ b/Src/Gtk2/dasher_main.cpp
@@ -104,7 +104,6 @@ extern "C" void dasher_main_cb_quit(GtkAction*, DasherMain*);
extern "C" void dasher_main_cb_preferences(GtkAction*, DasherMain*);
extern "C" void dasher_main_cb_help(GtkAction*, DasherMain*);
extern "C" void dasher_main_cb_about(GtkAction*, DasherMain*);
-extern "C" void dasher_main_cb_editor(GtkAction*, DasherMain*);
extern "C" void dasher_main_cb_toggle_game_mode(GtkAction*, DasherMain*);
static gboolean dasher_main_speed_changed(DasherMain *pSelf);
@@ -121,7 +120,6 @@ static void dasher_main_load_state(DasherMain *pSelf);
static void dasher_main_save_state(DasherMain *pSelf);
static void dasher_main_setup_window(DasherMain *pSelf);
static void dasher_main_populate_controls(DasherMain *pSelf);
-static gboolean dasher_main_command(DasherMain *pSelf, const gchar *szCommand);
static gint dasher_main_lookup_key(DasherMain *pSelf, guint iKeyVal);
/* TODO: Various functions which haven't yet been rationalised */
@@ -858,51 +856,6 @@ dasher_main_populate_controls(DasherMain *pSelf) {
dasher_app_settings_get_long(pPrivate->pAppSettings, LP_MAX_BITRATE) / 100.0);
}
-static gboolean
-dasher_main_command(DasherMain *pSelf, const gchar *szCommand) {
- DasherMainPrivate *pPrivate = DASHER_MAIN_GET_PRIVATE(pSelf);
-
- if(!strcmp(szCommand, "import")) {
- dasher_main_command_import(pSelf);
- return TRUE;
- }
-
- if(!strcmp(szCommand, "quit")) {
- dasher_main_command_quit(pSelf);
- return TRUE;
- }
-
- if(!strcmp(szCommand, "preferences")) {
- dasher_main_command_preferences(pSelf);
- return TRUE;
- }
-
- if(!strcmp(szCommand, "preferences_alphabet")) {
- dasher_main_command_preferences_alphabet(pSelf);
- return TRUE;
- }
-
- if(!strcmp(szCommand, "tutorial")) {
- dasher_main_command_tutorial(pSelf);
- return TRUE;
- }
-
- if(!strcmp(szCommand, "help")) {
- dasher_main_command_help(pSelf);
- return TRUE;
- }
-
- if(!strcmp(szCommand, "about")) {
- dasher_main_command_about(pSelf);
- return TRUE;
- }
-
- if(pPrivate->pEditor)
- return dasher_editor_command(pPrivate->pEditor, szCommand);
-
- return FALSE;
-}
-
/* Private methods */
/* Window state is basically size and position */
@@ -1199,7 +1152,7 @@ dasher_main_alphabet_combo_changed(DasherMain *pSelf) {
if(!strcmp("More Alphabets...", szSelected)) {
gtk_combo_box_set_active(GTK_COMBO_BOX(pPrivate->pAlphabetCombo), 0);
// dasher_preferences_dialogue_show(pPrivate->pPreferencesDialogue);
- dasher_main_command(pSelf, "preferences_alphabet");
+ dasher_main_command_preferences_alphabet(pSelf);
}
else
dasher_app_settings_set_string(pPrivate->pAppSettings, SP_ALPHABET_ID, szSelected);
@@ -1327,7 +1280,7 @@ dasher_main_cb_context_changed(DasherEditor *pEditor, gpointer pUserData) {
extern "C" gboolean
dasher_main_cb_window_close(GtkWidget *pWidget, gpointer pUserData) {
- dasher_main_command(g_pDasherMain, "quit");
+ dasher_main_command_quit(g_pDasherMain);
/* Returning true stops further propagation */
return TRUE;
@@ -1449,16 +1402,6 @@ handle_stop_event(GtkDasherControl *pDasherControl, gpointer data) {
}
}
-extern "C" void
-on_command(GtkDasherControl *pDasherControl, gchar *szCommand, gpointer pUserData) {
- if(g_pDasherMain) {
- DasherMainPrivate *pPrivate = DASHER_MAIN_GET_PRIVATE(g_pDasherMain);
-
- if(pPrivate->pEditor)
- dasher_editor_command(pPrivate->pEditor, szCommand);
- }
-}
-
// TODO: The following two should probably be made the same
extern "C" void
handle_request_settings(GtkDasherControl * pDasherControl, gpointer data) {
diff --git a/Src/MacOSX/Dasher.xcodeproj/project.pbxproj b/Src/MacOSX/Dasher.xcodeproj/project.pbxproj
index 30c8d88..43a7a81 100755
--- a/Src/MacOSX/Dasher.xcodeproj/project.pbxproj
+++ b/Src/MacOSX/Dasher.xcodeproj/project.pbxproj
@@ -21,8 +21,6 @@
1921DB390C7ECAA400E6DAA5 /* OneButtonDynamicFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1921DB370C7ECAA400E6DAA5 /* OneButtonDynamicFilter.cpp */; };
1921DB3A0C7ECAA400E6DAA5 /* OneButtonDynamicFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1921DB380C7ECAA400E6DAA5 /* OneButtonDynamicFilter.h */; };
193731A80C8586F20022CBC7 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 193731A70C8586F20022CBC7 /* config.h */; };
- 1948BE9D0C226CFD001DFA32 /* ActionButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1948BDF60C226CFC001DFA32 /* ActionButton.cpp */; };
- 1948BE9E0C226CFD001DFA32 /* ActionButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 1948BDF70C226CFC001DFA32 /* ActionButton.h */; };
1948BEA20C226CFD001DFA32 /* AlphabetMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1948BDFC0C226CFC001DFA32 /* AlphabetMap.cpp */; };
1948BEA30C226CFD001DFA32 /* AlphabetMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1948BDFD0C226CFC001DFA32 /* AlphabetMap.h */; };
1948BEA40C226CFD001DFA32 /* AlphIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1948BDFE0C226CFC001DFA32 /* AlphIO.cpp */; };
@@ -412,8 +410,6 @@
1921DB380C7ECAA400E6DAA5 /* OneButtonDynamicFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = OneButtonDynamicFilter.h; sourceTree = "<group>"; };
19351BF304575C6C0000000A /* mktar.sh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = mktar.sh; sourceTree = "<group>"; };
193731A70C8586F20022CBC7 /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
- 1948BDF60C226CFC001DFA32 /* ActionButton.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ActionButton.cpp; sourceTree = "<group>"; };
- 1948BDF70C226CFC001DFA32 /* ActionButton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ActionButton.h; sourceTree = "<group>"; };
1948BDFC0C226CFC001DFA32 /* AlphabetMap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphabetMap.cpp; sourceTree = "<group>"; };
1948BDFD0C226CFC001DFA32 /* AlphabetMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphabetMap.h; sourceTree = "<group>"; };
1948BDFE0C226CFC001DFA32 /* AlphIO.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphIO.cpp; sourceTree = "<group>"; };
@@ -914,8 +910,6 @@
1988ABB90C9FF97000D97977 /* GameStatistics.h */,
33F6C9E8133241A000745B06 /* AbstractXMLParser.h */,
33F6C9E9133241A000745B06 /* AbstractXMLParser.cpp */,
- 1948BDF60C226CFC001DFA32 /* ActionButton.cpp */,
- 1948BDF70C226CFC001DFA32 /* ActionButton.h */,
1948BDF80C226CFC001DFA32 /* Alphabet */,
1948BE020C226CFC001DFA32 /* AlphabetManager.cpp */,
1948BE030C226CFC001DFA32 /* AlphabetManager.h */,
@@ -1383,7 +1377,6 @@
191180EB0B0FC91A001CB987 /* COSXSettingsStore.h in Headers */,
19E49DB60B10556200BA5CE8 /* DasherUtil.h in Headers */,
19C1AE820B130F18005C68D3 /* COSXMouseInput.h in Headers */,
- 1948BE9E0C226CFD001DFA32 /* ActionButton.h in Headers */,
1948BEA30C226CFD001DFA32 /* AlphabetMap.h in Headers */,
1948BEA50C226CFD001DFA32 /* AlphIO.h in Headers */,
1948BEA60C226CFD001DFA32 /* GroupInfo.h in Headers */,
@@ -1753,7 +1746,6 @@
191428E70B0E6CC6004F1C28 /* COSXDasherControl.mm in Sources */,
191180EC0B0FC91A001CB987 /* COSXSettingsStore.mm in Sources */,
19E49DB50B10556100BA5CE8 /* DasherUtil.mm in Sources */,
- 1948BE9D0C226CFD001DFA32 /* ActionButton.cpp in Sources */,
1948BEA20C226CFD001DFA32 /* AlphabetMap.cpp in Sources */,
1948BEA40C226CFD001DFA32 /* AlphIO.cpp in Sources */,
1948BEA80C226CFD001DFA32 /* AlphabetManager.cpp in Sources */,
diff --git a/Src/MacOSX/DasherViewOpenGL.mm b/Src/MacOSX/DasherViewOpenGL.mm
index c4995e4..1e46787 100755
--- a/Src/MacOSX/DasherViewOpenGL.mm
+++ b/Src/MacOSX/DasherViewOpenGL.mm
@@ -126,15 +126,11 @@ protected:
}
- (void)mouseDown:(NSEvent *)e {
- NSPoint q = [self convertPoint:[e locationInWindow] fromView:nil];
-
- [dasherApp aquaDasherControl]->HandleClickDown(get_time(), q.x, q.y);
+ [dasherApp aquaDasherControl]->KeyDown(get_time(), 100+[e buttonNumber]);
}
- (void)mouseUp:(NSEvent *)e {
- NSPoint q = [self convertPoint:[e locationInWindow] fromView:nil];
-
- [dasherApp aquaDasherControl]->HandleClickUp(get_time(), q.x, q.y);
+ [dasherApp aquaDasherControl]->KeyUp(get_time(), 100+[e buttonNumber]);
}
diff --git a/Src/Win32/Widgets/Canvas.cpp b/Src/Win32/Widgets/Canvas.cpp
index 04f2091..a32207d 100644
--- a/Src/Win32/Widgets/Canvas.cpp
+++ b/Src/Win32/Widgets/Canvas.cpp
@@ -345,10 +345,7 @@ LRESULT CCanvas::OnLButtonDown(UINT message, WPARAM wParam, LPARAM lParam, BOOL&
// ---
#endif
- int xPos = GET_X_LPARAM(lParam);
- int yPos = GET_Y_LPARAM(lParam);
-
- m_pDasherInterface->KeyDown(GetTickCount(), 100, true, xPos, yPos);
+ m_pDasherInterface->KeyDown(GetTickCount(), 100);
// TODO: Reimplement
// else if ( m_pDasherInterface->GetBoolParameter(BP_START_STYLUS) )
@@ -369,10 +366,7 @@ LRESULT CCanvas::OnLButtonUp(UINT message, WPARAM wParam, LPARAM lParam, BOOL& b
{
bHandled = TRUE;
- int xPos = GET_X_LPARAM(lParam);
- int yPos = GET_Y_LPARAM(lParam);
-
- m_pDasherInterface->KeyUp(GetTickCount(), 100, true, xPos, yPos);
+ m_pDasherInterface->KeyUp(GetTickCount(), 100);
// TODO: Check whether this needs to be reimplemented
//endturbo = GetTickCount();
diff --git a/Src/iPhone/Classes/EAGLView.mm b/Src/iPhone/Classes/EAGLView.mm
index 852522e..19e7efe 100644
--- a/Src/iPhone/Classes/EAGLView.mm
+++ b/Src/iPhone/Classes/EAGLView.mm
@@ -120,7 +120,7 @@ CGSize CDasherScreenBridge::TextSize(NSString *str, unsigned int iFontSize, bool
lastTouchCoords = [((UITouch *)[touches anyObject]) locationInView:self];
NSAssert(!anyDown,@"Touches began when already in progress - multitouch enabled?!?!\n");
anyDown = YES;
- dasherApp.dasherInterface->KeyDown(get_time(), 100, true, lastTouchCoords.x, lastTouchCoords.y);
+ dasherApp.dasherInterface->KeyDown(get_time(), 100);
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
@@ -131,7 +131,7 @@ CGSize CDasherScreenBridge::TextSize(NSString *str, unsigned int iFontSize, bool
NSAssert([touches count] == 1, @"Multitouch?!");
NSAssert(anyDown,@"Touches ended when not in progress - multitouch enabled?!?!\n");
lastTouchCoords = [(UITouch *)[touches anyObject] locationInView:self];
- dasherApp.dasherInterface->KeyUp(get_time(), 100, true, lastTouchCoords.x, lastTouchCoords.y);
+ dasherApp.dasherInterface->KeyUp(get_time(), 100);
//finished dealing with touch-up event. Finger is now officially off the screen...
lastTouchCoords.x = lastTouchCoords.y = -1;
anyDown = NO;
diff --git a/Src/iPhone/Classes/IPhoneFilters.h b/Src/iPhone/Classes/IPhoneFilters.h
index 73b62e1..34b269d 100644
--- a/Src/iPhone/Classes/IPhoneFilters.h
+++ b/Src/iPhone/Classes/IPhoneFilters.h
@@ -37,9 +37,9 @@ class CIPhoneTiltFilter : public COneDimensionalFilter, private IPhonePrefsObser
public:
CIPhoneTiltFilter(CSettingsUser *pCreator, CDasherInterfaceBase *pInterface, CFrameRate *pFramerate, ModuleID_t iID, CDasherInput *pTouch);
///override to enable hold-to-go
- virtual void KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
+ virtual void KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
///override to enable hold-to-go
- virtual void KeyUp(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel);
+ virtual void KeyUp(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel);
///respond to BP_DASHER_PAUSED by engaging wakelock (if !hold-to-go)
virtual void HandleEvent(int iParameter);
@@ -61,7 +61,7 @@ class CIPhoneTouchFilter : public CStylusFilter, private IPhonePrefsObserver {
public:
CIPhoneTouchFilter(CSettingsUser *pCreator, CDasherInterfaceBase *pInterface, CFrameRate *pFramerate, ModuleID_t iID, UndoubledTouch *pUndoubledTouch, CIPhoneTiltInput *pTilt);
- virtual void KeyUp(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel);
+ virtual void KeyUp(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel);
void ApplyTransform(myint &iDasherX, myint &iDasherY, CDasherView *pView);
void Activate();
diff --git a/Src/iPhone/Classes/IPhoneFilters.mm b/Src/iPhone/Classes/IPhoneFilters.mm
index 85b422b..4a511f9 100644
--- a/Src/iPhone/Classes/IPhoneFilters.mm
+++ b/Src/iPhone/Classes/IPhoneFilters.mm
@@ -82,13 +82,13 @@ void CIPhoneTiltFilter::ApplyTransform(myint &iDasherX, myint &iDasherY, CDasher
}
}
-void CIPhoneTiltFilter::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
+void CIPhoneTiltFilter::KeyDown(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
if(iId == 100 && bHoldToGo)
Unpause(iTime);
else COneDimensionalFilter::KeyDown(iTime, iId, pView, pInput, pModel, pUserLog);
}
-void CIPhoneTiltFilter::KeyUp(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel) {
+void CIPhoneTiltFilter::KeyUp(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel) {
if(iId == 100 && bHoldToGo)
m_pInterface->Stop();
else COneDimensionalFilter::KeyUp(iTime, iId, pView, pInput, pModel);
@@ -161,7 +161,7 @@ void CIPhoneTouchFilter::Deactivate() {
if (bUseTiltX) m_pTilt->Deactivate();
}
-void CIPhoneTouchFilter::KeyUp(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel) {
+void CIPhoneTouchFilter::KeyUp(unsigned long iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel) {
CStylusFilter::KeyUp(iTime, iId, pView, m_pUndoubledTouch, pModel);
}
diff --git a/Src/iPhone/Dasher.xcodeproj/project.pbxproj b/Src/iPhone/Dasher.xcodeproj/project.pbxproj
index 2803a52..d4a8840 100755
--- a/Src/iPhone/Dasher.xcodeproj/project.pbxproj
+++ b/Src/iPhone/Dasher.xcodeproj/project.pbxproj
@@ -166,7 +166,6 @@
333F707A11A8AA66002E2BDF /* usenglish.c in Sources */ = {isa = PBXBuildFile; fileRef = 333F701911A8AA66002E2BDF /* usenglish.c */; };
333FDB5A139FB413009D018A /* ConvertingAlphMgr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 333FDB58139FB413009D018A /* ConvertingAlphMgr.cpp */; };
3344FD5D0F716F7900506EAA /* CDasherInterfaceBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3344FD5C0F716F7900506EAA /* CDasherInterfaceBridge.mm */; };
- 3344FE150F71717C00506EAA /* ActionButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3344FD680F71717C00506EAA /* ActionButton.cpp */; };
3344FE170F71717C00506EAA /* AlphabetMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3344FD6D0F71717C00506EAA /* AlphabetMap.cpp */; };
3344FE180F71717C00506EAA /* AlphIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3344FD6F0F71717C00506EAA /* AlphIO.cpp */; };
3344FE1A0F71717C00506EAA /* AlphabetManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3344FD730F71717C00506EAA /* AlphabetManager.cpp */; };
@@ -541,8 +540,6 @@
333FDB59139FB413009D018A /* ConvertingAlphMgr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConvertingAlphMgr.h; sourceTree = "<group>"; };
3344FD5B0F716F7900506EAA /* CDasherInterfaceBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDasherInterfaceBridge.h; sourceTree = "<group>"; };
3344FD5C0F716F7900506EAA /* CDasherInterfaceBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CDasherInterfaceBridge.mm; sourceTree = "<group>"; };
- 3344FD680F71717C00506EAA /* ActionButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActionButton.cpp; sourceTree = "<group>"; };
- 3344FD690F71717C00506EAA /* ActionButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActionButton.h; sourceTree = "<group>"; };
3344FD6D0F71717C00506EAA /* AlphabetMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphabetMap.cpp; sourceTree = "<group>"; };
3344FD6E0F71717C00506EAA /* AlphabetMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphabetMap.h; sourceTree = "<group>"; };
3344FD6F0F71717C00506EAA /* AlphIO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphIO.cpp; sourceTree = "<group>"; };
@@ -1177,8 +1174,6 @@
337ECC1A10DD5E0700D0C6A5 /* ExpansionPolicy.h */,
3378A23D1335425200A96C5D /* AbstractXMLParser.cpp */,
3378A23E1335425200A96C5D /* AbstractXMLParser.h */,
- 3344FD680F71717C00506EAA /* ActionButton.cpp */,
- 3344FD690F71717C00506EAA /* ActionButton.h */,
3344FD6A0F71717C00506EAA /* Alphabet */,
3344FD730F71717C00506EAA /* AlphabetManager.cpp */,
3344FD740F71717C00506EAA /* AlphabetManager.h */,
@@ -1578,7 +1573,6 @@
332BCABF0F71621400585DBD /* xmltok_impl.c in Sources */,
332BCAC00F71621400585DBD /* xmltok_ns.c in Sources */,
3344FD5D0F716F7900506EAA /* CDasherInterfaceBridge.mm in Sources */,
- 3344FE150F71717C00506EAA /* ActionButton.cpp in Sources */,
3344FE170F71717C00506EAA /* AlphabetMap.cpp in Sources */,
3344FE180F71717C00506EAA /* AlphIO.cpp in Sources */,
3344FE1A0F71717C00506EAA /* AlphabetManager.cpp in Sources */,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]