[Scummvm-cvs-logs] SF.net SVN: scummvm: [23662] scummvm/trunk/gui
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Aug 4 15:56:12 CEST 2006
Revision: 23662
Author: fingolfin
Date: 2006-08-04 06:55:53 -0700 (Fri, 04 Aug 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=23662&view=rev
Log Message:
-----------
Renamed handleScreenChanged() -> reflowLayout() in the GUI code
Modified Paths:
--------------
scummvm/trunk/engines/scumm/dialogs.cpp
scummvm/trunk/engines/scumm/dialogs.h
scummvm/trunk/gui/EditTextWidget.cpp
scummvm/trunk/gui/EditTextWidget.h
scummvm/trunk/gui/ListWidget.cpp
scummvm/trunk/gui/ListWidget.h
scummvm/trunk/gui/PopUpWidget.cpp
scummvm/trunk/gui/PopUpWidget.h
scummvm/trunk/gui/TabWidget.cpp
scummvm/trunk/gui/TabWidget.h
scummvm/trunk/gui/about.cpp
scummvm/trunk/gui/about.h
scummvm/trunk/gui/console.cpp
scummvm/trunk/gui/console.h
scummvm/trunk/gui/dialog.cpp
scummvm/trunk/gui/dialog.h
scummvm/trunk/gui/launcher.cpp
scummvm/trunk/gui/launcher.h
scummvm/trunk/gui/newgui.cpp
scummvm/trunk/gui/object.h
scummvm/trunk/gui/options.cpp
scummvm/trunk/gui/options.h
scummvm/trunk/gui/widget.h
Modified: scummvm/trunk/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.cpp 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/engines/scumm/dialogs.cpp 2006-08-04 13:55:53 UTC (rev 23662)
@@ -262,7 +262,7 @@
_chooseButton = new GUI::ButtonWidget(this, "scummsaveload_choose", buttonLabel, kChooseCmd, 0);
_chooseButton->setEnabled(false);
- handleScreenChanged();
+ reflowLayout();
}
SaveLoadChooser::~SaveLoadChooser() {
@@ -322,7 +322,7 @@
}
}
-void SaveLoadChooser::handleScreenChanged() {
+void SaveLoadChooser::reflowLayout() {
if (g_gui.evaluator()->getVar("scummsaveload_extinfo.visible") == 1) {
int thumbX = g_gui.evaluator()->getVar("scummsaveload_thumbnail.x");
int thumbY = g_gui.evaluator()->getVar("scummsaveload_thumbnail.y");
@@ -365,7 +365,7 @@
_playtime->setFlags(GUI::WIDGET_INVISIBLE);
}
- Dialog::handleScreenChanged();
+ Dialog::reflowLayout();
}
void SaveLoadChooser::updateInfos() {
@@ -512,17 +512,17 @@
}
}
-void MainMenuDialog::handleScreenChanged() {
- ScummDialog::handleScreenChanged();
+void MainMenuDialog::reflowLayout() {
+ ScummDialog::reflowLayout();
- _optionsDialog->handleScreenChanged();
- _aboutDialog->handleScreenChanged();
+ _optionsDialog->reflowLayout();
+ _aboutDialog->reflowLayout();
- _saveDialog->handleScreenChanged();
- _loadDialog->handleScreenChanged();
+ _saveDialog->reflowLayout();
+ _loadDialog->reflowLayout();
#ifndef DISABLE_HELP
- _helpDialog->handleScreenChanged();
+ _helpDialog->reflowLayout();
#endif
}
@@ -556,7 +556,7 @@
}
void MainMenuDialog::open() {
- handleScreenChanged();
+ reflowLayout();
Dialog::open();
}
@@ -686,8 +686,8 @@
}
-void HelpDialog::handleScreenChanged() {
- ScummDialog::handleScreenChanged();
+void HelpDialog::reflowLayout() {
+ ScummDialog::reflowLayout();
_drawingHints &= ~GUI::THEME_HINT_SPECIAL_COLOR;
@@ -781,10 +781,10 @@
// Width and height are dummy
_text = new StaticTextWidget(this, 4, 4, 10, 10, _message, kTextAlignCenter);
- handleScreenChanged();
+ reflowLayout();
}
-void InfoDialog::handleScreenChanged() {
+void InfoDialog::reflowLayout() {
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
Modified: scummvm/trunk/engines/scumm/dialogs.h
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.h 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/engines/scumm/dialogs.h 2006-08-04 13:55:53 UTC (rev 23662)
@@ -76,7 +76,7 @@
void setList(const StringList& list);
int runModal();
- void handleScreenChanged();
+ void reflowLayout();
};
@@ -85,7 +85,7 @@
MainMenuDialog(ScummEngine *scumm);
~MainMenuDialog();
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
protected:
ScummEngine *_vm;
@@ -110,7 +110,7 @@
HelpDialog(const GameSettings &game);
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
protected:
typedef Common::String String;
@@ -174,7 +174,7 @@
close();
}
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
protected:
void setInfoText (const String& message);
Modified: scummvm/trunk/gui/EditTextWidget.cpp
===================================================================
--- scummvm/trunk/gui/EditTextWidget.cpp 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/EditTextWidget.cpp 2006-08-04 13:55:53 UTC (rev 23662)
@@ -32,7 +32,7 @@
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE;
_type = kEditTextWidget;
- handleScreenChanged();
+ reflowLayout();
setEditString(text);
}
@@ -42,7 +42,7 @@
_type = kEditTextWidget;
_hints |= THEME_HINT_USE_SHADOW;
- handleScreenChanged();
+ reflowLayout();
setEditString(text);
}
@@ -51,8 +51,8 @@
_backupString = str;
}
-void EditTextWidget::handleScreenChanged() {
- EditableWidget::handleScreenChanged();
+void EditTextWidget::reflowLayout() {
+ EditableWidget::reflowLayout();
_leftPadding = g_gui.evaluator()->getVar("EditTextWidget.leftPadding", 0);
_rightPadding = g_gui.evaluator()->getVar("EditTextWidget.rightPadding", 0);
Modified: scummvm/trunk/gui/EditTextWidget.h
===================================================================
--- scummvm/trunk/gui/EditTextWidget.h 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/EditTextWidget.h 2006-08-04 13:55:53 UTC (rev 23662)
@@ -47,7 +47,7 @@
virtual bool wantsFocus() { return true; }
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
protected:
void drawWidget(bool hilite);
Modified: scummvm/trunk/gui/ListWidget.cpp
===================================================================
--- scummvm/trunk/gui/ListWidget.cpp 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/ListWidget.cpp 2006-08-04 13:55:53 UTC (rev 23662)
@@ -446,8 +446,8 @@
g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
}
-void ListWidget::handleScreenChanged() {
- Widget::handleScreenChanged();
+void ListWidget::reflowLayout() {
+ Widget::reflowLayout();
_leftPadding = g_gui.evaluator()->getVar("ListWidget.leftPadding", 0);
_rightPadding = g_gui.evaluator()->getVar("ListWidget.rightPadding", 0);
Modified: scummvm/trunk/gui/ListWidget.h
===================================================================
--- scummvm/trunk/gui/ListWidget.h 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/ListWidget.h 2006-08-04 13:55:53 UTC (rev 23662)
@@ -93,7 +93,7 @@
virtual bool handleKeyUp(uint16 ascii, int keycode, int modifiers);
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
virtual bool wantsFocus() { return true; }
Modified: scummvm/trunk/gui/PopUpWidget.cpp
===================================================================
--- scummvm/trunk/gui/PopUpWidget.cpp 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/PopUpWidget.cpp 2006-08-04 13:55:53 UTC (rev 23662)
@@ -344,7 +344,7 @@
PopUpWidget::PopUpWidget(GuiObject *boss, const String &name, const String &label, uint labelWidth)
: Widget(boss, name), CommandSender(boss), _label(label), _labelWidth(labelWidth) {
- handleScreenChanged();
+ reflowLayout();
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS;
setHints(THEME_HINT_SAVE_BACKGROUND);
@@ -369,12 +369,12 @@
}
}
-void PopUpWidget::handleScreenChanged() {
+void PopUpWidget::reflowLayout() {
_leftPadding = g_gui.evaluator()->getVar("PopUpWidget.leftPadding", 0);
_rightPadding = g_gui.evaluator()->getVar("PopUpWidget.rightPadding", 0);
_labelSpacing = g_gui.evaluator()->getVar("PopUpWidget.labelSpacing", 0);
- Widget::handleScreenChanged();
+ Widget::reflowLayout();
}
void PopUpWidget::appendEntry(const String &entry, uint32 tag) {
Modified: scummvm/trunk/gui/PopUpWidget.h
===================================================================
--- scummvm/trunk/gui/PopUpWidget.h 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/PopUpWidget.h 2006-08-04 13:55:53 UTC (rev 23662)
@@ -82,7 +82,7 @@
void handleMouseEntered(int button) { setFlags(WIDGET_HILITED); draw(); }
void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED); draw(); }
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
protected:
void drawWidget(bool hilite);
};
Modified: scummvm/trunk/gui/TabWidget.cpp
===================================================================
--- scummvm/trunk/gui/TabWidget.cpp 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/TabWidget.cpp 2006-08-04 13:55:53 UTC (rev 23662)
@@ -169,13 +169,13 @@
return Widget::handleKeyDown(ascii, keycode, modifiers);
}
-void TabWidget::handleScreenChanged() {
- Widget::handleScreenChanged();
+void TabWidget::reflowLayout() {
+ Widget::reflowLayout();
for (uint i = 0; i < _tabs.size(); ++i) {
Widget *w = _tabs[i].firstWidget;
while (w) {
- w->handleScreenChanged();
+ w->reflowLayout();
w = w->next();
}
}
Modified: scummvm/trunk/gui/TabWidget.h
===================================================================
--- scummvm/trunk/gui/TabWidget.h 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/TabWidget.h 2006-08-04 13:55:53 UTC (rev 23662)
@@ -80,7 +80,7 @@
virtual bool handleKeyDown(uint16 ascii, int keycode, int modifiers);
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
virtual void draw();
Modified: scummvm/trunk/gui/about.cpp
===================================================================
--- scummvm/trunk/gui/about.cpp 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/about.cpp 2006-08-04 13:55:53 UTC (rev 23662)
@@ -308,8 +308,8 @@
close();
}
-void AboutDialog::handleScreenChanged() {
- Dialog::handleScreenChanged();
+void AboutDialog::reflowLayout() {
+ Dialog::reflowLayout();
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
Modified: scummvm/trunk/gui/about.h
===================================================================
--- scummvm/trunk/gui/about.h 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/about.h 2006-08-04 13:55:53 UTC (rev 23662)
@@ -53,7 +53,7 @@
void handleKeyDown(uint16 ascii, int keycode, int modifiers);
void handleKeyUp(uint16 ascii, int keycode, int modifiers);
- void handleScreenChanged();
+ void reflowLayout();
};
} // End of namespace GUI
Modified: scummvm/trunk/gui/console.cpp
===================================================================
--- scummvm/trunk/gui/console.cpp 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/console.cpp 2006-08-04 13:55:53 UTC (rev 23662)
@@ -162,7 +162,7 @@
// the console, or even outright crashes. This means _scrollLine is not
// preserved, but that's a tiny sacrifice.
- handleScreenChanged();
+ reflowLayout();
Dialog::open();
if (_promptStartPos == -1) {
@@ -214,7 +214,7 @@
}
}
-void ConsoleDialog::handleScreenChanged() {
+void ConsoleDialog::reflowLayout() {
init();
_scrollLine = _promptEndPos / kLineWidth;
@@ -222,7 +222,7 @@
_scrollLine = _linesPerPage - 1;
updateScrollBuffer();
- Dialog::handleScreenChanged();
+ Dialog::reflowLayout();
draw();
}
Modified: scummvm/trunk/gui/console.h
===================================================================
--- scummvm/trunk/gui/console.h 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/console.h 2006-08-04 13:55:53 UTC (rev 23662)
@@ -105,7 +105,7 @@
void drawDialog();
void handleTickle();
- void handleScreenChanged();
+ void reflowLayout();
void handleMouseWheel(int x, int y, int direction);
void handleKeyDown(uint16 ascii, int keycode, int modifiers);
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
Modified: scummvm/trunk/gui/dialog.cpp
===================================================================
--- scummvm/trunk/gui/dialog.cpp 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/dialog.cpp 2006-08-04 13:55:53 UTC (rev 23662)
@@ -98,7 +98,7 @@
releaseFocus();
}
-void Dialog::handleScreenChanged() {
+void Dialog::reflowLayout() {
// The screen has changed. That means the screen visual may also have
// changed, so any cached image may be invalid. The subsequent redraw
// should be treated as the very first draw.
@@ -106,12 +106,12 @@
_drawingHints |= THEME_HINT_FIRST_DRAW;
Widget *w = _firstWidget;
while (w) {
- w->handleScreenChanged();
+ w->reflowLayout();
w->setHints(THEME_HINT_FIRST_DRAW);
w = w->_next;
}
- GuiObject::handleScreenChanged();
+ GuiObject::reflowLayout();
}
void Dialog::releaseFocus() {
Modified: scummvm/trunk/gui/dialog.h
===================================================================
--- scummvm/trunk/gui/dialog.h 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/dialog.h 2006-08-04 13:55:53 UTC (rev 23662)
@@ -62,7 +62,7 @@
void releaseFocus();
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
protected:
virtual void open();
Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/launcher.cpp 2006-08-04 13:55:53 UTC (rev 23662)
@@ -116,7 +116,7 @@
public:
EditGameDialog(const String &domain, const String &desc);
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
void open();
void close();
@@ -267,8 +267,8 @@
new ButtonWidget(this, "gameoptions_ok", "OK", kOKCmd, 0);
}
-void EditGameDialog::handleScreenChanged() {
- OptionsDialog::handleScreenChanged();
+void EditGameDialog::reflowLayout() {
+ OptionsDialog::reflowLayout();
int labelWidth = g_gui.evaluator()->getVar("gameOptionsLabelWidth");
@@ -805,7 +805,7 @@
}
}
-void LauncherDialog::handleScreenChanged() {
+void LauncherDialog::reflowLayout() {
#ifndef DISABLE_FANCY_THEMES
if (g_gui.evaluator()->getVar("launcher_logo.visible") == 1) {
StaticTextWidget *ver = (StaticTextWidget*)findWidget("launcher_version");
@@ -839,7 +839,7 @@
_w = g_system->getOverlayWidth();
_h = g_system->getOverlayHeight();
- Dialog::handleScreenChanged();
+ Dialog::reflowLayout();
}
} // End of namespace GUI
Modified: scummvm/trunk/gui/launcher.h
===================================================================
--- scummvm/trunk/gui/launcher.h 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/launcher.h 2006-08-04 13:55:53 UTC (rev 23662)
@@ -51,7 +51,7 @@
StringList _domains;
BrowserDialog *_browser;
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
void updateListing();
void updateButtons();
Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/newgui.cpp 2006-08-04 13:55:53 UTC (rev 23662)
@@ -56,10 +56,10 @@
// HACK. FIXME. This doesn't belong here. But otherwise it creates compilation problems
GuiObject::GuiObject(const Common::String &name) : _firstWidget(0) {
_name = name;
- handleScreenChanged();
+ reflowLayout();
}
-void GuiObject::handleScreenChanged() {
+void GuiObject::reflowLayout() {
if (!_name.empty()) {
if ((_x = g_gui.evaluator()->getVar(_name + ".x")) == EVAL_UNDEF_VAR)
error("Undefined variable %s.x", _name.c_str());
@@ -262,7 +262,7 @@
_theme->refresh();
// refresh all dialogs
for (int i = 0; i < _dialogStack.size(); ++i) {
- _dialogStack[i]->handleScreenChanged();
+ _dialogStack[i]->reflowLayout();
}
// We need to redraw immediately. Otherwise
// some other event may cause a widget to be
Modified: scummvm/trunk/gui/object.h
===================================================================
--- scummvm/trunk/gui/object.h 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/object.h 2006-08-04 13:55:53 UTC (rev 23662)
@@ -78,7 +78,7 @@
virtual void draw() = 0;
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
protected:
virtual void releaseFocus() = 0;
Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/options.cpp 2006-08-04 13:55:53 UTC (rev 23662)
@@ -606,8 +606,8 @@
return 2;
}
-void OptionsDialog::handleScreenChanged() {
- Dialog::handleScreenChanged();
+void OptionsDialog::reflowLayout() {
+ Dialog::reflowLayout();
int labelWidth = g_gui.evaluator()->getVar("tabPopupsLabelW");
Modified: scummvm/trunk/gui/options.h
===================================================================
--- scummvm/trunk/gui/options.h 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/options.h 2006-08-04 13:55:53 UTC (rev 23662)
@@ -49,7 +49,7 @@
void close();
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
- virtual void handleScreenChanged();
+ virtual void reflowLayout();
enum {
kOKCmd = 'ok '
Modified: scummvm/trunk/gui/widget.h
===================================================================
--- scummvm/trunk/gui/widget.h 2006-08-04 13:10:28 UTC (rev 23661)
+++ scummvm/trunk/gui/widget.h 2006-08-04 13:55:53 UTC (rev 23662)
@@ -128,7 +128,7 @@
virtual bool handleKeyUp(uint16 ascii, int keycode, int modifiers) { return false; } // Return true if the event was handled
virtual void handleTickle() {}
- virtual void handleScreenChanged() { GuiObject::handleScreenChanged(); }
+ virtual void reflowLayout() { GuiObject::reflowLayout(); }
void draw();
void receivedFocus() { _hasFocus = true; receivedFocusWidget(); }
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