[Scummvm-cvs-logs] CVS: scummvm/backends/wince/CEgui CEGUI.h,1.1,1.2 GUIElement.cpp,1.1,1.2 GUIElement.h,1.1,1.2 ItemAction.cpp,1.1,1.2 ItemAction.h,1.1,1.2 ItemSendKey.cpp,1.1,1.2 ItemSendKey.h,1.1,1.2 ItemSwitch.cpp,1.1,1.2 ItemSwitch.h,1.1,1.2 Panel.cpp,1.1,1.2 Panel.h,1.1,1.2 PanelItem.cpp,1.1,1.2 PanelItem.h,1.1,1.2 PanelKeyboard.cpp,1.1,1.2 PanelKeyboard.h,1.1,1.2 SDL_ImageResource.cpp,1.1,1.2 SDL_ImageResource.h,1.1,1.2 Toolbar.cpp,1.1,1.2 Toolbar.h,1.1,1.2 ToolbarHandler.cpp,1.1,1.2 ToolbarHandler.h,1.1,1.2
Nicolas Bacca
arisme at users.sourceforge.net
Mon Jan 26 18:18:08 CET 2004
Update of /cvsroot/scummvm/scummvm/backends/wince/CEgui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15298
Modified Files:
CEGUI.h GUIElement.cpp GUIElement.h ItemAction.cpp
ItemAction.h ItemSendKey.cpp ItemSendKey.h ItemSwitch.cpp
ItemSwitch.h Panel.cpp Panel.h PanelItem.cpp PanelItem.h
PanelKeyboard.cpp PanelKeyboard.h SDL_ImageResource.cpp
SDL_ImageResource.h Toolbar.cpp Toolbar.h ToolbarHandler.cpp
ToolbarHandler.h
Log Message:
Oops, forgot to undos before commiting (no I'm not trying to boost the stats :p)
Index: CEGUI.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/CEGUI.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CEGUI.h 26 Jan 2004 08:10:06 -0000 1.1
+++ CEGUI.h 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,27 +1,27 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
#include "ToolbarHandler.h"
#include "Panel.h"
-#include "ItemSendKey.h"
+#include "ItemSendKey.h"
#include "ItemSwitch.h"
#include "PanelKeyboard.h"
Index: GUIElement.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/GUIElement.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- GUIElement.cpp 26 Jan 2004 08:10:06 -0000 1.1
+++ GUIElement.cpp 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,124 +1,124 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "stdafx.h"
-#include "Toolbar.h"
-
-#include "SDL_ImageResource.h"
-
-namespace CEGUI {
-
- GUIElement::GUIElement(int x, int y, int width, int height) :
- _background(0), _drawn(false), _visible(true), _x(x), _y(y), _width(width), _height(height)
- {
- }
-
- bool GUIElement::setBackground(WORD backgroundReference) {
- _background = new SDL_ImageResource();
- if (!_background->load(backgroundReference)) {
- delete _background;
- _background = NULL;
- return false;
- }
- if (!_height && !_width) {
- _height = _background->height();
- _width = _background->width();
- }
- else
- if (_background->height() != _height || _background->width() != _width) {
- delete _background;
- _background = NULL;
- return false;
- }
- return true;
- }
-
- void GUIElement::move(int x, int y) {
- _x = x;
- _y = y;
- }
-
- bool GUIElement::draw(SDL_Surface *surface) {
- if (_background && !_drawn && _visible) {
- SDL_Rect rect;
-
- rect.x = _x;
- rect.y = _y;
- rect.w = _width;
- rect.h = _height;
-
- SDL_BlitSurface(_background->get(), NULL, surface, &rect);
-
- _drawn = true;
-
- return true;
- }
- else
- return false;
- }
-
- bool GUIElement::checkInside(int x, int y) {
- if (x >= _x && x <= _x + _width && y >= _y && y <= _y + _height)
- return true;
- else
- return false;
- }
-
- void GUIElement::setVisible(bool visibility) {
- if (visibility && !_visible)
- _drawn = false;
- _visible = visibility;
- }
-
- bool GUIElement::visible() {
- return _visible;
- }
-
- void GUIElement::forceRedraw() {
- _drawn = false;
- }
-
- bool GUIElement::drawn() {
- return _drawn;
- }
-
- int GUIElement::x() {
- return _x;
- }
-
- int GUIElement::y() {
- return _y;
- }
-
- int GUIElement::width() {
- return _width;
- }
-
- int GUIElement::height() {
- return _height;
- }
-
- GUIElement::~GUIElement() {
- if (_background)
- delete _background;
- }
-
-}
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "stdafx.h"
+#include "Toolbar.h"
+
+#include "SDL_ImageResource.h"
+
+namespace CEGUI {
+
+ GUIElement::GUIElement(int x, int y, int width, int height) :
+ _background(0), _drawn(false), _visible(true), _x(x), _y(y), _width(width), _height(height)
+ {
+ }
+
+ bool GUIElement::setBackground(WORD backgroundReference) {
+ _background = new SDL_ImageResource();
+ if (!_background->load(backgroundReference)) {
+ delete _background;
+ _background = NULL;
+ return false;
+ }
+ if (!_height && !_width) {
+ _height = _background->height();
+ _width = _background->width();
+ }
+ else
+ if (_background->height() != _height || _background->width() != _width) {
+ delete _background;
+ _background = NULL;
+ return false;
+ }
+ return true;
+ }
+
+ void GUIElement::move(int x, int y) {
+ _x = x;
+ _y = y;
+ }
+
+ bool GUIElement::draw(SDL_Surface *surface) {
+ if (_background && !_drawn && _visible) {
+ SDL_Rect rect;
+
+ rect.x = _x;
+ rect.y = _y;
+ rect.w = _width;
+ rect.h = _height;
+
+ SDL_BlitSurface(_background->get(), NULL, surface, &rect);
+
+ _drawn = true;
+
+ return true;
+ }
+ else
+ return false;
+ }
+
+ bool GUIElement::checkInside(int x, int y) {
+ if (x >= _x && x <= _x + _width && y >= _y && y <= _y + _height)
+ return true;
+ else
+ return false;
+ }
+
+ void GUIElement::setVisible(bool visibility) {
+ if (visibility && !_visible)
+ _drawn = false;
+ _visible = visibility;
+ }
+
+ bool GUIElement::visible() {
+ return _visible;
+ }
+
+ void GUIElement::forceRedraw() {
+ _drawn = false;
+ }
+
+ bool GUIElement::drawn() {
+ return _drawn;
+ }
+
+ int GUIElement::x() {
+ return _x;
+ }
+
+ int GUIElement::y() {
+ return _y;
+ }
+
+ int GUIElement::width() {
+ return _width;
+ }
+
+ int GUIElement::height() {
+ return _height;
+ }
+
+ GUIElement::~GUIElement() {
+ if (_background)
+ delete _background;
+ }
+
+}
Index: GUIElement.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/GUIElement.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- GUIElement.h 26 Jan 2004 08:10:06 -0000 1.1
+++ GUIElement.h 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,64 +1,64 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#ifndef CEGUI_GUIELEMENT
-#define CEGUI_GUIELEMENT
-
-#include "common/stdafx.h"
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "SDL.h"
-
-#include "SDL_ImageResource.h"
-
-namespace CEGUI {
-
- class GUIElement {
- public:
- bool setBackground(WORD backgroundReference);
- void setVisible(bool visibility);
- virtual void forceRedraw();
- virtual bool draw(SDL_Surface *surface);
- virtual ~GUIElement();
- void move(int x, int y);
- int width();
- int height();
- int x();
- int y();
- virtual bool action(int x, int y, bool pushed) = 0;
- bool visible();
- bool drawn();
- protected:
- GUIElement(int x = 0, int y = 0, int width = 0, int height = 0);
- bool checkInside(int x, int y);
- bool _visible;
- SDL_ImageResource *_background;
- int _x;
- int _y;
- bool _drawn;
- private:
- int _width;
- int _height;
- };
-}
-
-#endif
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef CEGUI_GUIELEMENT
+#define CEGUI_GUIELEMENT
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+
+#include "SDL.h"
+
+#include "SDL_ImageResource.h"
+
+namespace CEGUI {
+
+ class GUIElement {
+ public:
+ bool setBackground(WORD backgroundReference);
+ void setVisible(bool visibility);
+ virtual void forceRedraw();
+ virtual bool draw(SDL_Surface *surface);
+ virtual ~GUIElement();
+ void move(int x, int y);
+ int width();
+ int height();
+ int x();
+ int y();
+ virtual bool action(int x, int y, bool pushed) = 0;
+ bool visible();
+ bool drawn();
+ protected:
+ GUIElement(int x = 0, int y = 0, int width = 0, int height = 0);
+ bool checkInside(int x, int y);
+ bool _visible;
+ SDL_ImageResource *_background;
+ int _x;
+ int _y;
+ bool _drawn;
+ private:
+ int _width;
+ int _height;
+ };
+}
+
+#endif
Index: ItemAction.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/ItemAction.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ItemAction.cpp 26 Jan 2004 08:10:06 -0000 1.1
+++ ItemAction.cpp 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,47 +1,47 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "stdafx.h"
-#include "ItemAction.h"
-
-namespace CEGUI {
-
- ItemAction::ItemAction(WORD reference, ActionType action) :
- PanelItem(reference) {
- _action = action;
- if (!CEActions::Instance()->isEnabled(_action))
- _visible = false;
- }
-
-
- ItemAction::~ItemAction() {
- }
-
- bool ItemAction::action(int x, int y, bool pushed) {
-
- if (checkInside(x, y) && _visible) {
- CEActions::Instance()->perform(_action);
- return true;
- }
- else
- return false;
- }
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "stdafx.h"
+#include "ItemAction.h"
+
+namespace CEGUI {
+
+ ItemAction::ItemAction(WORD reference, ActionType action) :
+ PanelItem(reference) {
+ _action = action;
+ if (!CEActions::Instance()->isEnabled(_action))
+ _visible = false;
+ }
+
+
+ ItemAction::~ItemAction() {
+ }
+
+ bool ItemAction::action(int x, int y, bool pushed) {
+
+ if (checkInside(x, y) && _visible) {
+ CEActions::Instance()->perform(_action);
+ return true;
+ }
+ else
+ return false;
+ }
}
\ No newline at end of file
Index: ItemAction.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/ItemAction.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ItemAction.h 26 Jan 2004 08:10:06 -0000 1.1
+++ ItemAction.h 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,43 +1,43 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#ifndef CEGUI_ITEMACTION
-#define CEGUI_ITEMACTION
-
-#include "common/stdafx.h"
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "CEActions.h"
-
-namespace CEGUI {
-
- class ItemAction : public PanelItem {
- public:
- ItemAction(WORD reference, ActionType action);
- virtual ~ItemAction();
- virtual bool action(int x, int y, bool pushed);
- private:
- ActionType _action;
- };
-}
-
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef CEGUI_ITEMACTION
+#define CEGUI_ITEMACTION
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+
+#include "CEActions.h"
+
+namespace CEGUI {
+
+ class ItemAction : public PanelItem {
+ public:
+ ItemAction(WORD reference, ActionType action);
+ virtual ~ItemAction();
+ virtual bool action(int x, int y, bool pushed);
+ private:
+ ActionType _action;
+ };
+}
+
#endif
\ No newline at end of file
Index: ItemSendKey.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/ItemSendKey.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ItemSendKey.cpp 26 Jan 2004 08:10:06 -0000 1.1
+++ ItemSendKey.cpp 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,49 +1,49 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "stdafx.h"
-#include "ItemSendKey.h"
-
-namespace CEGUI {
-
- ItemSendKey::ItemSendKey(WORD reference, KeysBuffer *buffer, int ascii, int keycode, int flags) :
- PanelItem(reference) {
- _key.setAscii(ascii);
- _key.setKeycode(keycode);
- _key.setFlags(flags);
- _buffer = buffer->Instance();
- }
-
-
- ItemSendKey::~ItemSendKey() {
- }
-
- bool ItemSendKey::action(int x, int y, bool pushed) {
-
- if (checkInside(x, y) && _visible) {
- _key.setPushed(pushed);
- _buffer->add(&_key);
- return true;
- }
- else
- return false;
- }
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "stdafx.h"
+#include "ItemSendKey.h"
+
+namespace CEGUI {
+
+ ItemSendKey::ItemSendKey(WORD reference, KeysBuffer *buffer, int ascii, int keycode, int flags) :
+ PanelItem(reference) {
+ _key.setAscii(ascii);
+ _key.setKeycode(keycode);
+ _key.setFlags(flags);
+ _buffer = buffer->Instance();
+ }
+
+
+ ItemSendKey::~ItemSendKey() {
+ }
+
+ bool ItemSendKey::action(int x, int y, bool pushed) {
+
+ if (checkInside(x, y) && _visible) {
+ _key.setPushed(pushed);
+ _buffer->add(&_key);
+ return true;
+ }
+ else
+ return false;
+ }
}
\ No newline at end of file
Index: ItemSendKey.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/ItemSendKey.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ItemSendKey.h 26 Jan 2004 08:10:06 -0000 1.1
+++ ItemSendKey.h 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,48 +1,48 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#ifndef CEGUI_ITEMSENDKEY
-#define CEGUI_ITEMSENDKEY
-
-#include "common/stdafx.h"
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "PanelItem.h"
-#include "KeysBuffer.h"
-
-using CEKEYS::KeysBuffer;
-using CEKEYS::Key;
-
-namespace CEGUI {
-
- class ItemSendKey : public PanelItem {
- public:
- ItemSendKey(WORD reference, KeysBuffer *buffer, int ascii, int keycode = 0, int flags = 0);
- virtual ~ItemSendKey();
- virtual bool action(int x, int y, bool pushed);
- private:
- KeysBuffer *_buffer;
- Key _key;
- };
-}
-
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef CEGUI_ITEMSENDKEY
+#define CEGUI_ITEMSENDKEY
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+
+#include "PanelItem.h"
+#include "KeysBuffer.h"
+
+using CEKEYS::KeysBuffer;
+using CEKEYS::Key;
+
+namespace CEGUI {
+
+ class ItemSendKey : public PanelItem {
+ public:
+ ItemSendKey(WORD reference, KeysBuffer *buffer, int ascii, int keycode = 0, int flags = 0);
+ virtual ~ItemSendKey();
+ virtual bool action(int x, int y, bool pushed);
+ private:
+ KeysBuffer *_buffer;
+ Key _key;
+ };
+}
+
#endif
\ No newline at end of file
Index: ItemSwitch.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/ItemSwitch.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ItemSwitch.cpp 26 Jan 2004 08:10:06 -0000 1.1
+++ ItemSwitch.cpp 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,65 +1,65 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "stdafx.h"
-#include "ItemSwitch.h"
-
-namespace CEGUI {
-
- ItemSwitch::ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item) :
- PanelItem(referenceTrue) {
- _item = item;
- _backgroundTrue = _background;
- _backgroundFalse = new SDL_ImageResource();
- if (!_backgroundFalse->load(referenceFalse)) {
- delete _backgroundFalse;
- delete _background;
- _background = NULL;
- _backgroundFalse = NULL;
- }
- if (!*_item)
- _background = _backgroundFalse;
- }
-
-
- ItemSwitch::~ItemSwitch() {
- if (_backgroundFalse)
- delete _backgroundFalse;
- }
-
- bool ItemSwitch::action(int x, int y, bool pushed) {
-
- if (checkInside(x, y) && _visible && pushed) {
- *_item = !*_item;
- if (*_item)
- _background = _backgroundTrue;
- else
- _background = _backgroundFalse;
-
- if (_panel)
- _panel->forceRedraw();
-
- return true;
- }
- else
- return false;
- }
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "stdafx.h"
+#include "ItemSwitch.h"
+
+namespace CEGUI {
+
+ ItemSwitch::ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item) :
+ PanelItem(referenceTrue) {
+ _item = item;
+ _backgroundTrue = _background;
+ _backgroundFalse = new SDL_ImageResource();
+ if (!_backgroundFalse->load(referenceFalse)) {
+ delete _backgroundFalse;
+ delete _background;
+ _background = NULL;
+ _backgroundFalse = NULL;
+ }
+ if (!*_item)
+ _background = _backgroundFalse;
+ }
+
+
+ ItemSwitch::~ItemSwitch() {
+ if (_backgroundFalse)
+ delete _backgroundFalse;
+ }
+
+ bool ItemSwitch::action(int x, int y, bool pushed) {
+
+ if (checkInside(x, y) && _visible && pushed) {
+ *_item = !*_item;
+ if (*_item)
+ _background = _backgroundTrue;
+ else
+ _background = _backgroundFalse;
+
+ if (_panel)
+ _panel->forceRedraw();
+
+ return true;
+ }
+ else
+ return false;
+ }
}
\ No newline at end of file
Index: ItemSwitch.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/ItemSwitch.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ItemSwitch.h 26 Jan 2004 08:10:06 -0000 1.1
+++ ItemSwitch.h 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,49 +1,49 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#ifndef CEGUI_ITEMSWITCH
-#define CEGUI_ITEMSWITCH
-
-#include "common/stdafx.h"
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "Panel.h"
-#include "KeysBuffer.h"
-
-using CEKEYS::KeysBuffer;
-using CEKEYS::Key;
-
-namespace CEGUI {
-
- class ItemSwitch : public PanelItem {
- public:
- ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item);
- virtual ~ItemSwitch();
- virtual bool action(int x, int y, bool pushed);
- private:
- bool *_item;
- SDL_ImageResource *_backgroundTrue;
- SDL_ImageResource *_backgroundFalse;
- };
-}
-
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef CEGUI_ITEMSWITCH
+#define CEGUI_ITEMSWITCH
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+
+#include "Panel.h"
+#include "KeysBuffer.h"
+
+using CEKEYS::KeysBuffer;
+using CEKEYS::Key;
+
+namespace CEGUI {
+
+ class ItemSwitch : public PanelItem {
+ public:
+ ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item);
+ virtual ~ItemSwitch();
+ virtual bool action(int x, int y, bool pushed);
+ private:
+ bool *_item;
+ SDL_ImageResource *_backgroundTrue;
+ SDL_ImageResource *_backgroundFalse;
+ };
+}
+
#endif
\ No newline at end of file
Index: Panel.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/Panel.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Panel.cpp 26 Jan 2004 08:10:06 -0000 1.1
+++ Panel.cpp 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,82 +1,82 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "stdafx.h"
-#include "Panel.h"
-
-namespace CEGUI {
-
- Panel::Panel(int interleave_first, int interleave) : Toolbar()
- {
- _interleave = interleave;
- _currentItem = _x + interleave_first;
- }
-
-
- bool Panel::add(const String &name, const PanelItem *item) {
- _itemsMap.addKey(name);
- _itemsMap[name] = (PanelItem*)item;
- _itemsMap[name]->move(_currentItem, _y + 10);
- _itemsMap[name]->setPanel(this);
- _currentItem += _interleave;
-
- return true;
- }
-
- bool Panel::draw(SDL_Surface *surface) {
- ItemMap::ConstIterator iterator;
- if (!_drawn) {
- GUIElement::draw(surface);
- for (iterator = _itemsMap.begin(); iterator != _itemsMap.end(); ++iterator) {
- ((GUIElement*)(iterator->_value))->draw(surface);
- }
- return true;
- }
- else
- return false;
- }
-
- void Panel::forceRedraw() {
- ItemMap::ConstIterator iterator;
- GUIElement::forceRedraw();
- for (iterator = _itemsMap.begin(); iterator != _itemsMap.end(); ++iterator)
- ((GUIElement*)(iterator->_value))->forceRedraw();
- }
-
- bool Panel::action(int x, int y, bool pushed) {
- ItemMap::ConstIterator iterator;
- bool result = false;
- if (!checkInside(x, y))
- return false;
-
- for (iterator = _itemsMap.begin(); !result && iterator != _itemsMap.end(); ++iterator)
- result = ((GUIElement*)(iterator->_value))->action(x, y, pushed);
- return result;
- }
-
- void Panel::clear() {
- _itemsMap.clear();
- }
-
- Panel::~Panel() {
- _itemsMap.clear();
- }
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "stdafx.h"
+#include "Panel.h"
+
+namespace CEGUI {
+
+ Panel::Panel(int interleave_first, int interleave) : Toolbar()
+ {
+ _interleave = interleave;
+ _currentItem = _x + interleave_first;
+ }
+
+
+ bool Panel::add(const String &name, const PanelItem *item) {
+ _itemsMap.addKey(name);
+ _itemsMap[name] = (PanelItem*)item;
+ _itemsMap[name]->move(_currentItem, _y + 10);
+ _itemsMap[name]->setPanel(this);
+ _currentItem += _interleave;
+
+ return true;
+ }
+
+ bool Panel::draw(SDL_Surface *surface) {
+ ItemMap::ConstIterator iterator;
+ if (!_drawn) {
+ GUIElement::draw(surface);
+ for (iterator = _itemsMap.begin(); iterator != _itemsMap.end(); ++iterator) {
+ ((GUIElement*)(iterator->_value))->draw(surface);
+ }
+ return true;
+ }
+ else
+ return false;
+ }
+
+ void Panel::forceRedraw() {
+ ItemMap::ConstIterator iterator;
+ GUIElement::forceRedraw();
+ for (iterator = _itemsMap.begin(); iterator != _itemsMap.end(); ++iterator)
+ ((GUIElement*)(iterator->_value))->forceRedraw();
+ }
+
+ bool Panel::action(int x, int y, bool pushed) {
+ ItemMap::ConstIterator iterator;
+ bool result = false;
+ if (!checkInside(x, y))
+ return false;
+
+ for (iterator = _itemsMap.begin(); !result && iterator != _itemsMap.end(); ++iterator)
+ result = ((GUIElement*)(iterator->_value))->action(x, y, pushed);
+ return result;
+ }
+
+ void Panel::clear() {
+ _itemsMap.clear();
+ }
+
+ Panel::~Panel() {
+ _itemsMap.clear();
+ }
}
\ No newline at end of file
Index: Panel.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/Panel.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Panel.h 26 Jan 2004 08:10:06 -0000 1.1
+++ Panel.h 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,62 +1,62 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#ifndef CEGUI_PANEL
-#define CEGUI_PANEL
-
-#include "common/stdafx.h"
-#include "common/scummsys.h"
-#include "common/system.h"
-#include "common/map.h"
-#include "common/str.h"
-
-#include "PanelItem.h"
-#include "Toolbar.h"
-
-using Common::String;
-using Common::Map;
-
-namespace CEGUI {
-
- class Panel : public Toolbar {
- public:
- Panel(int interleave_first, int interleave);
- virtual bool draw(SDL_Surface *surface);
- virtual ~Panel();
- bool add(const String &name, const PanelItem *item);
- void clear();
- virtual void forceRedraw();
- virtual bool action(int x, int y, bool pushed);
- private:
- struct IgnoreCaseComparator {
- int operator()(const String& x, const String& y) const {
- return scumm_stricmp(x.c_str(), y.c_str()); }
- };
-
- typedef Map<String, PanelItem*, IgnoreCaseComparator> ItemMap;
-
- ItemMap _itemsMap;
- int _interleave;
- int _currentItem;
- };
-}
-
-#endif
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef CEGUI_PANEL
+#define CEGUI_PANEL
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+#include "common/map.h"
+#include "common/str.h"
+
+#include "PanelItem.h"
+#include "Toolbar.h"
+
+using Common::String;
+using Common::Map;
+
+namespace CEGUI {
+
+ class Panel : public Toolbar {
+ public:
+ Panel(int interleave_first, int interleave);
+ virtual bool draw(SDL_Surface *surface);
+ virtual ~Panel();
+ bool add(const String &name, const PanelItem *item);
+ void clear();
+ virtual void forceRedraw();
+ virtual bool action(int x, int y, bool pushed);
+ private:
+ struct IgnoreCaseComparator {
+ int operator()(const String& x, const String& y) const {
+ return scumm_stricmp(x.c_str(), y.c_str()); }
+ };
+
+ typedef Map<String, PanelItem*, IgnoreCaseComparator> ItemMap;
+
+ ItemMap _itemsMap;
+ int _interleave;
+ int _currentItem;
+ };
+}
+
+#endif
Index: PanelItem.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/PanelItem.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- PanelItem.cpp 26 Jan 2004 08:10:06 -0000 1.1
+++ PanelItem.cpp 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,43 +1,43 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "stdafx.h"
-#include "PanelItem.h"
-
-namespace CEGUI {
-
- PanelItem::PanelItem(WORD reference) : GUIElement() {
- setBackground(reference);
- _panel = NULL;
- }
-
-
- PanelItem::~PanelItem() {
- }
-
- bool PanelItem::action(int x, int y, bool pushed) {
- return false;
- }
-
- void PanelItem::setPanel(Panel *panel) {
- _panel = panel;
- }
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "stdafx.h"
+#include "PanelItem.h"
+
+namespace CEGUI {
+
+ PanelItem::PanelItem(WORD reference) : GUIElement() {
+ setBackground(reference);
+ _panel = NULL;
+ }
+
+
+ PanelItem::~PanelItem() {
+ }
+
+ bool PanelItem::action(int x, int y, bool pushed) {
+ return false;
+ }
+
+ void PanelItem::setPanel(Panel *panel) {
+ _panel = panel;
+ }
}
\ No newline at end of file
Index: PanelItem.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/PanelItem.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- PanelItem.h 26 Jan 2004 08:10:06 -0000 1.1
+++ PanelItem.h 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,47 +1,47 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#ifndef CEGUI_PANELITEM
-#define CEGUI_PANELITEM
-
-#include "common/stdafx.h"
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "Toolbar.h"
-
-namespace CEGUI {
-
- class Panel;
-
- class PanelItem : public GUIElement {
- friend class Panel;
- public:
- PanelItem(WORD reference);
- virtual ~PanelItem();
- virtual bool action(int x, int y, bool pushed);
- protected:
- void setPanel(Panel *panel);
- Panel *_panel;
- };
-}
-
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef CEGUI_PANELITEM
+#define CEGUI_PANELITEM
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+
+#include "Toolbar.h"
+
+namespace CEGUI {
+
+ class Panel;
+
+ class PanelItem : public GUIElement {
+ friend class Panel;
+ public:
+ PanelItem(WORD reference);
+ virtual ~PanelItem();
+ virtual bool action(int x, int y, bool pushed);
+ protected:
+ void setPanel(Panel *panel);
+ Panel *_panel;
+ };
+}
+
#endif
\ No newline at end of file
Index: PanelKeyboard.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/PanelKeyboard.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- PanelKeyboard.cpp 26 Jan 2004 08:10:06 -0000 1.1
+++ PanelKeyboard.cpp 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,89 +1,89 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "stdafx.h"
-#include "PanelKeyboard.h"
-
-namespace CEGUI {
-
- const char KEYBOARD_MAPPING_ALPHA_HIGH[] = {"abcdefghijklm"};
- const char KEYBOARD_MAPPING_NUMERIC_HIGH[] = {"12345"};
- const char KEYBOARD_MAPPING_ALPHA_LOW[] = {"nopqrstuvwxyz"};
- const char KEYBOARD_MAPPING_NUMERIC_LOW[] = {"67890"};
-
- PanelKeyboard::PanelKeyboard(WORD reference, KeysBuffer *buffer) : Toolbar() {
- setBackground(reference);
- _buffer = buffer->Instance();
- }
-
-
- PanelKeyboard::~PanelKeyboard() {
- }
-
- bool PanelKeyboard::action(int x, int y, bool pushed) {
-
- if (checkInside(x, y)) {
- char keyAscii = 0;
- char keyCode = 0;
- if (x < 185) {
- // Alpha selection
- if (y <= _y + 20)
- keyAscii = KEYBOARD_MAPPING_ALPHA_HIGH[((x + 10) / 14) - 1];
- else
- keyAscii = KEYBOARD_MAPPING_ALPHA_LOW[((x + 10) / 14) - 1];
- keyCode = tolower(keyAscii);
- }
- else
- if (x >= 186 && x <= 255) {
- // Numeric selection
- if (y <= _y + 20)
- keyAscii = KEYBOARD_MAPPING_NUMERIC_HIGH[((x - 187 + 10) / 14) - 1];
- else
- keyAscii = KEYBOARD_MAPPING_NUMERIC_LOW[((x - 187 + 10) / 14) - 1];
- keyCode = keyAscii;
- }
- else
- if (x >= 302 && x <= 316 && y < _y + 20) {
- // Backspace
- keyAscii = VK_BACK;
- keyCode = keyAscii;
- }
- else
- if (x >= 302 && x <= 316 && y >= _y + 20) {
- // Enter
- keyAscii = 13;
- keyCode = 10;
- }
-
- if (keyAscii != 0) {
- _key.setAscii(keyAscii);
- _key.setKeycode(tolower(keyAscii));
- _key.setPushed(pushed);
- _buffer->add(&_key);
- return true;
- }
- else
- return false;
- }
- else
- return false;
- }
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "stdafx.h"
+#include "PanelKeyboard.h"
+
+namespace CEGUI {
+
+ const char KEYBOARD_MAPPING_ALPHA_HIGH[] = {"abcdefghijklm"};
+ const char KEYBOARD_MAPPING_NUMERIC_HIGH[] = {"12345"};
+ const char KEYBOARD_MAPPING_ALPHA_LOW[] = {"nopqrstuvwxyz"};
+ const char KEYBOARD_MAPPING_NUMERIC_LOW[] = {"67890"};
+
+ PanelKeyboard::PanelKeyboard(WORD reference, KeysBuffer *buffer) : Toolbar() {
+ setBackground(reference);
+ _buffer = buffer->Instance();
+ }
+
+
+ PanelKeyboard::~PanelKeyboard() {
+ }
+
+ bool PanelKeyboard::action(int x, int y, bool pushed) {
+
+ if (checkInside(x, y)) {
+ char keyAscii = 0;
+ char keyCode = 0;
+ if (x < 185) {
+ // Alpha selection
+ if (y <= _y + 20)
+ keyAscii = KEYBOARD_MAPPING_ALPHA_HIGH[((x + 10) / 14) - 1];
+ else
+ keyAscii = KEYBOARD_MAPPING_ALPHA_LOW[((x + 10) / 14) - 1];
+ keyCode = tolower(keyAscii);
+ }
+ else
+ if (x >= 186 && x <= 255) {
+ // Numeric selection
+ if (y <= _y + 20)
+ keyAscii = KEYBOARD_MAPPING_NUMERIC_HIGH[((x - 187 + 10) / 14) - 1];
+ else
+ keyAscii = KEYBOARD_MAPPING_NUMERIC_LOW[((x - 187 + 10) / 14) - 1];
+ keyCode = keyAscii;
+ }
+ else
+ if (x >= 302 && x <= 316 && y < _y + 20) {
+ // Backspace
+ keyAscii = VK_BACK;
+ keyCode = keyAscii;
+ }
+ else
+ if (x >= 302 && x <= 316 && y >= _y + 20) {
+ // Enter
+ keyAscii = 13;
+ keyCode = 10;
+ }
+
+ if (keyAscii != 0) {
+ _key.setAscii(keyAscii);
+ _key.setKeycode(tolower(keyAscii));
+ _key.setPushed(pushed);
+ _buffer->add(&_key);
+ return true;
+ }
+ else
+ return false;
+ }
+ else
+ return false;
+ }
}
\ No newline at end of file
Index: PanelKeyboard.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/PanelKeyboard.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- PanelKeyboard.h 26 Jan 2004 08:10:06 -0000 1.1
+++ PanelKeyboard.h 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,48 +1,48 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#ifndef CEGUI_PANELKEYBOARD
-#define CEGUI_PANELKEYBOARD
-
-#include "common/stdafx.h"
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "Toolbar.h"
-#include "KeysBuffer.h"
-
-using CEKEYS::KeysBuffer;
-using CEKEYS::Key;
-
-namespace CEGUI {
-
- class PanelKeyboard : public Toolbar {
- public:
- PanelKeyboard(WORD reference, KeysBuffer *buffer);
- virtual ~PanelKeyboard();
- virtual bool action(int x, int y, bool pushed);
- private:
- KeysBuffer *_buffer;
- Key _key;
- };
-}
-
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef CEGUI_PANELKEYBOARD
+#define CEGUI_PANELKEYBOARD
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+
+#include "Toolbar.h"
+#include "KeysBuffer.h"
+
+using CEKEYS::KeysBuffer;
+using CEKEYS::Key;
+
+namespace CEGUI {
+
+ class PanelKeyboard : public Toolbar {
+ public:
+ PanelKeyboard(WORD reference, KeysBuffer *buffer);
+ virtual ~PanelKeyboard();
+ virtual bool action(int x, int y, bool pushed);
+ private:
+ KeysBuffer *_buffer;
+ Key _key;
+ };
+}
+
#endif
\ No newline at end of file
Index: SDL_ImageResource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/SDL_ImageResource.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- SDL_ImageResource.cpp 26 Jan 2004 08:10:06 -0000 1.1
+++ SDL_ImageResource.cpp 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,82 +1,82 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "stdafx.h"
-#include "SDL_ImageResource.h"
-
-namespace CEGUI {
-
- SDL_ImageResource::SDL_ImageResource() :
- _surface(0)
- {
- }
-
- SDL_Surface* SDL_ImageResource::load(WORD resourceID) {
- HRSRC resource;
- HGLOBAL resourceGlobal;
- LPVOID resourcePointer;
- DWORD resourceSize;
- SDL_RWops *surfaceData;
- HMODULE moduleHandle;
-
- moduleHandle = GetModuleHandle(NULL);
- resource = FindResource(moduleHandle, MAKEINTRESOURCE(resourceID), TEXT("BINARY"));
- if (!resource)
- return NULL;
- resourceSize = SizeofResource(moduleHandle, resource);
- if (!resourceSize)
- return NULL;
- resourceGlobal = LoadResource(moduleHandle, resource);
- if (!resourceGlobal)
- return NULL;
- resourcePointer = LockResource(resourceGlobal);
- if (!resourcePointer)
- return NULL;
-
- surfaceData = SDL_RWFromMem(resourcePointer, resourceSize);
- if (!surfaceData)
- return NULL;
- _surface = SDL_LoadBMP_RW(surfaceData, 1);
-
- return _surface;
- };
-
- SDL_Surface* SDL_ImageResource::get() {
- return _surface;
- }
-
- int SDL_ImageResource::height() {
- if (_surface)
- return _surface->h;
- return 0;
- }
-
- int SDL_ImageResource::width() {
- if (_surface)
- return _surface->w;
- return 0;
- }
-
- SDL_ImageResource::~SDL_ImageResource() {
- if (_surface)
- SDL_FreeSurface(_surface);
- }
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "stdafx.h"
+#include "SDL_ImageResource.h"
+
+namespace CEGUI {
+
+ SDL_ImageResource::SDL_ImageResource() :
+ _surface(0)
+ {
+ }
+
+ SDL_Surface* SDL_ImageResource::load(WORD resourceID) {
+ HRSRC resource;
+ HGLOBAL resourceGlobal;
+ LPVOID resourcePointer;
+ DWORD resourceSize;
+ SDL_RWops *surfaceData;
+ HMODULE moduleHandle;
+
+ moduleHandle = GetModuleHandle(NULL);
+ resource = FindResource(moduleHandle, MAKEINTRESOURCE(resourceID), TEXT("BINARY"));
+ if (!resource)
+ return NULL;
+ resourceSize = SizeofResource(moduleHandle, resource);
+ if (!resourceSize)
+ return NULL;
+ resourceGlobal = LoadResource(moduleHandle, resource);
+ if (!resourceGlobal)
+ return NULL;
+ resourcePointer = LockResource(resourceGlobal);
+ if (!resourcePointer)
+ return NULL;
+
+ surfaceData = SDL_RWFromMem(resourcePointer, resourceSize);
+ if (!surfaceData)
+ return NULL;
+ _surface = SDL_LoadBMP_RW(surfaceData, 1);
+
+ return _surface;
+ };
+
+ SDL_Surface* SDL_ImageResource::get() {
+ return _surface;
+ }
+
+ int SDL_ImageResource::height() {
+ if (_surface)
+ return _surface->h;
+ return 0;
+ }
+
+ int SDL_ImageResource::width() {
+ if (_surface)
+ return _surface->w;
+ return 0;
+ }
+
+ SDL_ImageResource::~SDL_ImageResource() {
+ if (_surface)
+ SDL_FreeSurface(_surface);
+ }
}
\ No newline at end of file
Index: SDL_ImageResource.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/SDL_ImageResource.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- SDL_ImageResource.h 26 Jan 2004 08:10:06 -0000 1.1
+++ SDL_ImageResource.h 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,45 +1,45 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#ifndef CEGUI_SDL_IMAGERESOURCE
-#define CEGUI_SDL_IMAGERESOURCE
-
-#include "common/stdafx.h"
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "SDL.h"
-
-namespace CEGUI {
- class SDL_ImageResource {
- public:
- SDL_ImageResource();
- SDL_Surface* load(WORD resourceID);
- SDL_Surface* get();
- int height();
- int width();
- virtual ~SDL_ImageResource();
- private:
- SDL_Surface *_surface;
- };
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef CEGUI_SDL_IMAGERESOURCE
+#define CEGUI_SDL_IMAGERESOURCE
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+
+#include "SDL.h"
+
+namespace CEGUI {
+ class SDL_ImageResource {
+ public:
+ SDL_ImageResource();
+ SDL_Surface* load(WORD resourceID);
+ SDL_Surface* get();
+ int height();
+ int width();
+ virtual ~SDL_ImageResource();
+ private:
+ SDL_Surface *_surface;
+ };
}
#endif
\ No newline at end of file
Index: Toolbar.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/Toolbar.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Toolbar.cpp 26 Jan 2004 08:10:06 -0000 1.1
+++ Toolbar.cpp 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,35 +1,35 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "stdafx.h"
-#include "Toolbar.h"
-
-namespace CEGUI {
-
- // FIXME (could be game dependant)
- Toolbar::Toolbar() : GUIElement(0, 200, 320, 40)
- {
- }
-
-
- Toolbar::~Toolbar() {
- }
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "stdafx.h"
+#include "Toolbar.h"
+
+namespace CEGUI {
+
+ // FIXME (could be game dependant)
+ Toolbar::Toolbar() : GUIElement(0, 200, 320, 40)
+ {
+ }
+
+
+ Toolbar::~Toolbar() {
+ }
}
\ No newline at end of file
Index: Toolbar.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/Toolbar.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Toolbar.h 26 Jan 2004 08:10:06 -0000 1.1
+++ Toolbar.h 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,48 +1,48 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#ifndef CEGUI_TOOLBAR
-#define CEGUI_TOOLBAR
-
-#include "common/stdafx.h"
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "common/map.h"
-#include "common/str.h"
-
-#include "GUIElement.h"
-
-
-
-namespace CEGUI {
-
- class Toolbar : public GUIElement {
- public:
- virtual ~Toolbar();
- virtual bool action(int x, int y, bool pushed) = 0;
- protected:
- Toolbar();
-
- };
-}
-
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef CEGUI_TOOLBAR
+#define CEGUI_TOOLBAR
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+
+#include "common/map.h"
+#include "common/str.h"
+
+#include "GUIElement.h"
+
+
+
+namespace CEGUI {
+
+ class Toolbar : public GUIElement {
+ public:
+ virtual ~Toolbar();
+ virtual bool action(int x, int y, bool pushed) = 0;
+ protected:
+ Toolbar();
+
+ };
+}
+
#endif
\ No newline at end of file
Index: ToolbarHandler.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/ToolbarHandler.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ToolbarHandler.cpp 26 Jan 2004 08:10:06 -0000 1.1
+++ ToolbarHandler.cpp 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,113 +1,113 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "stdafx.h"
-#include "ToolbarHandler.h"
-
-namespace CEGUI {
-
- ToolbarHandler::ToolbarHandler():
- _current(""), _active(NULL) {
- }
-
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
- bool ToolbarHandler::add(const String &name, const Toolbar &toolbar) {
- _toolbarMap.addKey(name);
- _toolbarMap[name] = (Toolbar*)&toolbar;
-
-
- if (!_active) {
- _active = &((Toolbar&)toolbar);
- _current = name;
- }
-
- return true;
- }
-
- String ToolbarHandler::activeName() {
- return _current;
- }
-
- bool ToolbarHandler::setActive(const String &name) {
- if (!_toolbarMap.contains(name))
- return false;
- if (_current == name)
- return true;
- _current = name;
- _active = _toolbarMap[name];
- _active->forceRedraw();
- return true;
- }
-
- bool ToolbarHandler::action(int x, int y, bool pushed) {
- if (_active)
- return _active->action(x, y, pushed);
- else
- return false;
- }
-
- void ToolbarHandler::setVisible(bool visible) {
- if (_active)
- _active->setVisible(visible);
- }
-
- bool ToolbarHandler::visible() {
- if (_active)
- return _active->visible();
- else
- return false;
- }
-
- void ToolbarHandler::forceRedraw() {
- if (_active)
- _active->forceRedraw();
- }
-
- bool ToolbarHandler::drawn() {
- if (_active)
- return _active->drawn();
- else
- return false;
- }
-
- bool ToolbarHandler::draw(SDL_Surface *surface, SDL_Rect *rect) {
- if (_active) {
- bool result = _active->draw(surface);
- if (result) {
- rect->x = _active->x();
- rect->y = _active->y();
- rect->w = _active->width();
- rect->h = _active->height();
- }
- return result;
- }
- else
- return false;
- }
-
- Toolbar* ToolbarHandler::active() {
- return _active;
- }
-
- ToolbarHandler::~ToolbarHandler() {
- _toolbarMap.clear();
- }
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "stdafx.h"
+#include "ToolbarHandler.h"
+
+namespace CEGUI {
+
+ ToolbarHandler::ToolbarHandler():
+ _current(""), _active(NULL) {
+ }
+
+
+ bool ToolbarHandler::add(const String &name, const Toolbar &toolbar) {
+ _toolbarMap.addKey(name);
+ _toolbarMap[name] = (Toolbar*)&toolbar;
+
+
+ if (!_active) {
+ _active = &((Toolbar&)toolbar);
+ _current = name;
+ }
+
+ return true;
+ }
+
+ String ToolbarHandler::activeName() {
+ return _current;
+ }
+
+ bool ToolbarHandler::setActive(const String &name) {
+ if (!_toolbarMap.contains(name))
+ return false;
+ if (_current == name)
+ return true;
+ _current = name;
+ _active = _toolbarMap[name];
+ _active->forceRedraw();
+ return true;
+ }
+
+ bool ToolbarHandler::action(int x, int y, bool pushed) {
+ if (_active)
+ return _active->action(x, y, pushed);
+ else
+ return false;
+ }
+
+ void ToolbarHandler::setVisible(bool visible) {
+ if (_active)
+ _active->setVisible(visible);
+ }
+
+ bool ToolbarHandler::visible() {
+ if (_active)
+ return _active->visible();
+ else
+ return false;
+ }
+
+ void ToolbarHandler::forceRedraw() {
+ if (_active)
+ _active->forceRedraw();
+ }
+
+ bool ToolbarHandler::drawn() {
+ if (_active)
+ return _active->drawn();
+ else
+ return false;
+ }
+
+ bool ToolbarHandler::draw(SDL_Surface *surface, SDL_Rect *rect) {
+ if (_active) {
+ bool result = _active->draw(surface);
+ if (result) {
+ rect->x = _active->x();
+ rect->y = _active->y();
+ rect->w = _active->width();
+ rect->h = _active->height();
+ }
+ return result;
+ }
+ else
+ return false;
+ }
+
+ Toolbar* ToolbarHandler::active() {
+ return _active;
+ }
+
+ ToolbarHandler::~ToolbarHandler() {
+ _toolbarMap.clear();
+ }
}
\ No newline at end of file
Index: ToolbarHandler.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEgui/ToolbarHandler.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ToolbarHandler.h 26 Jan 2004 08:10:06 -0000 1.1
+++ ToolbarHandler.h 26 Jan 2004 08:13:10 -0000 1.2
@@ -1,65 +1,65 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2004 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#ifndef CEGUI_TOOLBARHANDLER
-#define CEGUI_TOOLBARHANDLER
-
-#include "common/stdafx.h"
-#include "common/scummsys.h"
-#include "common/system.h"
-#include "common/str.h"
-#include "common/map.h"
-
-#include "Toolbar.h"
-
-using Common::String;
-using Common::Map;
-
-namespace CEGUI {
-
- class ToolbarHandler {
- public:
- ToolbarHandler();
- bool add(const String &name, const Toolbar &toolbar);
- bool setActive(const String &name);
- bool action(int x, int y, bool pushed);
- void setVisible(bool visible);
- bool visible();
- String activeName();
- void forceRedraw();
- bool draw(SDL_Surface *surface, SDL_Rect *rect);
- bool drawn();
- Toolbar *active();
- virtual ~ToolbarHandler();
- private:
-
- struct IgnoreCaseComparator {
- int operator()(const String& x, const String& y) const {
- return scumm_stricmp(x.c_str(), y.c_str()); }
- };
-
- Map<String, Toolbar*, IgnoreCaseComparator> _toolbarMap;
- String _current;
- Toolbar *_active;
- };
-}
-
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2004 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef CEGUI_TOOLBARHANDLER
+#define CEGUI_TOOLBARHANDLER
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+#include "common/str.h"
+#include "common/map.h"
+
+#include "Toolbar.h"
+
+using Common::String;
+using Common::Map;
+
+namespace CEGUI {
+
+ class ToolbarHandler {
+ public:
+ ToolbarHandler();
+ bool add(const String &name, const Toolbar &toolbar);
+ bool setActive(const String &name);
+ bool action(int x, int y, bool pushed);
+ void setVisible(bool visible);
+ bool visible();
+ String activeName();
+ void forceRedraw();
+ bool draw(SDL_Surface *surface, SDL_Rect *rect);
+ bool drawn();
+ Toolbar *active();
+ virtual ~ToolbarHandler();
+ private:
+
+ struct IgnoreCaseComparator {
+ int operator()(const String& x, const String& y) const {
+ return scumm_stricmp(x.c_str(), y.c_str()); }
+ };
+
+ Map<String, Toolbar*, IgnoreCaseComparator> _toolbarMap;
+ String _current;
+ Toolbar *_active;
+ };
+}
+
#endif
\ No newline at end of file
More information about the Scummvm-git-logs
mailing list