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;
Main graphics engine - CEngine class.
int firstLine
rank of the first displayed line
Definition: edit.h:123
float width
width
Definition: edit.h:99
Text rendering - CText class.
std::string name
name of the image (without icons/)
Definition: edit.h:93
int pos
position in the text
Definition: edit.h:115
std::string name
text file name (without help/)
Definition: edit.h:105
std::string name
name of the marker
Definition: edit.h:113
Translation and string resource utilities.
std::string marker
name of the marker
Definition: edit.h:107
int cursor2
offset cursor
Definition: edit.h:74
CEdit()
Object's constructor.
Definition: edit.cpp:77
2D point
Definition: point.h:46
float height
height of the part (dv texture)
Definition: edit.h:97
int lineFirst
the first line displayed.
Definition: edit.h:76
char * text
original text
Definition: edit.h:68
float offset
vertical offset (v texture)
Definition: edit.h:95
Event types, structs and event queue.
EventType
Type of event message.
Definition: event.h:35
Event sent by system, interface or game.
Definition: event.h:686
int cursor1
offset cursor
Definition: edit.h:72
int len
length of the text
Definition: edit.h:70
std::string filename
full file name text
Definition: edit.h:121