summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/DasherViewSquare.h
Side-by-side diff
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__ */