summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/DasherViewSquare.h
authormickeyl <mickeyl>2003-09-27 11:29:26 (UTC)
committer mickeyl <mickeyl>2003-09-27 11:29:26 (UTC)
commit651b6c612db4e809c506973996f2580c4158ac3a (patch) (side-by-side diff)
tree8c8edc86e4b206dd4542a6b556ad1a319d6698ab /inputmethods/dasher/DasherViewSquare.h
parentd1a11b45e805fe7771ea05944757d767c3c4c8ea (diff)
downloadopie-651b6c612db4e809c506973996f2580c4158ac3a.zip
opie-651b6c612db4e809c506973996f2580c4158ac3a.tar.gz
opie-651b6c612db4e809c506973996f2580c4158ac3a.tar.bz2
merge dasher which has been introduced in BRANCH first (wtf?) into HEAD
Diffstat (limited to 'inputmethods/dasher/DasherViewSquare.h') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/DasherViewSquare.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/inputmethods/dasher/DasherViewSquare.h b/inputmethods/dasher/DasherViewSquare.h
new file mode 100644
index 0000000..5d689d0
--- a/dev/null
+++ b/inputmethods/dasher/DasherViewSquare.h
@@ -0,0 +1,58 @@
+// DasherViewSquare.h
+//
+/////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (c) 2001-2002 David Ward
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __DasherViewSquare_h__
+#define __DasherViewSquare_h__
+
+#include "MSVC_Unannoy.h"
+#include "DasherScreen.h"
+#include "DasherModel.h"
+#include "DasherView.h"
+
+
+// An implementation of the DasherView class
+//
+// This class renders Dasher in the vanilla style,
+// but with horizontal and vertical mappings
+//
+// Horizontal mapping - linear and log
+// Vertical mapping - linear with different gradient
+
+namespace Dasher {class CDasherViewSquare;}
+class Dasher::CDasherViewSquare : public Dasher::CDasherView
+{
+public:
+ CDasherViewSquare(CDasherScreen* DasherScreen, CDasherModel& DasherModel, Dasher::Opts::ScreenOrientations Orientation=Dasher::Opts::LeftToRight);
+ void TapOnDisplay(int mousex,int mousey, unsigned long Time);
+
+ void ChangeScreen(CDasherScreen* NewScreen);
+ void DrawMouse(int mousex, int mousey);
+ void DrawKeyboard();
+private:
+ // the x and y non-linearities
+ inline const void screen2dasher(int *mousex, int *mousey);
+ inline const int dasherx2screen(const myint sx);
+ inline const int dashery2screen(myint sy);
+
+ int RenderNode(const symbol Character, const int Color, Opts::ColorSchemes ColorScheme,
+ myint y1, myint y2, int& mostleft, bool& force, bool text);
+
+ void CheckForNewRoot();
+ inline void Crosshair(myint sx);
+ double m_dXmpa,m_dXmpb,m_dXmpc,m_dXmpd;
+ myint m_Y1,m_Y2,m_Y3;
+ myint s_Y1,s_Y2,s_Y3;
+ int CanvasX,CanvasY,CanvasBorder;
+ double xmap(double x);
+ double ixmap(double x);
+};
+
+#include "DasherViewSquare.inl"
+
+
+#endif /* #ifndef __DasherViewSquare_h__ */