aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui/mactext.h
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/macgui/mactext.h')
-rw-r--r--graphics/macgui/mactext.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/graphics/macgui/mactext.h b/graphics/macgui/mactext.h
index 7cb115902e..e66a394c0d 100644
--- a/graphics/macgui/mactext.h
+++ b/graphics/macgui/mactext.h
@@ -32,7 +32,7 @@ namespace Graphics {
class MacWindowManager;
struct MacFontRun {
- Common::String text;
+ Common::U32String text;
uint16 fontId;
byte textSlant;
@@ -88,7 +88,9 @@ struct MacTextLine {
class MacText {
public:
- MacText(Common::String s, MacWindowManager *wm, const MacFont *font, int fgcolor, int bgcolor,
+ MacText(Common::U32String s, MacWindowManager *wm, const MacFont *font, int fgcolor, int bgcolor,
+ int maxWidth = -1, TextAlign textAlignment = kTextAlignLeft, int interlinear = 0);
+ MacText(const Common::String &s, MacWindowManager *wm, const MacFont *font, int fgcolor, int bgcolor,
int maxWidth = -1, TextAlign textAlignment = kTextAlignLeft, int interlinear = 0);
// 0 pixels between the lines by default
~MacText();
@@ -102,10 +104,13 @@ public:
}
void draw(ManagedSurface *g, int x, int y, int w, int h, int xoff, int yoff);
- void appendText(Common::String str, int fontId = kMacFontChicago, int fontSize = 12, int fontSlant = kMacFontRegular, bool skipAdd = false);
- void appendTextDefault(Common::String str, bool skipAdd = false);
+ void appendText(Common::U32String str, int fontId = kMacFontChicago, int fontSize = 12, int fontSlant = kMacFontRegular, bool skipAdd = false);
+ void appendText(const Common::String &str, int fontId = kMacFontChicago, int fontSize = 12, int fontSlant = kMacFontRegular, bool skipAdd = false);
+ void appendTextDefault(Common::U32String str, bool skipAdd = false);
+ void appendTextDefault(const Common::String &str, bool skipAdd = false);
void clearText();
- void replaceLastLine(Common::String str);
+ void replaceLastLine(Common::U32String str);
+ void replaceLastLine(const Common::String &str);
void removeLastLine();
int getLineCount() { return _textLines.size(); }
int getTextHeight() { return _textMaxHeight; }
@@ -116,10 +121,10 @@ public:
void getRowCol(int x, int y, int *sx, int *sy, int *row, int *col);
- Common::String getTextChunk(int startRow, int startCol, int endRow, int endCol, bool formatted = false, bool newlines = true);
+ Common::U32String getTextChunk(int startRow, int startCol, int endRow, int endCol, bool formatted = false, bool newlines = true);
private:
- void splitString(Common::String &s);
+ void splitString(Common::U32String &s);
void render(int from, int to);
void recalcDims();
void reallocSurface();
@@ -128,7 +133,7 @@ private:
private:
MacWindowManager *_wm;
- Common::String _str;
+ Common::U32String _str;
const MacFont *_macFont;
int _fgcolor, _bgcolor;