summaryrefslogtreecommitdiffstats
path: root/src/ui/edit.h
diff options
context:
space:
mode:
authorerihel <erihel@gmail.com>2012-08-31 22:28:07 +0200
committererihel <erihel@gmail.com>2012-08-31 22:28:07 +0200
commit6ba0f42f22a170625f15879e01b4653a4ac153a1 (patch)
tree129478ed8c5e4fd167c7c77c8ce00b88c5a4f83b /src/ui/edit.h
parent5408fe92527a4df01e4d66a2cdfdbbbea5738afc (diff)
downloadcolobot-6ba0f42f22a170625f15879e01b4653a4ac153a1.tar.gz
colobot-6ba0f42f22a170625f15879e01b4653a4ac153a1.tar.bz2
colobot-6ba0f42f22a170625f15879e01b4653a4ac153a1.zip
latest changes; few more classes should compile now
Diffstat (limited to 'src/ui/edit.h')
-rw-r--r--src/ui/edit.h42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/ui/edit.h b/src/ui/edit.h
index 99ec693..22ac577 100644
--- a/src/ui/edit.h
+++ b/src/ui/edit.h
@@ -24,15 +24,26 @@
#pragma once
-//#include "common/struct.h"
-#include "ui/control.h"
+#include <ui/control.h>
+#include <ui/scroll.h>
+
+#include <graphics/engine/engine.h>
+#include <graphics/engine/text.h>
+
+#include <common/language.h>
+#include <common/event.h>
+#include <common/misc.h>
+#include <common/iman.h>
+#include <common/restext.h>
+
+#include <app/app.h>
+
+#include <vector>
+
-namespace Gfx{
-class CEngine;
-};
namespace Ui {
-class CScroll;
+
//! maximum number of characters in CBOT edit
@@ -128,13 +139,13 @@ public:
bool EventProcess(const Event &event);
void Draw();
- void SetText(char *text, bool bNew=true);
+ void SetText(const char *text, bool bNew=true);
void GetText(char *buffer, int max);
char* GetText();
int GetTextLength();
- bool ReadText(char *filename, int addSize=0);
- bool WriteText(char *filename);
+ bool ReadText(const char *filename, int addSize=0);
+ bool WriteText(const char *filename);
void SetMaxChar(int max);
int GetMaxChar();
@@ -176,7 +187,7 @@ public:
bool Undo();
void HyperFlush();
- void HyperHome(char *filename);
+ void HyperHome(const char *filename);
bool HyperTest(EventType event);
bool HyperGo(EventType event);
@@ -195,15 +206,15 @@ protected:
int MouseDetect(Math::Point mouse);
void MoveAdjust();
- void HyperJump(char *name, char *marker);
- bool HyperAdd(char *filename, int firstLine);
+ void HyperJump(const char *name, const char *marker);
+ bool HyperAdd(const char *filename, int firstLine);
- void DrawImage(Math::Point pos, char *name, float width, float offset, float height, int nbLine);
+ void DrawImage(Math::Point pos, const char *name, float width, float offset, float height, int nbLine);
void DrawBack(Math::Point pos, Math::Point dim);
void DrawPart(Math::Point pos, Math::Point dim, int icon);
void FreeImage();
- void LoadImage(char *name);
+ void LoadImage(const char *name);
void Scroll(int pos, bool bAdjustCursor);
void Scroll();
void MoveChar(int move, bool bWord, bool bSelect);
@@ -232,10 +243,11 @@ protected:
int m_maxChar; // max length of the buffer m_text
char* m_text; // text (without zero terminator)
- char* m_format; // format characters
+ std::vector<Gfx::FontMetaChar> m_format; // format characters
int m_len; // length used in m_text
int m_cursor1; // offset cursor
int m_cursor2; // offset cursor
+ CApplication *m_app;
bool m_bMulti; // true -> multi-line
bool m_bEdit; // true -> editable