summaryrefslogtreecommitdiffstats
path: root/src/ui/edit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/edit.h')
-rw-r--r--src/ui/edit.h37
1 files changed, 21 insertions, 16 deletions
diff --git a/src/ui/edit.h b/src/ui/edit.h
index 7247181..1cfec80 100644
--- a/src/ui/edit.h
+++ b/src/ui/edit.h
@@ -32,11 +32,16 @@
#include "common/event.h"
#include "common/misc.h"
-#include "common/iman.h"
#include "common/restext.h"
#include <set>
+#include <string>
+#include <cstdlib>
+#include <boost/filesystem.hpp>
+#include <boost/algorithm/string.hpp>
+
+namespace fs = boost::filesystem;
namespace Ui {
@@ -85,7 +90,7 @@ enum OperUndo
struct ImageLine
{
//! name of the image (without diagram \)
- char name[40];
+ std::string name;
//! vertical offset (v texture)
float offset;
//! height of the part (dv texture)
@@ -97,15 +102,15 @@ struct ImageLine
struct HyperLink
{
//! text file name (without help \)
- char name[40];
+ std::string name;
//! name of the marker
- char marker[20];
+ std::string marker;
};
struct HyperMarker
{
//! name of the marker
- char name[20];
+ std::string name;
//! position in the text
int pos;
};
@@ -113,7 +118,7 @@ struct HyperMarker
struct HyperHistory
{
//! full file name text
- char filename[50];
+ std::string filename;
//! rank of the first displayed line
int firstLine;
};
@@ -141,8 +146,8 @@ public:
char* GetText();
int GetTextLength();
- bool ReadText(const char *filename, int addSize=0);
- bool WriteText(const char *filename);
+ bool ReadText(std::string filename, int addSize=0);
+ bool WriteText(std::string filename);
void SetMaxChar(int max);
int GetMaxChar();
@@ -150,8 +155,8 @@ public:
void SetEditCap(bool bMode);
bool GetEditCap();
- void SetHiliteCap(bool bEnable);
- bool GetHiliteCap();
+ void SetHighlightCap(bool bEnable);
+ bool GetHighlightCap();
void SetInsideScroll(bool bInside);
bool GetInsideScroll();
@@ -184,7 +189,7 @@ public:
bool Undo();
void HyperFlush();
- void HyperHome(const char *filename);
+ void HyperHome(std::string filename);
bool HyperTest(EventType event);
bool HyperGo(EventType event);
@@ -203,15 +208,15 @@ protected:
int MouseDetect(Math::Point mouse);
void MoveAdjust();
- void HyperJump(const char *name, const char *marker);
- bool HyperAdd(const char *filename, int firstLine);
+ void HyperJump(std::string name, std::string marker);
+ bool HyperAdd(std::string filename, int firstLine);
- void DrawImage(Math::Point pos, const char *name, float width, float offset, float height, int nbLine);
+ void DrawImage(Math::Point pos, std::string 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(const char *name);
+ void LoadImage(std::string name);
void Scroll(int pos, bool bAdjustCursor);
void Scroll();
void MoveChar(int move, bool bWord, bool bSelect);
@@ -242,7 +247,7 @@ protected:
int m_maxChar; // max length of the buffer m_text
char* m_text; // text (without zero terminator)
- std::map<unsigned int, Gfx::FontMetaChar> 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