[Scummvm-cvs-logs] SF.net SVN: scummvm: [22928] scummvm/trunk/gui

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Jun 5 14:23:05 CEST 2006


Revision: 22928
Author:   fingolfin
Date:     2006-06-05 05:22:51 -0700 (Mon, 05 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22928&view=rev

Log Message:
-----------
Fix various typenames to comply to the ScummVM coding guidelines

Modified Paths:
--------------
    scummvm/trunk/gui/EditTextWidget.cpp
    scummvm/trunk/gui/ScrollBarWidget.cpp
    scummvm/trunk/gui/ThemeClassic.cpp
    scummvm/trunk/gui/ThemeNew.cpp
    scummvm/trunk/gui/about.cpp
    scummvm/trunk/gui/console.cpp
    scummvm/trunk/gui/editable.h
    scummvm/trunk/gui/newgui.h
    scummvm/trunk/gui/theme.h
Modified: scummvm/trunk/gui/EditTextWidget.cpp
===================================================================
--- scummvm/trunk/gui/EditTextWidget.cpp	2006-06-05 09:30:05 UTC (rev 22927)
+++ scummvm/trunk/gui/EditTextWidget.cpp	2006-06-05 12:22:51 UTC (rev 22928)
@@ -56,7 +56,7 @@
 	_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);
 }
 
 

Modified: scummvm/trunk/gui/ScrollBarWidget.cpp
===================================================================
--- scummvm/trunk/gui/ScrollBarWidget.cpp	2006-06-05 09:30:05 UTC (rev 22927)
+++ scummvm/trunk/gui/ScrollBarWidget.cpp	2006-06-05 12:22:51 UTC (rev 22928)
@@ -185,7 +185,7 @@
 	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) {

Modified: scummvm/trunk/gui/ThemeClassic.cpp
===================================================================
--- scummvm/trunk/gui/ThemeClassic.cpp	2006-06-05 09:30:05 UTC (rev 22927)
+++ scummvm/trunk/gui/ThemeClassic.cpp	2006-06-05 12:22:51 UTC (rev 22928)
@@ -138,7 +138,7 @@
 	}
 }
 
-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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	_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:

Modified: scummvm/trunk/gui/ThemeNew.cpp
===================================================================
--- scummvm/trunk/gui/ThemeNew.cpp	2006-06-05 09:30:05 UTC (rev 22927)
+++ scummvm/trunk/gui/ThemeNew.cpp	2006-06-05 12:22:51 UTC (rev 22928)
@@ -455,7 +455,7 @@
 
 #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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 #undef NO_EFFECT
 }
 
-OverlayColor ThemeNew::getColor(kState state) {
+OverlayColor ThemeNew::getColor(State state) {
 	switch (state) {
 	case kStateDisabled:
 		return _colors[kColorStateDisabled];
@@ -1407,7 +1407,7 @@
 #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);
 

Modified: scummvm/trunk/gui/about.cpp
===================================================================
--- scummvm/trunk/gui/about.cpp	2006-06-05 09:30:05 UTC (rev 22927)
+++ scummvm/trunk/gui/about.cpp	2006-06-05 12:22:51 UTC (rev 22928)
@@ -200,8 +200,8 @@
 
 	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':

Modified: scummvm/trunk/gui/console.cpp
===================================================================
--- scummvm/trunk/gui/console.cpp	2006-06-05 09:30:05 UTC (rev 22927)
+++ scummvm/trunk/gui/console.cpp	2006-06-05 12:22:51 UTC (rev 22928)
@@ -99,7 +99,7 @@
 	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);

Modified: scummvm/trunk/gui/editable.h
===================================================================
--- scummvm/trunk/gui/editable.h	2006-06-05 09:30:05 UTC (rev 22927)
+++ scummvm/trunk/gui/editable.h	2006-06-05 12:22:51 UTC (rev 22928)
@@ -47,7 +47,7 @@
 
 	int			_editScrollOffset;
 
-	Theme::kFontStyle  _font;
+	Theme::FontStyle  _font;
 
 public:
 	EditableWidget(GuiObject *boss, int x, int y, int w, int h);
@@ -74,7 +74,7 @@
 	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);
 };

Modified: scummvm/trunk/gui/newgui.h
===================================================================
--- scummvm/trunk/gui/newgui.h	2006-06-05 09:30:05 UTC (rev 22927)
+++ scummvm/trunk/gui/newgui.h	2006-06-05 12:22:51 UTC (rev 22928)
@@ -73,10 +73,10 @@
 	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();
 

Modified: scummvm/trunk/gui/theme.h
===================================================================
--- scummvm/trunk/gui/theme.h	2006-06-05 09:30:05 UTC (rev 22927)
+++ scummvm/trunk/gui/theme.h	2006-06-05 12:22:51 UTC (rev 22928)
@@ -70,13 +70,13 @@
 		
 	virtual ~Theme();
 
-	enum kTextAlign {
+	enum TextAlign {
 		kTextAlignLeft,
 		kTextAlignCenter,
 		kTextAlignRight
 	};
 
-	enum kWidgetBackground {
+	enum WidgetBackground {
 		kWidgetBackgroundNo,
 		kWidgetBackgroundPlain,
 		kWidgetBackgroundBorder,
@@ -84,13 +84,13 @@
 		kWidgetBackgroundEditText
 	};
 
-	enum kState {
+	enum State {
 		kStateDisabled,
 		kStateEnabled,
 		kStateHighlight
 	};
 
-	enum kScrollbarState {
+	enum ScrollbarState {
 		kScrollbarStateNo,
 		kScrollbarStateUp,
 		kScrollbarStateDown,
@@ -98,7 +98,7 @@
 		kScrollbarStateSinglePage
 	};
 
-	enum kFontStyle {
+	enum FontStyle {
 		kFontStyleBold = 0,	// standard font
 		kFontStyleNormal = 1,
 		kFontStyleItalic = 2,
@@ -130,31 +130,31 @@
 	
 	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 drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, State 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 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 @@
 		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 @@
 
 	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; }
+	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, 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 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, 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);
+	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 @@
 	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 @@
 	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; }
+	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, 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 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, 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);
+	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 @@
 	void resetupGuiRenderer();
 	void setupColors();
 
-	OverlayColor getColor(kState state);
+	OverlayColor getColor(State state);
 
 	struct DialogState {
 		Graphics::Surface screen;
@@ -390,7 +390,7 @@
 	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 {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list