-
Notifications
You must be signed in to change notification settings - Fork 6
/
charchange.h
66 lines (57 loc) · 1.76 KB
/
charchange.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* Why is this so complicated?
* Because keystrokes could potentially generate a collection of character changes.
* At the moment it only does one, which is usually good enough to get out of trouble.
*/
#ifndef CHARCHANGE_H
#define CHARCHANGE_H
#include <iostream>
#include "wx/gdicmn.h"
class CharChange
{
public:
/** Default constructor */
CharChange();
/** Default destructor */
virtual ~CharChange();
/** Access next
* \return The current value of next
*/
CharChange* Getnext() { return next; }
/** Set next
* \param val New value to set
*/
void Setnext(CharChange* val) { next = val; }
/** When a character on the screen changes, log it
* \param wxc : Cursor coordinate
* \param oldchar : The character that was originally there
* \param newchar : The character that replaced it
*/
void AddChange(wxPoint wxc,char oldchar, char newchar);
/** Access Cursor Loc
* \return The current Loc
*/
wxPoint GetLoc(){return m_CursorLoc;}
/** Set Loc
* \param val New value to set
*/
void SetLoc(wxPoint val) { m_CursorLoc = val; }
/** Display the event details
*
*/
void print();
/**
* \return the previous char
*/
char GetOldChar(){return m_OldChar;}
/**
* \return The current char
*/
char GetNewChar(){return m_NewChar;}
protected:
private:
CharChange* next; //!< Member variable "next"
char m_OldChar;
char m_NewChar;
wxPoint m_CursorLoc;
};
#endif // CHARCHANGE_H