27 #include "ui/control.h"
28 #include "ui/scroll.h"
34 #include "common/misc.h"
41 #include <boost/filesystem.hpp>
42 #include <boost/algorithm/string.hpp>
44 namespace fs = boost::filesystem;
52 const int EDITSTUDIOMAX = 20000;
54 const int EDITLINEMAX = 1000;
56 const int EDITIMAGEMAX = 50;
58 const int EDITLINKMAX = 100;
60 const int EDITHISTORYMAX = 50;
63 const int EDITUNDOMAX = 20;
141 bool EventProcess(
const Event &event);
144 void SetText(
const char *text,
bool bNew=
true);
145 void GetText(
char *buffer,
int max);
149 bool ReadText(std::string filename,
int addSize=0);
150 bool WriteText(std::string filename);
152 void SetMaxChar(
int max);
155 void SetEditCap(
bool bMode);
158 void SetHighlightCap(
bool bEnable);
159 bool GetHighlightCap();
161 void SetInsideScroll(
bool bInside);
162 bool GetInsideScroll();
164 void SetSoluceMode(
bool bSoluce);
165 bool GetSoluceMode();
167 void SetGenericMode(
bool bGeneric);
168 bool GetGenericMode();
170 void SetAutoIndent(
bool bMode);
171 bool GetAutoIndent();
173 void SetCursor(
int cursor1,
int cursor2);
174 void GetCursor(
int &cursor1,
int &cursor2);
176 void SetFirstLine(
int rank);
180 void SetDisplaySpec(
bool bDisplay);
181 bool GetDisplaySpec();
183 void SetMultiFont(
bool bMulti);
187 bool Copy(
bool memorize_cursor =
false);
192 void HyperHome(std::string filename);
196 void SetFontSize(
float size);
199 bool SetFormat(
int cursor1,
int cursor2,
int format);
202 void SendModifEvent();
211 void HyperJump(std::string name, std::string marker);
212 bool HyperAdd(std::string filename,
int firstLine);
214 void DrawImage(
Math::Point pos, std::string name,
float width,
float offset,
float height,
int nbLine);
219 void LoadImage(std::string name);
220 void Scroll(
int pos,
bool bAdjustCursor);
222 void MoveChar(
int move,
bool bWord,
bool bSelect);
223 void MoveLine(
int move,
bool bWord,
bool bSelect);
224 void MoveHome(
bool bWord,
bool bSelect);
225 void MoveEnd(
bool bWord,
bool bSelect);
227 void Insert(
char character);
228 void InsertOne(
char character);
229 void Delete(
int dir);
230 void DeleteOne(
int dir);
232 int IndentTabCount();
233 void IndentTabAdjust(
int number);
234 bool Shift(
bool bLeft);
235 bool MinMaj(
bool bMaj);
237 int GetCursorLine(
int cursor);
240 void UndoMemorize(OperUndo oper);
250 std::vector<Gfx::FontMetaChar> m_format;
258 bool m_bInsideScroll;
270 int m_lineOffset[EDITLINEMAX];
271 char m_lineIndent[EDITLINEMAX];
278 int m_historyCurrent;
282 float m_timeLastClick;
283 float m_timeLastScroll;