summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/DasherViewSquare.h
Unidiff
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 @@
1// DasherViewSquare.h
2//
3/////////////////////////////////////////////////////////////////////////////
4//
5// Copyright (c) 2001-2002 David Ward
6//
7/////////////////////////////////////////////////////////////////////////////
8
9#ifndef __DasherViewSquare_h__
10#define __DasherViewSquare_h__
11
12#include "MSVC_Unannoy.h"
13#include "DasherScreen.h"
14#include "DasherModel.h"
15#include "DasherView.h"
16
17
18// An implementation of the DasherView class
19//
20// This class renders Dasher in the vanilla style,
21// but with horizontal and vertical mappings
22//
23// Horizontal mapping - linear and log
24// Vertical mapping - linear with different gradient
25
26namespace Dasher {class CDasherViewSquare;}
27class Dasher::CDasherViewSquare : public Dasher::CDasherView
28{
29public:
30 CDasherViewSquare(CDasherScreen* DasherScreen, CDasherModel& DasherModel, Dasher::Opts::ScreenOrientations Orientation=Dasher::Opts::LeftToRight);
31 void TapOnDisplay(int mousex,int mousey, unsigned long Time);
32
33 void ChangeScreen(CDasherScreen* NewScreen);
34 void DrawMouse(int mousex, int mousey);
35 void DrawKeyboard();
36private:
37 // the x and y non-linearities
38 inline const void screen2dasher(int *mousex, int *mousey);
39 inline const int dasherx2screen(const myint sx);
40 inline const int dashery2screen(myint sy);
41
42 int RenderNode(const symbol Character, const int Color, Opts::ColorSchemes ColorScheme,
43 myint y1, myint y2, int& mostleft, bool& force, bool text);
44
45 void CheckForNewRoot();
46 inline void Crosshair(myint sx);
47 double m_dXmpa,m_dXmpb,m_dXmpc,m_dXmpd;
48 myint m_Y1,m_Y2,m_Y3;
49 myint s_Y1,s_Y2,s_Y3;
50 int CanvasX,CanvasY,CanvasBorder;
51 double xmap(double x);
52 double ixmap(double x);
53};
54
55#include "DasherViewSquare.inl"
56
57
58#endif /* #ifndef __DasherViewSquare_h__ */