29 #include "ui/control.h"
30 #include "ui/scroll.h"
36 #include "common/misc.h"
43 #include <boost/filesystem.hpp>
44 #include <boost/algorithm/string.hpp>
46 namespace fs = boost::filesystem;
54 const int EDITSTUDIOMAX = 20000;
56 const int EDITLINEMAX = 1000;
58 const int EDITIMAGEMAX = 100;
60 const int EDITLINKMAX = 100;
62 const int EDITHISTORYMAX = 50;
65 const int EDITUNDOMAX = 20;
143 bool EventProcess(
const Event &event);
146 void SetText(
const char *text,
bool bNew=
true);
147 void GetText(
char *buffer,
int max);
151 bool ReadText(std::string filename,
int addSize=0);
152 bool WriteText(std::string filename);
154 void SetMaxChar(
int max);
157 void SetEditCap(
bool bMode);
160 void SetHighlightCap(
bool bEnable);
161 bool GetHighlightCap();
163 void SetInsideScroll(
bool bInside);
164 bool GetInsideScroll();
166 void SetSoluceMode(
bool bSoluce);
167 bool GetSoluceMode();
169 void SetGenericMode(
bool bGeneric);
170 bool GetGenericMode();
172 void SetAutoIndent(
bool bMode);
173 bool GetAutoIndent();
175 void SetCursor(
int cursor1,
int cursor2);
176 void GetCursor(
int &cursor1,
int &cursor2);
178 void SetFirstLine(
int rank);
182 void SetDisplaySpec(
bool bDisplay);
183 bool GetDisplaySpec();
185 void SetMultiFont(
bool bMulti);
189 bool Copy(
bool memorize_cursor =
false);
194 void HyperHome(std::string filename);
198 void SetFontSize(
float size);
201 bool SetFormat(
int cursor1,
int cursor2,
int format);
204 void SendModifEvent();
213 void HyperJump(std::string name, std::string marker);
214 bool HyperAdd(std::string filename,
int firstLine);
216 void DrawImage(
Math::Point pos, std::string name,
float width,
float offset,
float height,
int nbLine);
221 void LoadImage(std::string name);
222 void Scroll(
int pos,
bool bAdjustCursor);
224 void MoveChar(
int move,
bool bWord,
bool bSelect);
225 void MoveLine(
int move,
bool bWord,
bool bSelect);
226 void MoveHome(
bool bWord,
bool bSelect);
227 void MoveEnd(
bool bWord,
bool bSelect);
229 void Insert(
char character);
230 void InsertOne(
char character);
231 void Delete(
int dir);
232 void DeleteOne(
int dir);
234 int IndentTabCount();
235 void IndentTabAdjust(
int number);
236 bool Shift(
bool bLeft);
237 bool MinMaj(
bool bMaj);
239 int GetCursorLine(
int cursor);
242 void UndoMemorize(OperUndo oper);
252 std::vector<Gfx::FontMetaChar> m_format;
260 bool m_bInsideScroll;
272 int m_lineOffset[EDITLINEMAX];
273 char m_lineIndent[EDITLINEMAX];
280 int m_historyCurrent;
284 float m_timeLastClick;
285 float m_timeLastScroll;
Main graphics engine - CEngine class.
int firstLine
rank of the first displayed line
Definition: edit.h:125
float width
width
Definition: edit.h:101
Definition: controller.h:32
Text rendering - CText class.
std::string name
name of the image (without icons/)
Definition: edit.h:95
int pos
position in the text
Definition: edit.h:117
std::string name
text file name (without help/)
Definition: edit.h:107
std::string name
name of the marker
Definition: edit.h:115
Translation and string resource utilities.
std::string marker
name of the marker
Definition: edit.h:109
int cursor2
offset cursor
Definition: edit.h:76
CEdit()
Object's constructor.
Definition: edit.cpp:87
2D point
Definition: point.h:49
float height
height of the part (dv texture)
Definition: edit.h:99
int lineFirst
the first line displayed.
Definition: edit.h:78
char * text
original text
Definition: edit.h:70
float offset
vertical offset (v texture)
Definition: edit.h:97
Event types, structs and event queue.
EventType
Type of event message.
Definition: event.h:38
Event sent by system, interface or game.
Definition: event.h:678
int cursor1
offset cursor
Definition: edit.h:74
int len
length of the text
Definition: edit.h:72
std::string filename
full file name text
Definition: edit.h:123