28 #include "ui/controls/control.h" 124 bool EventProcess(
const Event &event)
override;
125 void Draw()
override;
127 void SetText(
const char *
text,
bool bNew=
true);
128 void GetText(
char *buffer,
int max);
132 bool ReadText(std::string filename,
int addSize=0);
133 bool WriteText(std::string filename);
135 void SetMaxChar(
int max);
138 void SetEditCap(
bool bMode);
141 void SetHighlightCap(
bool bEnable);
142 bool GetHighlightCap();
144 void SetInsideScroll(
bool bInside);
145 bool GetInsideScroll();
147 void SetSoluceMode(
bool bSoluce);
148 bool GetSoluceMode();
150 void SetGenericMode(
bool bGeneric);
151 bool GetGenericMode();
153 void SetAutoIndent(
bool bMode);
154 bool GetAutoIndent();
157 void GetCursor(
int &cursor1,
int &cursor2);
159 void SetFirstLine(
int rank);
163 void SetDisplaySpec(
bool bDisplay);
164 bool GetDisplaySpec();
166 void SetMultiFont(
bool bMulti);
170 bool Copy(
bool memorize_cursor =
false);
175 void HyperHome(std::string filename);
179 void SetFontSize(
float size)
override;
182 bool SetFormat(
int cursor1,
int cursor2,
int format);
185 void SendModifEvent();
194 void HyperJump(std::string name, std::string marker);
195 bool HyperAdd(std::string filename,
int firstLine);
197 void DrawImage(
Math::Point pos, std::string name,
float width,
float offset,
float height,
int nbLine);
204 void Scroll(
int pos,
bool bAdjustCursor);
206 void MoveChar(
int move,
bool bWord,
bool bSelect);
207 void MoveLine(
int move,
bool bWord,
bool bSelect);
208 void MoveHome(
bool bWord,
bool bSelect);
209 void MoveEnd(
bool bWord,
bool bSelect);
211 void Insert(
char character);
212 void InsertOne(
char character);
213 void Delete(
int dir);
214 void DeleteOne(
int dir);
216 int IndentTabCount();
217 void IndentTabAdjust(
int number);
218 bool Shift(
bool bLeft);
219 bool MinMaj(
bool bMaj);
221 int GetCursorLine(
int cursor);
229 void SetFocus(
CControl* control)
override;
232 void GetIndentedText(std::ostream& stream,
unsigned int start,
unsigned int end);
235 std::unique_ptr<CScroll> m_scroll;
238 std::vector<char> m_text;
239 std::vector<Gfx::FontMetaChar> m_format;
247 bool m_bInsideScroll;
259 int m_lineOffset[EDITLINEMAX];
260 char m_lineIndent[EDITLINEMAX];
261 std::vector<ImageLine> m_image;
262 std::vector<HyperLink> m_link;
263 std::vector<HyperMarker> m_marker;
265 int m_historyCurrent;
269 float m_timeLastClick;
270 float m_timeLastScroll;
const int EDITSTUDIOMAX
maximum number of characters in CBOT edit
Definition: edit.h:39
special operation
Definition: edit.h:66
const int EDITLINEMAX
maximum total number of lines
Definition: edit.h:41
deleting characters
Definition: edit.h:70
Definition: robotmain.h:108
std::string name
name of the image (without icons/)
Definition: edit.h:76
std::string name
text file name (without help/)
Definition: edit.h:88
OperUndo
Definition: edit.h:63
std::string name
name of the marker
Definition: edit.h:96
std::string marker
name of the marker
Definition: edit.h:90
int cursor2
offset cursor
Definition: edit.h:57
2D point
Definition: point.h:50
int lineFirst
the first line displayed.
Definition: edit.h:59
const int EDITHISTORYMAX
max number of levels preserves
Definition: edit.h:43
std::vector< char > text
original text
Definition: edit.h:51
inserting characters
Definition: edit.h:68
RGBA color.
Definition: color.h:39
EventType
Type of event message.
Definition: event.h:41
Event sent by system, interface or game.
Definition: event.h:735
int cursor1
offset cursor
Definition: edit.h:55
int len
length of the text
Definition: edit.h:53
std::string filename
full file name text
Definition: edit.h:104
const int EDITUNDOMAX
max number of successive undo
Definition: edit.h:46