summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/DashEdit.h
Unidiff
Diffstat (limited to 'inputmethods/dasher/DashEdit.h') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/dasher/DashEdit.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/inputmethods/dasher/DashEdit.h b/inputmethods/dasher/DashEdit.h
index dc14d15..0baeec9 100644
--- a/inputmethods/dasher/DashEdit.h
+++ b/inputmethods/dasher/DashEdit.h
@@ -2,122 +2,122 @@
2// DashEdit.h 2// DashEdit.h
3// 3//
4///////////////////////////////////////////////////////////////////////////// 4/////////////////////////////////////////////////////////////////////////////
5// 5//
6// Copyright (c) 2002 Iain Murray 6// Copyright (c) 2002 Iain Murray
7// 7//
8///////////////////////////////////////////////////////////////////////////// 8/////////////////////////////////////////////////////////////////////////////
9 9
10/* 10/*
11An abstract DashEditbox class is described here. 11An abstract DashEditbox class is described here.
12An implementation will handle interaction between Dasher and an actual Edit control. 12An implementation will handle interaction between Dasher and an actual Edit control.
13e.g. - output characters to the edit control 13e.g. - output characters to the edit control
14 - tapping on the edit box updates the Dasher display 14 - tapping on the edit box updates the Dasher display
15*/ 15*/
16 16
17#ifndef __DashEdit_h__ 17#ifndef __DashEdit_h__
18#define __DashEdit_h__ 18#define __DashEdit_h__
19 19
20#include "DasherWidgetInterface.h" 20#include "DasherWidgetInterface.h"
21 21
22namespace Dasher {class CDashEditbox;} 22namespace Dasher {class CDashEditbox;}
23class Dasher::CDashEditbox 23class Dasher::CDashEditbox
24{ 24{
25public: 25public:
26 CDashEditbox() : m_iFlushed(0), m_DasherInterface(0), m_dirty(false) {} 26 CDashEditbox() : m_dirty(false),m_iFlushed(0), m_DasherInterface(0) {}
27 27
28 //! Provide the Editbox with a widget interface 28 //! Provide the Editbox with a widget interface
29 virtual void SetInterface(CDasherWidgetInterface* DasherInterface) {m_DasherInterface = DasherInterface;} 29 virtual void SetInterface(CDasherWidgetInterface* DasherInterface) {m_DasherInterface = DasherInterface;}
30 30
31 //! Write some buffered output to a file 31 //! Write some buffered output to a file
32 virtual void write_to_file()=0; 32 virtual void write_to_file()=0;
33 33
34 //! Set the number of flushed characters 34 //! Set the number of flushed characters
35 // 35 //
36 //! Set the number of flushed characters to an arbitrary number. 36 //! Set the number of flushed characters to an arbitrary number.
37 //! Usually used to reset it to 0 after unflushing 37 //! Usually used to reset it to 0 after unflushing
38 void set_flushed(int i) {m_iFlushed=i;} 38 void set_flushed(int i) {m_iFlushed=i;}
39 39
40 //! Provide context from the editbox for the core 40 //! Provide context from the editbox for the core
41 // 41 //
42 //! Provide the context at the current position within the editbox to 42 //! Provide the context at the current position within the editbox to
43 //! the core. Set str to up to max characters before 43 //! the core. Set str to up to max characters before
44 //! the cursor position within the editbox. 44 //! the cursor position within the editbox.
45 virtual void get_new_context(std::string& str, int max)=0; 45 virtual void get_new_context(std::string& str, int max)=0;
46 46
47 //! Delete flushed text from the editbox 47 //! Delete flushed text from the editbox
48 virtual inline void unflush()=0; 48 virtual void unflush()=0;
49 49
50 //! Enter a the character Symbol into the text box 50 //! Enter a the character Symbol into the text box
51 virtual void output(symbol Symbol)=0; 51 virtual void output(symbol Symbol)=0;
52 52
53 //! Delete the previous symbol from the text box 53 //! Delete the previous symbol from the text box
54 virtual void deletetext()=0; 54 virtual void deletetext()=0;
55 55
56 //! Enter a character into the text box and remember that it is flushed 56 //! Enter a character into the text box and remember that it is flushed
57 // 57 //
58 //! Output the character and increment m_iFlushed. When unflush is 58 //! Output the character and increment m_iFlushed. When unflush is
59 //! called, remove the previous m_iFlushed characters 59 //! called, remove the previous m_iFlushed characters
60 virtual void flush(symbol Symbol)=0; 60 virtual void flush(symbol Symbol)=0;
61 61
62 // File I/O (optional) 62 // File I/O (optional)
63 63
64 //! If Value is true, timestamp all new files (optional) 64 //! If Value is true, timestamp all new files (optional)
65 // 65 //
66 //! If switched on, all new files should be timestamped, either in the 66 //! If switched on, all new files should be timestamped, either in the
67 //! filename or in file metadata 67 //! filename or in file metadata
68 virtual void TimeStampNewFiles(bool Value) {} 68 virtual void TimeStampNewFiles(bool ) {}
69 69
70 //! Return true if any text has been modified since the last save (optional) 70 //! Return true if any text has been modified since the last save (optional)
71 bool IsDirty() {return m_dirty;} 71 bool IsDirty() {return m_dirty;}
72 72
73 //! Generate a new file (optional) 73 //! Generate a new file (optional)
74 // 74 //
75 //! New file - provide a file save dialogue and return the filename in 75 //! New file - provide a file save dialogue and return the filename in
76 //! filename, or provide a blank filename and present a file 76 //! filename, or provide a blank filename and present a file
77 //! save dialogue when Save() is called 77 //! save dialogue when Save() is called
78 virtual void New(const std::string& filename) {}; // filename can be "", but you cannot call Save() without having set a filename. 78 virtual void New(const std::string& ) {}; // filename can be "", but you cannot call Save() without having set a filename.
79 79
80 //! Open a file (optional) 80 //! Open a file (optional)
81 // 81 //
82 //! Provide a file open dialogue and set filename to the 82 //! Provide a file open dialogue and set filename to the
83 //! filename. Return true if a file is chosen and opened successfully, 83 //! filename. Return true if a file is chosen and opened successfully,
84 //! false otherwise 84 //! false otherwise
85 virtual bool Open(const std::string& filename) {return false;}; 85 virtual bool Open(const std::string& ) {return false;};
86 86
87 //! Open a file and append to it (optional) 87 //! Open a file and append to it (optional)
88 // 88 //
89 //! Provide a file open dialogue and set filename to the 89 //! Provide a file open dialogue and set filename to the
90 //! filename. The file will then have any new text appended to it. 90 //! filename. The file will then have any new text appended to it.
91 //! Return true if a file is chosen and opened successfully, false 91 //! Return true if a file is chosen and opened successfully, false
92 //! otherwise 92 //! otherwise
93 virtual bool OpenAppendMode(const std::string& filename) {return false;}; 93 virtual bool OpenAppendMode(const std::string& ) {return false;};
94 //! Save a file as a provided filename (optional) 94 //! Save a file as a provided filename (optional)
95 // 95 //
96 //! Provide a file save dialogue and set filename to the 96 //! Provide a file save dialogue and set filename to the
97 //! filename. Return true if a file is chosen and saved successfully, 97 //! filename. Return true if a file is chosen and saved successfully,
98 //! false otherwise 98 //! false otherwise
99 virtual bool SaveAs(const std::string& filename) {return false;}; 99 virtual bool SaveAs(const std::string& ) {return false;};
100 100
101 //! Save the current file (optional) 101 //! Save the current file (optional)
102 // 102 //
103 //! Save file to the current filename. If there is no current filename, 103 //! Save file to the current filename. If there is no current filename,
104 //! or if saving fails, return false 104 //! or if saving fails, return false
105 virtual bool Save() {return false;}; // returns false if there is no filename set, or if saving fails 105 virtual bool Save() {return false;}; // returns false if there is no filename set, or if saving fails
106 106
107 // Clipboard (optional) 107 // Clipboard (optional)
108 //! Cut selected text (optional) 108 //! Cut selected text (optional)
109 // 109 //
110 //! Copy the selected text to the clipboard and remove it from the 110 //! Copy the selected text to the clipboard and remove it from the
111 //! editbox 111 //! editbox
112 virtual void Cut() {}; 112 virtual void Cut() {};
113 113
114 //! Copy selected text (optional) 114 //! Copy selected text (optional)
115 // 115 //
116 //! Copy the selected text to the clipboard 116 //! Copy the selected text to the clipboard
117 virtual void Copy() {}; 117 virtual void Copy() {};
118 118
119 //! Copy all text (optional) 119 //! Copy all text (optional)
120 // 120 //
121 //! Copy all text in the editbox to the clipboard 121 //! Copy all text in the editbox to the clipboard
122 virtual void CopyAll() {}; 122 virtual void CopyAll() {};
123 123