aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2006-06-05 12:22:51 +0000
committerMax Horn2006-06-05 12:22:51 +0000
commitc0805830eb5f9c9f8221a5c2c5fdc8b032ff2b03 (patch)
tree85bb253b4909f65b00426ca1439370b42bafc7cd
parent60e1b8427e8465fdd17a20424f80fab06755576f (diff)
downloadscummvm-rg350-c0805830eb5f9c9f8221a5c2c5fdc8b032ff2b03.tar.gz
scummvm-rg350-c0805830eb5f9c9f8221a5c2c5fdc8b032ff2b03.tar.bz2
scummvm-rg350-c0805830eb5f9c9f8221a5c2c5fdc8b032ff2b03.zip
Fix various typenames to comply to the ScummVM coding guidelines
svn-id: r22928
-rw-r--r--gui/EditTextWidget.cpp2
-rw-r--r--gui/ScrollBarWidget.cpp2
-rw-r--r--gui/ThemeClassic.cpp28
-rw-r--r--gui/ThemeNew.cpp30
-rw-r--r--gui/about.cpp4
-rw-r--r--gui/console.cpp2
-rw-r--r--gui/editable.h4
-rw-r--r--gui/newgui.h8
-rw-r--r--gui/theme.h132
9 files changed, 106 insertions, 106 deletions
diff --git a/gui/EditTextWidget.cpp b/gui/EditTextWidget.cpp
index fafcfb955e..ffff3671fb 100644
--- a/gui/EditTextWidget.cpp
+++ b/gui/EditTextWidget.cpp
@@ -56,7 +56,7 @@ void EditTextWidget::handleScreenChanged() {
_leftPadding = g_gui.evaluator()->getVar("EditTextWidget.leftPadding", 0);
_rightPadding = g_gui.evaluator()->getVar("EditTextWidget.rightPadding", 0);
- _font = (Theme::kFontStyle)g_gui.evaluator()->getVar("EditTextWidget.font", Theme::kFontStyleNormal);
+ _font = (Theme::FontStyle)g_gui.evaluator()->getVar("EditTextWidget.font", Theme::kFontStyleNormal);
}
diff --git a/gui/ScrollBarWidget.cpp b/gui/ScrollBarWidget.cpp
index 34d47640dc..1875854ca0 100644
--- a/gui/ScrollBarWidget.cpp
+++ b/gui/ScrollBarWidget.cpp
@@ -185,7 +185,7 @@ void ScrollBarWidget::drawWidget(bool hilite) {
if (_draggingPart != kNoPart)
_part = _draggingPart;
- Theme::kScrollbarState state = Theme::kScrollbarStateNo;
+ Theme::ScrollbarState state = Theme::kScrollbarStateNo;
if (_numEntries <= _entriesPerPage) {
state = Theme::kScrollbarStateSinglePage;
} else if (_part == kUpArrowPart) {
diff --git a/gui/ThemeClassic.cpp b/gui/ThemeClassic.cpp
index 3e8c050f08..b1ebba917a 100644
--- a/gui/ThemeClassic.cpp
+++ b/gui/ThemeClassic.cpp
@@ -138,7 +138,7 @@ void ThemeClassic::resetDrawArea() {
}
}
-void ThemeClassic::drawDialogBackground(const Common::Rect &r, uint16 hints, kState state) {
+void ThemeClassic::drawDialogBackground(const Common::Rect &r, uint16 hints, State state) {
if (!_initOk)
return;
@@ -155,7 +155,7 @@ void ThemeClassic::drawDialogBackground(const Common::Rect &r, uint16 hints, kSt
addDirtyRect(r, (hints & THEME_HINT_SAVE_BACKGROUND) != 0);
}
-void ThemeClassic::drawText(const Common::Rect &r, const Common::String &str, kState state, kTextAlign align, bool inverted, int deltax, bool useEllipsis, kFontStyle font) {
+void ThemeClassic::drawText(const Common::Rect &r, const Common::String &str, State state, TextAlign align, bool inverted, int deltax, bool useEllipsis, FontStyle font) {
if (!_initOk)
return;
@@ -170,7 +170,7 @@ void ThemeClassic::drawText(const Common::Rect &r, const Common::String &str, kS
addDirtyRect(r);
}
-void ThemeClassic::drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, kState state) {
+void ThemeClassic::drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, State state) {
if (!_initOk)
return;
restoreBackground(r);
@@ -178,7 +178,7 @@ void ThemeClassic::drawChar(const Common::Rect &r, byte ch, const Graphics::Font
addDirtyRect(r);
}
-void ThemeClassic::drawWidgetBackground(const Common::Rect &r, uint16 hints, kWidgetBackground background, kState state) {
+void ThemeClassic::drawWidgetBackground(const Common::Rect &r, uint16 hints, WidgetBackground background, State state) {
if (!_initOk || background == kWidgetBackgroundNo)
return;
@@ -206,7 +206,7 @@ void ThemeClassic::drawWidgetBackground(const Common::Rect &r, uint16 hints, kWi
addDirtyRect(r, (hints & THEME_HINT_SAVE_BACKGROUND) != 0);
}
-void ThemeClassic::drawButton(const Common::Rect &r, const Common::String &str, kState state) {
+void ThemeClassic::drawButton(const Common::Rect &r, const Common::String &str, State state) {
if (!_initOk)
return;
restoreBackground(r);
@@ -219,7 +219,7 @@ void ThemeClassic::drawButton(const Common::Rect &r, const Common::String &str,
addDirtyRect(r);
}
-void ThemeClassic::drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state, int alpha, bool themeTrans) {
+void ThemeClassic::drawSurface(const Common::Rect &r, const Graphics::Surface &surface, State state, int alpha, bool themeTrans) {
if (!_initOk)
return;
@@ -246,7 +246,7 @@ void ThemeClassic::drawSurface(const Common::Rect &r, const Graphics::Surface &s
addDirtyRect(r);
}
-void ThemeClassic::drawSlider(const Common::Rect &r, int width, kState state) {
+void ThemeClassic::drawSlider(const Common::Rect &r, int width, State state) {
if (!_initOk)
return;
Common::Rect r2 = r;
@@ -267,7 +267,7 @@ void ThemeClassic::drawSlider(const Common::Rect &r, int width, kState state) {
addDirtyRect(r);
}
-void ThemeClassic::drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, kState state, kTextAlign align) {
+void ThemeClassic::drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, State state, TextAlign align) {
if (!_initOk)
return;
@@ -297,7 +297,7 @@ void ThemeClassic::drawPopUpWidget(const Common::Rect &r, const Common::String &
addDirtyRect(r);
}
-void ThemeClassic::drawCheckbox(const Common::Rect &r, const Common::String &str, bool checked, kState state) {
+void ThemeClassic::drawCheckbox(const Common::Rect &r, const Common::String &str, bool checked, State state) {
if (!_initOk)
return;
@@ -341,7 +341,7 @@ void ThemeClassic::drawCheckbox(const Common::Rect &r, const Common::String &str
addDirtyRect(r);
}
-void ThemeClassic::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<Common::String> &tabs, int active, uint16 hints, kState state) {
+void ThemeClassic::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<Common::String> &tabs, int active, uint16 hints, State state) {
if (!_initOk)
return;
restoreBackground(r);
@@ -365,7 +365,7 @@ void ThemeClassic::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, c
addDirtyRect(r);
}
-void ThemeClassic::drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, kScrollbarState scroll, kState state) {
+void ThemeClassic::drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, ScrollbarState scroll, State state) {
if (!_initOk)
return;
restoreBackground(r);
@@ -428,7 +428,7 @@ void ThemeClassic::drawScrollbar(const Common::Rect &r, int sliderY, int sliderH
addDirtyRect(r);
}
-void ThemeClassic::drawCaret(const Common::Rect &r, bool erase, kState state) {
+void ThemeClassic::drawCaret(const Common::Rect &r, bool erase, State state) {
if (!_initOk)
return;
@@ -443,7 +443,7 @@ void ThemeClassic::drawCaret(const Common::Rect &r, bool erase, kState state) {
addDirtyRect(r);
}
-void ThemeClassic::drawLineSeparator(const Common::Rect &r, kState state) {
+void ThemeClassic::drawLineSeparator(const Common::Rect &r, State state) {
if (!_initOk)
return;
_screen.hLine(r.left - 1, r.top + r.height() / 2, r.right, _shadowcolor);
@@ -531,7 +531,7 @@ void ThemeClassic::box(int x, int y, int w, int h) {
_screen.vLine(x + w - 1, y, y + h - 1, _shadowcolor);
}
-OverlayColor ThemeClassic::getColor(kState state) {
+OverlayColor ThemeClassic::getColor(State state) {
OverlayColor usedColor = _color;
switch (state) {
case kStateEnabled:
diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp
index 1403672925..4598498d80 100644
--- a/gui/ThemeNew.cpp
+++ b/gui/ThemeNew.cpp
@@ -455,7 +455,7 @@ void ThemeNew::resetDrawArea() {
#define surface(x) (_images[x])
-void ThemeNew::drawDialogBackground(const Common::Rect &r, uint16 hints, kState state) {
+void ThemeNew::drawDialogBackground(const Common::Rect &r, uint16 hints, State state) {
if (!_initOk)
return;
@@ -488,7 +488,7 @@ void ThemeNew::drawDialogBackground(const Common::Rect &r, uint16 hints, kState
addDirtyRect(r2, (hints & THEME_HINT_SAVE_BACKGROUND) != 0, true);
}
-void ThemeNew::drawText(const Common::Rect &r, const Common::String &str, kState state, kTextAlign align, bool inverted, int deltax, bool useEllipsis, kFontStyle font) {
+void ThemeNew::drawText(const Common::Rect &r, const Common::String &str, State state, TextAlign align, bool inverted, int deltax, bool useEllipsis, FontStyle font) {
if (!_initOk)
return;
Common::Rect r2(r.left, r.top, r.right, r.top+getFontHeight(font));
@@ -508,7 +508,7 @@ void ThemeNew::drawText(const Common::Rect &r, const Common::String &str, kState
addDirtyRect(r2);
}
-void ThemeNew::drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, kState state) {
+void ThemeNew::drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, State state) {
if (!_initOk)
return;
restoreBackground(r);
@@ -516,7 +516,7 @@ void ThemeNew::drawChar(const Common::Rect &r, byte ch, const Graphics::Font *fo
addDirtyRect(r);
}
-void ThemeNew::drawWidgetBackground(const Common::Rect &r, uint16 hints, kWidgetBackground background, kState state) {
+void ThemeNew::drawWidgetBackground(const Common::Rect &r, uint16 hints, WidgetBackground background, State state) {
if (!_initOk)
return;
@@ -582,7 +582,7 @@ void ThemeNew::drawWidgetBackground(const Common::Rect &r, uint16 hints, kWidget
addDirtyRect((hints & THEME_HINT_USE_SHADOW) ? r2 : r, (hints & THEME_HINT_SAVE_BACKGROUND) != 0);
}
-void ThemeNew::drawButton(const Common::Rect &r, const Common::String &str, kState state) {
+void ThemeNew::drawButton(const Common::Rect &r, const Common::String &str, State state) {
if (!_initOk)
return;
@@ -624,7 +624,7 @@ void ThemeNew::drawButton(const Common::Rect &r, const Common::String &str, kSta
addDirtyRect(r2);
}
-void ThemeNew::drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state, int alpha, bool themeTrans) {
+void ThemeNew::drawSurface(const Common::Rect &r, const Graphics::Surface &surface, State state, int alpha, bool themeTrans) {
if (!_initOk)
return;
@@ -667,7 +667,7 @@ void ThemeNew::drawSurface(const Common::Rect &r, const Graphics::Surface &surfa
addDirtyRect(rect);
}
-void ThemeNew::drawSlider(const Common::Rect &rr, int width, kState state) {
+void ThemeNew::drawSlider(const Common::Rect &rr, int width, State state) {
if (!_initOk)
return;
@@ -699,7 +699,7 @@ void ThemeNew::drawSlider(const Common::Rect &rr, int width, kState state) {
addDirtyRect(r);
}
-void ThemeNew::drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, kState state, kTextAlign align) {
+void ThemeNew::drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, State state, TextAlign align) {
if (!_initOk)
return;
@@ -741,7 +741,7 @@ void ThemeNew::drawPopUpWidget(const Common::Rect &r, const Common::String &sel,
addDirtyRect(r2);
}
-void ThemeNew::drawCheckbox(const Common::Rect &r, const Common::String &str, bool checked, kState state) {
+void ThemeNew::drawCheckbox(const Common::Rect &r, const Common::String &str, bool checked, State state) {
if (!_initOk)
return;
Common::Rect r2 = r;
@@ -759,7 +759,7 @@ void ThemeNew::drawCheckbox(const Common::Rect &r, const Common::String &str, bo
addDirtyRect(r);
}
-void ThemeNew::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<Common::String> &tabs, int active, uint16 hints, kState state) {
+void ThemeNew::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<Common::String> &tabs, int active, uint16 hints, State state) {
if (!_initOk)
return;
@@ -794,7 +794,7 @@ void ThemeNew::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const
addDirtyRect(r);
}
-void ThemeNew::drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, kScrollbarState scrollState, kState state) {
+void ThemeNew::drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, ScrollbarState scrollState, State state) {
if (!_initOk)
return;
const int UP_DOWN_BOX_HEIGHT = r.width() + 1;
@@ -882,7 +882,7 @@ void ThemeNew::drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeigh
addDirtyRect(r);
}
-void ThemeNew::drawCaret(const Common::Rect &r, bool erase, kState state) {
+void ThemeNew::drawCaret(const Common::Rect &r, bool erase, State state) {
if (!_initOk)
return;
@@ -911,7 +911,7 @@ void ThemeNew::drawCaret(const Common::Rect &r, bool erase, kState state) {
addDirtyRect(r);
}
-void ThemeNew::drawLineSeparator(const Common::Rect &r, kState state) {
+void ThemeNew::drawLineSeparator(const Common::Rect &r, State state) {
if (!_initOk)
return;
_screen.hLine(r.left - 1, r.top + r.height() / 2, r.right, _system->RGBToColor(0, 0, 0));
@@ -1302,7 +1302,7 @@ void ThemeNew::drawSurfaceMasked(const Common::Rect &r, const Graphics::Surface
#undef NO_EFFECT
}
-OverlayColor ThemeNew::getColor(kState state) {
+OverlayColor ThemeNew::getColor(State state) {
switch (state) {
case kStateDisabled:
return _colors[kColorStateDisabled];
@@ -1407,7 +1407,7 @@ void ThemeNew::setupColors() {
#define FONT_NAME_FIXED_BOLD "newgui_fixed_bold"
#define FONT_NAME_FIXED_ITALIC "newgui_fixed_italic"
-void ThemeNew::setupFont(const String &key, const String &name, kFontStyle style) {
+void ThemeNew::setupFont(const String &key, const String &name, FontStyle style) {
if (_configFile.hasKey(key, "extra")) {
_fonts[style] = FontMan.getFontByName(name);
diff --git a/gui/about.cpp b/gui/about.cpp
index 1dc55b985d..981a50aef5 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -200,8 +200,8 @@ void AboutDialog::drawDialog() {
for (int line = firstLine; line < lastLine; line++) {
const char *str = _lines[line].c_str();
- Theme::kTextAlign align = Theme::kTextAlignCenter;
- Theme::kState state = Theme::kStateEnabled;
+ Theme::TextAlign align = Theme::kTextAlignCenter;
+ Theme::State state = Theme::kStateEnabled;
while (str[0] == '\\') {
switch (str[1]) {
case 'C':
diff --git a/gui/console.cpp b/gui/console.cpp
index 49d843133e..33e9679dcb 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -99,7 +99,7 @@ void ConsoleDialog::init() {
if (f == EVAL_UNDEF_VAR)
_font = FontMan.getFontByUsage(Graphics::FontManager::kConsoleFont);
else
- _font = g_gui.theme()->getFont((Theme::kFontStyle)f);
+ _font = g_gui.theme()->getFont((Theme::FontStyle)f);
_leftPadding = g_gui.evaluator()->getVar("Console.leftPadding", 0);
_rightPadding = g_gui.evaluator()->getVar("Console.rightPadding", 0);
diff --git a/gui/editable.h b/gui/editable.h
index de9a56bed1..6e0475559f 100644
--- a/gui/editable.h
+++ b/gui/editable.h
@@ -47,7 +47,7 @@ protected:
int _editScrollOffset;
- Theme::kFontStyle _font;
+ Theme::FontStyle _font;
public:
EditableWidget(GuiObject *boss, int x, int y, int w, int h);
@@ -74,7 +74,7 @@ protected:
bool adjustOffset();
void makeCaretVisible();
- void setFontStyle(Theme::kFontStyle font) { _font = font; }
+ void setFontStyle(Theme::FontStyle font) { _font = font; }
virtual bool tryInsertChar(char c, int pos);
};
diff --git a/gui/newgui.h b/gui/newgui.h
index ccdc201062..24bfe040d0 100644
--- a/gui/newgui.h
+++ b/gui/newgui.h
@@ -73,10 +73,10 @@ public:
Theme *theme() { return _theme; }
Eval *evaluator() { return _theme->_evaluator; }
- const Graphics::Font &getFont(Theme::kFontStyle style = Theme::kFontStyleBold) const { return *(_theme->getFont(style)); }
- int getFontHeight(Theme::kFontStyle style = Theme::kFontStyleBold) const { return _theme->getFontHeight(style); }
- int getStringWidth(const Common::String &str, Theme::kFontStyle style = Theme::kFontStyleBold) const { return _theme->getStringWidth(str, style); }
- int getCharWidth(byte c, Theme::kFontStyle style = Theme::kFontStyleBold) const { return _theme->getCharWidth(c, style); }
+ const Graphics::Font &getFont(Theme::FontStyle style = Theme::kFontStyleBold) const { return *(_theme->getFont(style)); }
+ int getFontHeight(Theme::FontStyle style = Theme::kFontStyleBold) const { return _theme->getFontHeight(style); }
+ int getStringWidth(const Common::String &str, Theme::FontStyle style = Theme::kFontStyleBold) const { return _theme->getStringWidth(str, style); }
+ int getCharWidth(byte c, Theme::FontStyle style = Theme::kFontStyleBold) const { return _theme->getCharWidth(c, style); }
WidgetSize getWidgetSize();
diff --git a/gui/theme.h b/gui/theme.h
index 5b4d0c6234..94f3f87fc3 100644
--- a/gui/theme.h
+++ b/gui/theme.h
@@ -70,13 +70,13 @@ public:
virtual ~Theme();
- enum kTextAlign {
+ enum TextAlign {
kTextAlignLeft,
kTextAlignCenter,
kTextAlignRight
};
- enum kWidgetBackground {
+ enum WidgetBackground {
kWidgetBackgroundNo,
kWidgetBackgroundPlain,
kWidgetBackgroundBorder,
@@ -84,13 +84,13 @@ public:
kWidgetBackgroundEditText
};
- enum kState {
+ enum State {
kStateDisabled,
kStateEnabled,
kStateHighlight
};
- enum kScrollbarState {
+ enum ScrollbarState {
kScrollbarStateNo,
kScrollbarStateUp,
kScrollbarStateDown,
@@ -98,7 +98,7 @@ public:
kScrollbarStateSinglePage
};
- enum kFontStyle {
+ enum FontStyle {
kFontStyleBold = 0, // standard font
kFontStyleNormal = 1,
kFontStyleItalic = 2,
@@ -130,31 +130,31 @@ public:
virtual const Common::ConfigFile &getConfigFile() { return _configFile; }
- virtual const Graphics::Font *getFont(kFontStyle font = kFontStyleBold) const = 0;
- virtual int getFontHeight(kFontStyle font = kFontStyleBold) const = 0;
- virtual int getStringWidth(const Common::String &str, kFontStyle font = kFontStyleBold) const = 0;
- virtual int getCharWidth(byte c, kFontStyle font = kFontStyleBold) const = 0;
+ virtual const Graphics::Font *getFont(FontStyle font = kFontStyleBold) const = 0;
+ virtual int getFontHeight(FontStyle font = kFontStyleBold) const = 0;
+ virtual int getStringWidth(const Common::String &str, FontStyle font = kFontStyleBold) const = 0;
+ virtual int getCharWidth(byte c, FontStyle font = kFontStyleBold) const = 0;
- virtual void drawDialogBackground(const Common::Rect &r, uint16 hints, kState state = kStateEnabled) = 0;
- virtual void drawText(const Common::Rect &r, const Common::String &str, kState state = kStateEnabled, kTextAlign align = kTextAlignCenter, bool inverted = false, int deltax = 0, bool useEllipsis = true, kFontStyle font = kFontStyleBold) = 0;
+ virtual void drawDialogBackground(const Common::Rect &r, uint16 hints, State state = kStateEnabled) = 0;
+ virtual void drawText(const Common::Rect &r, const Common::String &str, State state = kStateEnabled, TextAlign align = kTextAlignCenter, bool inverted = false, int deltax = 0, bool useEllipsis = true, FontStyle font = kFontStyleBold) = 0;
// this should ONLY be used by the debugger until we get a nicer solution
- virtual void drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, kState state = kStateEnabled) = 0;
-
- virtual void drawWidgetBackground(const Common::Rect &r, uint16 hints, kWidgetBackground background = kWidgetBackgroundPlain, kState state = kStateEnabled) = 0;
- virtual void drawButton(const Common::Rect &r, const Common::String &str, kState state = kStateEnabled) = 0;
- virtual void drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state = kStateEnabled, int alpha = 256, bool themeTrans = false) = 0;
- virtual void drawSlider(const Common::Rect &r, int width, kState state = kStateEnabled) = 0;
- virtual void drawCheckbox(const Common::Rect &r, const Common::String &str, bool checked, kState state = kStateEnabled) = 0;
- virtual void drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<Common::String> &tabs, int active, uint16 hints, kState state = kStateEnabled) = 0;
- virtual void drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, kScrollbarState, kState state = kStateEnabled) = 0;
- virtual void drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, kState state = kStateEnabled, kTextAlign align = kTextAlignLeft) = 0;
- virtual void drawCaret(const Common::Rect &r, bool erase, kState state = kStateEnabled) = 0;
- virtual void drawLineSeparator(const Common::Rect &r, kState state = kStateEnabled) = 0;
+ virtual void drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, State state = kStateEnabled) = 0;
+
+ virtual void drawWidgetBackground(const Common::Rect &r, uint16 hints, WidgetBackground background = kWidgetBackgroundPlain, State state = kStateEnabled) = 0;
+ virtual void drawButton(const Common::Rect &r, const Common::String &str, State state = kStateEnabled) = 0;
+ virtual void drawSurface(const Common::Rect &r, const Graphics::Surface &surface, State state = kStateEnabled, int alpha = 256, bool themeTrans = false) = 0;
+ virtual void drawSlider(const Common::Rect &r, int width, State state = kStateEnabled) = 0;
+ virtual void drawCheckbox(const Common::Rect &r, const Common::String &str, bool checked, State state = kStateEnabled) = 0;
+ virtual void drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<Common::String> &tabs, int active, uint16 hints, State state = kStateEnabled) = 0;
+ virtual void drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, ScrollbarState, State state = kStateEnabled) = 0;
+ virtual void drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, State state = kStateEnabled, TextAlign align = kTextAlignLeft) = 0;
+ virtual void drawCaret(const Common::Rect &r, bool erase, State state = kStateEnabled) = 0;
+ virtual void drawLineSeparator(const Common::Rect &r, State state = kStateEnabled) = 0;
virtual void restoreBackground(Common::Rect r, bool special = false) = 0;
virtual bool addDirtyRect(Common::Rect r, bool save = false, bool special = false) = 0;
- Graphics::TextAlignment convertAligment(kTextAlign align) const {
+ Graphics::TextAlignment convertAligment(TextAlign align) const {
switch (align) {
case kTextAlignLeft:
return Graphics::kTextAlignLeft;
@@ -170,7 +170,7 @@ public:
return Graphics::kTextAlignCenter;
};
- kTextAlign convertAligment(Graphics::TextAlignment align) const {
+ TextAlign convertAligment(Graphics::TextAlignment align) const {
switch (align) {
case Graphics::kTextAlignLeft:
return kTextAlignLeft;
@@ -233,25 +233,25 @@ public:
typedef Common::String String;
- const Graphics::Font *getFont(kFontStyle font) const { return _font; }
- int getFontHeight(kFontStyle font = kFontStyleBold) const { if (_initOk) return _font->getFontHeight(); return 0; }
- int getStringWidth(const String &str, kFontStyle font) const { if (_initOk) return _font->getStringWidth(str); return 0; }
- int getCharWidth(byte c, kFontStyle font) const { if (_initOk) return _font->getCharWidth(c); return 0; }
-
- void drawDialogBackground(const Common::Rect &r, uint16 hints, kState state);
- void drawText(const Common::Rect &r, const String &str, kState state, kTextAlign align, bool inverted, int deltax, bool useEllipsis, kFontStyle font);
- void drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, kState state);
-
- void drawWidgetBackground(const Common::Rect &r, uint16 hints, kWidgetBackground background, kState state);
- void drawButton(const Common::Rect &r, const String &str, kState state);
- void drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state, int alpha, bool themeTrans);
- void drawSlider(const Common::Rect &r, int width, kState state);
- void drawCheckbox(const Common::Rect &r, const String &str, bool checked, kState state);
- void drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<String> &tabs, int active, uint16 hints, kState state);
- void drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, kScrollbarState, kState state);
- void drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, kState state, kTextAlign align);
- void drawCaret(const Common::Rect &r, bool erase, kState state);
- void drawLineSeparator(const Common::Rect &r, kState state);
+ const Graphics::Font *getFont(FontStyle font) const { return _font; }
+ int getFontHeight(FontStyle font = kFontStyleBold) const { if (_initOk) return _font->getFontHeight(); return 0; }
+ int getStringWidth(const String &str, FontStyle font) const { if (_initOk) return _font->getStringWidth(str); return 0; }
+ int getCharWidth(byte c, FontStyle font) const { if (_initOk) return _font->getCharWidth(c); return 0; }
+
+ void drawDialogBackground(const Common::Rect &r, uint16 hints, State state);
+ void drawText(const Common::Rect &r, const String &str, State state, TextAlign align, bool inverted, int deltax, bool useEllipsis, FontStyle font);
+ void drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, State state);
+
+ void drawWidgetBackground(const Common::Rect &r, uint16 hints, WidgetBackground background, State state);
+ void drawButton(const Common::Rect &r, const String &str, State state);
+ void drawSurface(const Common::Rect &r, const Graphics::Surface &surface, State state, int alpha, bool themeTrans);
+ void drawSlider(const Common::Rect &r, int width, State state);
+ void drawCheckbox(const Common::Rect &r, const String &str, bool checked, State state);
+ void drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<String> &tabs, int active, uint16 hints, State state);
+ void drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, ScrollbarState, State state);
+ void drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, State state, TextAlign align);
+ void drawCaret(const Common::Rect &r, bool erase, State state);
+ void drawLineSeparator(const Common::Rect &r, State state);
void restoreBackground(Common::Rect r, bool special = false);
bool addDirtyRect(Common::Rect r, bool save = false, bool special = false);
@@ -259,7 +259,7 @@ private:
void box(int x, int y, int width, int height, OverlayColor colorA, OverlayColor colorB, bool skipLastRow = false);
void box(int x, int y, int width, int height);
- OverlayColor getColor(kState state);
+ OverlayColor getColor(State state);
OSystem *_system;
Graphics::Surface _screen;
@@ -310,25 +310,25 @@ public:
void setDrawArea(const Common::Rect &r);
void resetDrawArea();
- const Graphics::Font *getFont(kFontStyle font = kFontStyleBold) const { return _fonts[font]; }
- int getFontHeight(kFontStyle font = kFontStyleBold) const { if (_fonts[font]) return _fonts[font]->getFontHeight(); return 0; }
- int getStringWidth(const String &str, kFontStyle font = kFontStyleBold) const { if (_fonts[font]) return _fonts[font]->getStringWidth(str); return 0; }
- int getCharWidth(byte c, kFontStyle font = kFontStyleBold) const { if (_fonts[font]) return _fonts[font]->getCharWidth(c); return 0; }
-
- void drawDialogBackground(const Common::Rect &r, uint16 hints, kState state);
- void drawText(const Common::Rect &r, const String &str, kState state, kTextAlign align, bool inverted, int deltax, bool useEllipsis, kFontStyle font);
- void drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, kState state);
-
- void drawWidgetBackground(const Common::Rect &r, uint16 hints, kWidgetBackground background, kState state);
- void drawButton(const Common::Rect &r, const String &str, kState state);
- void drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state, int alpha, bool themeTrans);
- void drawSlider(const Common::Rect &r, int width, kState state);
- void drawCheckbox(const Common::Rect &r, const String &str, bool checked, kState state);
- void drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<String> &tabs, int active, uint16 hints, kState state);
- void drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, kScrollbarState, kState state);
- void drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, kState state, kTextAlign align);
- void drawCaret(const Common::Rect &r, bool erase, kState state);
- void drawLineSeparator(const Common::Rect &r, kState state);
+ const Graphics::Font *getFont(FontStyle font = kFontStyleBold) const { return _fonts[font]; }
+ int getFontHeight(FontStyle font = kFontStyleBold) const { if (_fonts[font]) return _fonts[font]->getFontHeight(); return 0; }
+ int getStringWidth(const String &str, FontStyle font = kFontStyleBold) const { if (_fonts[font]) return _fonts[font]->getStringWidth(str); return 0; }
+ int getCharWidth(byte c, FontStyle font = kFontStyleBold) const { if (_fonts[font]) return _fonts[font]->getCharWidth(c); return 0; }
+
+ void drawDialogBackground(const Common::Rect &r, uint16 hints, State state);
+ void drawText(const Common::Rect &r, const String &str, State state, TextAlign align, bool inverted, int deltax, bool useEllipsis, FontStyle font);
+ void drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, State state);
+
+ void drawWidgetBackground(const Common::Rect &r, uint16 hints, WidgetBackground background, State state);
+ void drawButton(const Common::Rect &r, const String &str, State state);
+ void drawSurface(const Common::Rect &r, const Graphics::Surface &surface, State state, int alpha, bool themeTrans);
+ void drawSlider(const Common::Rect &r, int width, State state);
+ void drawCheckbox(const Common::Rect &r, const String &str, bool checked, State state);
+ void drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<String> &tabs, int active, uint16 hints, State state);
+ void drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, ScrollbarState, State state);
+ void drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, State state, TextAlign align);
+ void drawCaret(const Common::Rect &r, bool erase, State state);
+ void drawLineSeparator(const Common::Rect &r, State state);
const Graphics::Surface *getImageSurface(int n) { return _images[n]; }
void restoreBackground(Common::Rect r, bool special = false);
@@ -377,7 +377,7 @@ private:
void resetupGuiRenderer();
void setupColors();
- OverlayColor getColor(kState state);
+ OverlayColor getColor(State state);
struct DialogState {
Graphics::Surface screen;
@@ -390,7 +390,7 @@ private:
const Graphics::Font *_fonts[kFontStyleMax];
private:
- void setupFont(const String &key, const String &name, kFontStyle style);
+ void setupFont(const String &key, const String &name, FontStyle style);
public:
enum kImageHandles {