diff options
author | Michał Konopacki <konopacki.m@gmail.com> | 2012-09-15 16:35:48 +0200 |
---|---|---|
committer | Michał Konopacki <konopacki.m@gmail.com> | 2012-09-15 16:35:48 +0200 |
commit | d439f4fa93eb45175dcdfa773af8f68efa1bad9d (patch) | |
tree | a2620bee6aae9ee49726892c5d1ebe717ad88e33 /src/ui/edit.h | |
parent | e57be247c2ddce796fd64e9f3c1b3bfa4759b74a (diff) | |
parent | e9fcec9de52471508933c9d90cc6041ce0af9752 (diff) | |
download | colobot-d439f4fa93eb45175dcdfa773af8f68efa1bad9d.tar.gz colobot-d439f4fa93eb45175dcdfa773af8f68efa1bad9d.tar.bz2 colobot-d439f4fa93eb45175dcdfa773af8f68efa1bad9d.zip |
Merge branch 'dev-ui' into dev
Conflicts:
src/CMakeLists.txt
src/common/misc.cpp
src/common/misc.h
src/object/robotmain.cpp
src/object/robotmain.h
src/script/cbottoken.cpp
src/script/cbottoken.h
src/ui/button.cpp
src/ui/button.h
src/ui/check.cpp
src/ui/check.h
src/ui/color.cpp
src/ui/color.h
src/ui/compass.cpp
src/ui/compass.h
src/ui/control.cpp
src/ui/control.h
src/ui/displayinfo.cpp
src/ui/displayinfo.h
src/ui/displaytext.cpp
src/ui/displaytext.h
src/ui/edit.cpp
src/ui/edit.h
src/ui/gauge.cpp
src/ui/gauge.h
src/ui/interface.cpp
src/ui/interface.h
src/ui/key.cpp
src/ui/map.h
src/ui/shortcut.h
src/ui/slider.h
src/ui/target.cpp
src/ui/target.h
src/ui/window.cpp
src/ui/window.h
Diffstat (limited to 'src/ui/edit.h')
-rw-r--r-- | src/ui/edit.h | 42 |
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 |