[Scummvm-cvs-logs] SF.net SVN: scummvm: [22798] scummvm/trunk/gui
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Wed May 31 05:10:03 CEST 2006
Revision: 22798
Author: eriktorbjorn
Date: 2006-05-31 05:09:00 -0700 (Wed, 31 May 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22798&view=rev
Log Message:
-----------
Cleanup. We no longer need these widget size parameters.
Modified Paths:
--------------
scummvm/trunk/gui/EditTextWidget.cpp
scummvm/trunk/gui/EditTextWidget.h
scummvm/trunk/gui/ListWidget.cpp
scummvm/trunk/gui/PopUpWidget.cpp
scummvm/trunk/gui/PopUpWidget.h
scummvm/trunk/gui/TabWidget.cpp
scummvm/trunk/gui/TabWidget.h
scummvm/trunk/gui/editable.cpp
scummvm/trunk/gui/editable.h
scummvm/trunk/gui/widget.cpp
scummvm/trunk/gui/widget.h
Modified: scummvm/trunk/gui/EditTextWidget.cpp
===================================================================
--- scummvm/trunk/gui/EditTextWidget.cpp 2006-05-31 11:36:20 UTC (rev 22797)
+++ scummvm/trunk/gui/EditTextWidget.cpp 2006-05-31 12:09:00 UTC (rev 22798)
@@ -27,8 +27,8 @@
namespace GUI {
-EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, WidgetSize ws)
- : EditableWidget(boss, x, y - 1, w, h + 2, ws) {
+EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text)
+ : EditableWidget(boss, x, y - 1, w, h + 2) {
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE;
_type = kEditTextWidget;
Modified: scummvm/trunk/gui/EditTextWidget.h
===================================================================
--- scummvm/trunk/gui/EditTextWidget.h 2006-05-31 11:36:20 UTC (rev 22797)
+++ scummvm/trunk/gui/EditTextWidget.h 2006-05-31 12:09:00 UTC (rev 22798)
@@ -38,7 +38,7 @@
int _rightPadding;
public:
- EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, WidgetSize ws = kNormalWidgetSize);
+ EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text);
EditTextWidget(GuiObject *boss, String name, const String &text);
void setEditString(const String &str);
Modified: scummvm/trunk/gui/ListWidget.cpp
===================================================================
--- scummvm/trunk/gui/ListWidget.cpp 2006-05-31 11:36:20 UTC (rev 22797)
+++ scummvm/trunk/gui/ListWidget.cpp 2006-05-31 12:09:00 UTC (rev 22798)
@@ -32,8 +32,6 @@
ListWidget::ListWidget(GuiObject *boss, String name)
: EditableWidget(boss, name), CommandSender(boss) {
- WidgetSize ws = g_gui.getWidgetSize();
-
_leftPadding = g_gui.evaluator()->getVar("ListWidget.leftPadding", 0);
_rightPadding = g_gui.evaluator()->getVar("ListWidget.rightPadding", 0);
_topPadding = g_gui.evaluator()->getVar("ListWidget.topPadding", 0);
@@ -41,7 +39,7 @@
_hlLeftPadding = g_gui.evaluator()->getVar("ListWidget.hlLeftPadding", 0);
_hlRightPadding = g_gui.evaluator()->getVar("ListWidget.hlRightPadding", 0);
- if (ws == kBigWidgetSize) {
+ if (g_gui.getWidgetSize() == kBigWidgetSize) {
_scrollBarWidth = kBigScrollBarWidth;
} else {
_scrollBarWidth = kNormalScrollBarWidth;
Modified: scummvm/trunk/gui/PopUpWidget.cpp
===================================================================
--- scummvm/trunk/gui/PopUpWidget.cpp 2006-05-31 11:36:20 UTC (rev 22797)
+++ scummvm/trunk/gui/PopUpWidget.cpp 2006-05-31 12:09:00 UTC (rev 22798)
@@ -47,7 +47,7 @@
int _rightPadding;
public:
- PopUpDialog(PopUpWidget *boss, int clickX, int clickY, WidgetSize ws = kDefaultWidgetSize);
+ PopUpDialog(PopUpWidget *boss, int clickX, int clickY);
void drawDialog();
@@ -67,7 +67,7 @@
void moveDown();
};
-PopUpDialog::PopUpDialog(PopUpWidget *boss, int clickX, int clickY, WidgetSize ws)
+PopUpDialog::PopUpDialog(PopUpWidget *boss, int clickX, int clickY)
: Dialog(0, 0, 16, 16, false),
_popUpBoss(boss) {
@@ -359,7 +359,7 @@
void PopUpWidget::handleMouseDown(int x, int y, int button, int clickCount) {
if (isEnabled()) {
- PopUpDialog popupDialog(this, x + getAbsX(), y + getAbsY(), _ws);
+ PopUpDialog popupDialog(this, x + getAbsX(), y + getAbsY());
int newSel = popupDialog.runModal();
if (newSel != -1 && _selectedItem != newSel) {
_selectedItem = newSel;
@@ -370,8 +370,6 @@
}
void PopUpWidget::handleScreenChanged() {
- _ws = g_gui.getWidgetSize();
-
_leftPadding = g_gui.evaluator()->getVar("PopUpWidget.leftPadding", 0);
_rightPadding = g_gui.evaluator()->getVar("PopUpWidget.rightPadding", 0);
_labelSpacing = g_gui.evaluator()->getVar("PopUpWidget.labelSpacing", 0);
Modified: scummvm/trunk/gui/PopUpWidget.h
===================================================================
--- scummvm/trunk/gui/PopUpWidget.h 2006-05-31 11:36:20 UTC (rev 22797)
+++ scummvm/trunk/gui/PopUpWidget.h 2006-05-31 12:09:00 UTC (rev 22798)
@@ -49,7 +49,6 @@
};
typedef Common::Array<Entry> EntryList;
protected:
- WidgetSize _ws;
EntryList _entries;
int _selectedItem;
Modified: scummvm/trunk/gui/TabWidget.cpp
===================================================================
--- scummvm/trunk/gui/TabWidget.cpp 2006-05-31 11:36:20 UTC (rev 22797)
+++ scummvm/trunk/gui/TabWidget.cpp 2006-05-31 12:09:00 UTC (rev 22798)
@@ -36,14 +36,13 @@
kTabPadding = 3
};
-TabWidget::TabWidget(GuiObject *boss, int x, int y, int w, int h, WidgetSize ws)
- : Widget(boss, x, y, w, h), _ws(ws) {
+TabWidget::TabWidget(GuiObject *boss, int x, int y, int w, int h)
+ : Widget(boss, x, y, w, h) {
init();
}
TabWidget::TabWidget(GuiObject *boss, String name)
: Widget(boss, name) {
- _ws = g_gui.getWidgetSize();
init();
}
@@ -54,7 +53,7 @@
_tabWidth = 40;
- if (_ws == kBigWidgetSize) {
+ if (g_gui.getWidgetSize() == kBigWidgetSize) {
_tabHeight = kBigTabHeight;
} else {
_tabHeight = kTabHeight;
@@ -145,13 +144,12 @@
w = w->next();
}
}
- Widget::handleScreenChanged();
- _ws = g_gui.getWidgetSize();
- if (_ws == kBigWidgetSize) {
+ if (g_gui.getWidgetSize() == kBigWidgetSize) {
_tabHeight = kBigTabHeight;
} else {
_tabHeight = kTabHeight;
}
+ Widget::handleScreenChanged();
}
void TabWidget::drawWidget(bool hilite) {
Modified: scummvm/trunk/gui/TabWidget.h
===================================================================
--- scummvm/trunk/gui/TabWidget.h 2006-05-31 11:36:20 UTC (rev 22797)
+++ scummvm/trunk/gui/TabWidget.h 2006-05-31 12:09:00 UTC (rev 22798)
@@ -40,10 +40,9 @@
TabList _tabs;
int _tabWidth;
int _tabHeight;
- WidgetSize _ws;
public:
- TabWidget(GuiObject *boss, int x, int y, int w, int h, WidgetSize ws = kDefaultWidgetSize);
+ TabWidget(GuiObject *boss, int x, int y, int w, int h);
TabWidget(GuiObject *boss, String name);
~TabWidget();
Modified: scummvm/trunk/gui/editable.cpp
===================================================================
--- scummvm/trunk/gui/editable.cpp 2006-05-31 11:36:20 UTC (rev 22797)
+++ scummvm/trunk/gui/editable.cpp 2006-05-31 12:09:00 UTC (rev 22798)
@@ -25,7 +25,7 @@
namespace GUI {
-EditableWidget::EditableWidget(GuiObject *boss, int x, int y, int w, int h, WidgetSize ws)
+EditableWidget::EditableWidget(GuiObject *boss, int x, int y, int w, int h)
: Widget(boss, x, y, w, h) {
init();
}
Modified: scummvm/trunk/gui/editable.h
===================================================================
--- scummvm/trunk/gui/editable.h 2006-05-31 11:36:20 UTC (rev 22797)
+++ scummvm/trunk/gui/editable.h 2006-05-31 12:09:00 UTC (rev 22798)
@@ -50,7 +50,7 @@
Theme::kFontStyle _font;
public:
- EditableWidget(GuiObject *boss, int x, int y, int w, int h, WidgetSize ws = kNormalWidgetSize);
+ EditableWidget(GuiObject *boss, int x, int y, int w, int h);
EditableWidget(GuiObject *boss, String name);
virtual ~EditableWidget();
Modified: scummvm/trunk/gui/widget.cpp
===================================================================
--- scummvm/trunk/gui/widget.cpp 2006-05-31 11:36:20 UTC (rev 22797)
+++ scummvm/trunk/gui/widget.cpp 2006-05-31 12:09:00 UTC (rev 22798)
@@ -143,7 +143,6 @@
StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, TextAlignment align)
: Widget(boss, x, y, w, h), _align(align) {
- _ws = g_gui.getWidgetSize();
_flags = WIDGET_ENABLED;
_type = kStaticTextWidget;
_label = text;
@@ -151,7 +150,6 @@
StaticTextWidget::StaticTextWidget(GuiObject *boss, String name, const String &text)
: Widget(boss, name) {
- _ws = g_gui.getWidgetSize();
_flags = WIDGET_ENABLED;
_type = kStaticTextWidget;
_label = text;
@@ -190,11 +188,6 @@
g_gui.theme()->convertAligment(_align));
}
-void StaticTextWidget::handleScreenChanged() {
- Widget::handleScreenChanged();
- _ws = g_gui.getWidgetSize();
-}
-
#pragma mark -
ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const String &label, uint32 cmd, uint8 hotkey, WidgetSize ws)
Modified: scummvm/trunk/gui/widget.h
===================================================================
--- scummvm/trunk/gui/widget.h 2006-05-31 11:36:20 UTC (rev 22797)
+++ scummvm/trunk/gui/widget.h 2006-05-31 12:09:00 UTC (rev 22798)
@@ -169,7 +169,6 @@
String _label;
TextAlignment _align;
- WidgetSize _ws;
public:
StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, TextAlignment align);
StaticTextWidget(GuiObject *boss, String name, const String &text);
@@ -179,8 +178,6 @@
void setAlign(TextAlignment align);
TextAlignment getAlign() const { return _align; }
- virtual void handleScreenChanged();
-
protected:
void drawWidget(bool hilite);
};
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