aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/wince/CEgui
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/wince/CEgui')
-rw-r--r--backends/platform/wince/CEgui/CEGUI.h26
-rw-r--r--backends/platform/wince/CEgui/GUIElement.cpp121
-rw-r--r--backends/platform/wince/CEgui/GUIElement.h67
-rw-r--r--backends/platform/wince/CEgui/ItemAction.cpp48
-rw-r--r--backends/platform/wince/CEgui/ItemAction.h45
-rw-r--r--backends/platform/wince/CEgui/ItemSwitch.cpp93
-rw-r--r--backends/platform/wince/CEgui/ItemSwitch.h55
-rw-r--r--backends/platform/wince/CEgui/Panel.cpp80
-rw-r--r--backends/platform/wince/CEgui/Panel.h60
-rw-r--r--backends/platform/wince/CEgui/PanelItem.cpp44
-rw-r--r--backends/platform/wince/CEgui/PanelItem.h48
-rw-r--r--backends/platform/wince/CEgui/PanelKeyboard.cpp98
-rw-r--r--backends/platform/wince/CEgui/PanelKeyboard.h49
-rw-r--r--backends/platform/wince/CEgui/SDL_ImageResource.cpp83
-rw-r--r--backends/platform/wince/CEgui/SDL_ImageResource.h47
-rw-r--r--backends/platform/wince/CEgui/Toolbar.cpp35
-rw-r--r--backends/platform/wince/CEgui/Toolbar.h43
-rw-r--r--backends/platform/wince/CEgui/ToolbarHandler.cpp125
-rw-r--r--backends/platform/wince/CEgui/ToolbarHandler.h65
19 files changed, 0 insertions, 1232 deletions
diff --git a/backends/platform/wince/CEgui/CEGUI.h b/backends/platform/wince/CEgui/CEGUI.h
deleted file mode 100644
index 8b6db6b099..0000000000
--- a/backends/platform/wince/CEgui/CEGUI.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "ToolbarHandler.h"
-#include "Panel.h"
-#include "ItemSwitch.h"
-#include "PanelKeyboard.h"
diff --git a/backends/platform/wince/CEgui/GUIElement.cpp b/backends/platform/wince/CEgui/GUIElement.cpp
deleted file mode 100644
index e33e7f7f9d..0000000000
--- a/backends/platform/wince/CEgui/GUIElement.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "backends/platform/sdl/sdl-sys.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::getX() {
- return _x;
-}
-
-int GUIElement::getY() {
- return _y;
-}
-
-int GUIElement::getWidth() {
- return _width;
-}
-
-int GUIElement::getHeight() {
- return _height;
-}
-
-GUIElement::~GUIElement() {
- delete _background;
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/GUIElement.h b/backends/platform/wince/CEgui/GUIElement.h
deleted file mode 100644
index 57c6e321e7..0000000000
--- a/backends/platform/wince/CEgui/GUIElement.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_GUIELEMENT_H
-#define CEGUI_GUIELEMENT_H
-
-#include <windows.h>
-
-#include "common/scummsys.h"
-#include "common/system.h"
-
-struct SDL_Surface;
-
-namespace CEGUI {
-
-class SDL_ImageResource;
-
-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 getWidth();
- int getHeight();
- int getX();
- int getY();
- 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;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/ItemAction.cpp b/backends/platform/wince/CEgui/ItemAction.cpp
deleted file mode 100644
index 89ca48efdc..0000000000
--- a/backends/platform/wince/CEgui/ItemAction.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "ItemAction.h"
-
-namespace CEGUI {
-
-ItemAction::ItemAction(WORD reference, GUI::ActionType action) :
- PanelItem(reference) {
- _action = action;
- if (!GUI::Actions::Instance()->isEnabled(_action))
- _visible = false;
-}
-
-
-ItemAction::~ItemAction() {
-}
-
-bool ItemAction::action(int x, int y, bool pushed) {
-
- if (checkInside(x, y) && _visible && pushed) {
- GUI::Actions::Instance()->perform(_action, true);
- GUI::Actions::Instance()->perform(_action, false);
- return true;
- } else
- return false;
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/ItemAction.h b/backends/platform/wince/CEgui/ItemAction.h
deleted file mode 100644
index 8de0046d4c..0000000000
--- a/backends/platform/wince/CEgui/ItemAction.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_ITEMACTION_H
-#define CEGUI_ITEMACTION_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "gui/Actions.h"
-#include "CEgui/PanelItem.h"
-
-namespace CEGUI {
-
-class ItemAction : public PanelItem {
-public:
- ItemAction(WORD reference, GUI::ActionType action);
- virtual ~ItemAction();
- virtual bool action(int x, int y, bool pushed);
-private:
- GUI::ActionType _action;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/ItemSwitch.cpp b/backends/platform/wince/CEgui/ItemSwitch.cpp
deleted file mode 100644
index 7bb0a23a7b..0000000000
--- a/backends/platform/wince/CEgui/ItemSwitch.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "ItemSwitch.h"
-#include "SDL_ImageResource.h"
-
-namespace CEGUI {
-
-void ItemSwitch::init(WORD referenceTrue, WORD referenceFalse) {
- _backgroundTrue = _background;
- _backgroundFalse = new SDL_ImageResource();
- if (!_backgroundFalse->load(referenceFalse)) {
- delete _backgroundFalse;
- delete _background;
- _background = NULL;
- _backgroundFalse = NULL;
- }
-}
-
-ItemSwitch::ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item) :
- PanelItem(referenceTrue) {
- init(referenceTrue, referenceFalse);
- _item = item;
- _itemmax = -1;
- if (!*_item)
- _background = _backgroundFalse;
-}
-
-ItemSwitch::ItemSwitch(WORD referenceTrue, WORD referenceFalse, int *item, int max) :
- PanelItem(referenceTrue) {
- init(referenceTrue, referenceFalse);
- _itemmultiple = item;
- _itemmax = max;
- if (!*item)
- _background = _backgroundFalse;
-}
-
-ItemSwitch::~ItemSwitch() {
- delete _backgroundFalse;
-}
-
-bool ItemSwitch::action(int x, int y, bool pushed) {
-
- if (checkInside(x, y) && _visible && pushed) {
- if (_itemmax <= 0) {
- *_item = !*_item;
- if (*_item)
- _background = _backgroundTrue;
- else
- _background = _backgroundFalse;
-
- if (_panel)
- _panel->forceRedraw();
-
- return true;
- } else {
- *_itemmultiple = *_itemmultiple + 1;
- if (*_itemmultiple > _itemmax)
- *_itemmultiple = 0;
- if (*_itemmultiple)
- _background = _backgroundTrue;
- else
- _background = _backgroundFalse;
-
- if (_panel)
- _panel->forceRedraw();
-
- return true;
- }
- } else
- return false;
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/ItemSwitch.h b/backends/platform/wince/CEgui/ItemSwitch.h
deleted file mode 100644
index e54b4b1b99..0000000000
--- a/backends/platform/wince/CEgui/ItemSwitch.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_ITEMSWITCH_H
-#define CEGUI_ITEMSWITCH_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "Panel.h"
-#include "EventsBuffer.h"
-
-using GUI::Key;
-
-namespace CEGUI {
-
-class SDL_ImageResource;
-
-class ItemSwitch : public PanelItem {
-public:
- ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item);
- ItemSwitch(WORD referenceTrue, WORD referenceFalse, int *item, int max);
- virtual ~ItemSwitch();
- virtual bool action(int x, int y, bool pushed);
-private:
- void init(WORD referenceTrue, WORD referenceFalse);
- bool *_item;
- static bool _itemdummy;
- int *_itemmultiple, _itemmax;
- SDL_ImageResource *_backgroundTrue;
- SDL_ImageResource *_backgroundFalse;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/Panel.cpp b/backends/platform/wince/CEgui/Panel.cpp
deleted file mode 100644
index 273d06a054..0000000000
--- a/backends/platform/wince/CEgui/Panel.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "Panel.h"
-
-namespace CEGUI {
-
-Panel::Panel(int interleave_first, int interleave) : Toolbar() {
- _interleave = interleave;
- _currentItem = interleave_first;
-}
-
-
-bool Panel::add(const String &name, const PanelItem *item) {
- _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::const_iterator iterator;
- if (!_drawn && _visible) {
- 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::const_iterator 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::const_iterator iterator;
- bool result = false;
- if (!_visible || !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();
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/Panel.h b/backends/platform/wince/CEgui/Panel.h
deleted file mode 100644
index db38751073..0000000000
--- a/backends/platform/wince/CEgui/Panel.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_PANEL_H
-#define CEGUI_PANEL_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-#include "common/hashmap.h"
-#include "common/str.h"
-#include "common/config-manager.h"
-
-#include "PanelItem.h"
-#include "Toolbar.h"
-
-using Common::String;
-using Common::HashMap;
-
-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:
-
- typedef HashMap<String, PanelItem *, Common::IgnoreCase_Hash , Common::IgnoreCase_EqualTo> ItemMap;
-
- ItemMap _itemsMap;
- int _interleave;
- int _currentItem;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/PanelItem.cpp b/backends/platform/wince/CEgui/PanelItem.cpp
deleted file mode 100644
index 186b5161ef..0000000000
--- a/backends/platform/wince/CEgui/PanelItem.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#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;
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/PanelItem.h b/backends/platform/wince/CEgui/PanelItem.h
deleted file mode 100644
index a0a72c2525..0000000000
--- a/backends/platform/wince/CEgui/PanelItem.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_PANELITEM_H
-#define CEGUI_PANELITEM_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;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/PanelKeyboard.cpp b/backends/platform/wince/CEgui/PanelKeyboard.cpp
deleted file mode 100644
index 34ba8d6473..0000000000
--- a/backends/platform/wince/CEgui/PanelKeyboard.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "backends/platform/sdl/sdl-sys.h"
-#include "PanelKeyboard.h"
-
-namespace CEGUI {
-
-const char KEYBOARD_MAPPING_ALPHA[][14] = { {"abcdefghijklm"}, {"nopqrstuvwxyz"} };
-const char KEYBOARD_MAPPING_NUMERIC[][6] = { {"12345"}, {"67890"} };
-const int KEYBOARD_MAPPING_SPECIAL[][3][2] = { { {1, SDLK_ESCAPE}, {224, SDLK_UP}, {32, SDLK_SPACE} },
- { {224, SDLK_LEFT}, {224, SDLK_DOWN}, {224, SDLK_RIGHT} }
-};
-
-PanelKeyboard::PanelKeyboard(WORD reference) : Toolbar() {
- setBackground(reference);
- _state = false;
- _lastKey.setKey(0);
-}
-
-
-PanelKeyboard::~PanelKeyboard() {
-}
-
-bool PanelKeyboard::action(int x, int y, bool pushed) {
- Key key;
-
- if (checkInside(x, y)) {
- int keyAscii = 0;
- int keyCode = 0;
- if (x < 185) {
- // Alpha selection
- keyCode = keyAscii = KEYBOARD_MAPPING_ALPHA[y >= _y + 20][((x + 10) / 14) - 1];
- } else if (x >= 186 && x <= 255) {
- // Numeric selection
- keyCode = keyAscii = KEYBOARD_MAPPING_NUMERIC[y >= _y + 20][((x - 187 + 10) / 14) - 1];
- } else if (x >= 258 && x <= 300) {
- // Special keys
- keyAscii = KEYBOARD_MAPPING_SPECIAL[y >= _y + 20][((x - 259 + 10) / 14) - 1][0];
- keyCode = KEYBOARD_MAPPING_SPECIAL[y >= _y + 20][((x - 259 + 10) / 14) - 1][1];
- } else if (x >= 302 && x <= 316) {
- if (y < _y + 20) {
- // Backspace
- keyAscii = VK_BACK;
- keyCode = keyAscii;
- } else {
- // Enter
- keyAscii = 13;
- keyCode = 13;
- }
- }
-
- if (keyAscii != 0) {
- if (_state && pushed && keyCode != _lastKey.keycode()) // if cursor is still down and off the current key
- return false;
- else if (_state && !pushed && keyCode != _lastKey.keycode()) { // cursor is up but off the current key
- keyAscii = _lastKey.ascii();
- keyCode = _lastKey.keycode();
- }
- _state = pushed;
- _lastKey.setKey(keyAscii, tolower(keyCode));
-
- key.setKey(keyAscii, tolower(keyCode));
- return EventsBuffer::simulateKey(&key, pushed);
- } else if (_state && !pushed) { // cursor is in some forbidden region and is up
- _state = false;
- key = _lastKey;
- return EventsBuffer::simulateKey(&key, false);
- } else
- return false;
- } else if (_state && !pushed) { // cursor left the keyboard area and is up
- _state = false;
- key = _lastKey;
- return EventsBuffer::simulateKey(&key, false);
- } else
- return false;
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/PanelKeyboard.h b/backends/platform/wince/CEgui/PanelKeyboard.h
deleted file mode 100644
index a0daca81e3..0000000000
--- a/backends/platform/wince/CEgui/PanelKeyboard.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_PANELKEYBOARD_H
-#define CEGUI_PANELKEYBOARD_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "Toolbar.h"
-#include "EventsBuffer.h"
-
-using GUI::Key;
-using CEKEYS::EventsBuffer;
-
-namespace CEGUI {
-
-class PanelKeyboard : public Toolbar {
-public:
- PanelKeyboard(WORD reference);
- virtual ~PanelKeyboard();
- virtual bool action(int x, int y, bool pushed);
-private:
- bool _state;
- Key _lastKey;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/SDL_ImageResource.cpp b/backends/platform/wince/CEgui/SDL_ImageResource.cpp
deleted file mode 100644
index ec430fc848..0000000000
--- a/backends/platform/wince/CEgui/SDL_ImageResource.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "backends/platform/sdl/sdl-sys.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);
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/SDL_ImageResource.h b/backends/platform/wince/CEgui/SDL_ImageResource.h
deleted file mode 100644
index 4fd7932743..0000000000
--- a/backends/platform/wince/CEgui/SDL_ImageResource.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_SDL_IMAGERESOURCE_H
-#define CEGUI_SDL_IMAGERESOURCE_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-
-struct SDL_Surface;
-
-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;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/Toolbar.cpp b/backends/platform/wince/CEgui/Toolbar.cpp
deleted file mode 100644
index 9e04a30210..0000000000
--- a/backends/platform/wince/CEgui/Toolbar.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "Toolbar.h"
-
-namespace CEGUI {
-
-// Not to be drawn on game screen !
-Toolbar::Toolbar() : GUIElement(0, 0, 320, 40) {
-}
-
-
-Toolbar::~Toolbar() {
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/Toolbar.h b/backends/platform/wince/CEgui/Toolbar.h
deleted file mode 100644
index d0ac2cdcb3..0000000000
--- a/backends/platform/wince/CEgui/Toolbar.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_TOOLBAR_H
-#define CEGUI_TOOLBAR_H
-
-#include "common/scummsys.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();
-
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/ToolbarHandler.cpp b/backends/platform/wince/CEgui/ToolbarHandler.cpp
deleted file mode 100644
index 534b338cdb..0000000000
--- a/backends/platform/wince/CEgui/ToolbarHandler.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "backends/platform/sdl/sdl-sys.h"
-#include "ToolbarHandler.h"
-
-namespace CEGUI {
-
-ToolbarHandler::ToolbarHandler():
- _current(""), _active(NULL) {
-}
-
-
-bool ToolbarHandler::add(const String &name, const Toolbar &toolbar) {
- _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;
- _active->action(0, 0, false); // make sure any items are unpushed when changing toolbars (e.g. forced VK->main panel)
- _current = name;
- _active = _toolbarMap[name];
- _active->forceRedraw();
- return true;
-}
-
-bool ToolbarHandler::action(int x, int y, bool pushed) {
- if (_active && _active->visible()) {
- // FIXME !
- if (_offset > 240)
- return _active->action(x / 2, (y - _offset) / 2, pushed);
- else
- return _active->action(x, y - _offset, 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->getX();
- rect->y = _active->getY();
- rect->w = _active->getWidth();
- rect->h = _active->getHeight();
- }
- return result;
- } else
- return false;
-}
-
-void ToolbarHandler::setOffset(int offset) {
- _offset = offset;
-}
-
-int ToolbarHandler::getOffset() {
- return _offset;
-}
-
-Toolbar *ToolbarHandler::active() {
- return _active;
-}
-
-ToolbarHandler::~ToolbarHandler() {
- _toolbarMap.clear();
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/ToolbarHandler.h b/backends/platform/wince/CEgui/ToolbarHandler.h
deleted file mode 100644
index 36f4022bd8..0000000000
--- a/backends/platform/wince/CEgui/ToolbarHandler.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_TOOLBARHANDLER_H
-#define CEGUI_TOOLBARHANDLER_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-#include "common/str.h"
-#include "common/hashmap.h"
-#include "common/config-manager.h"
-
-#include "Toolbar.h"
-
-using Common::String;
-using Common::HashMap;
-
-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();
- void setOffset(int offset);
- int getOffset();
- bool draw(SDL_Surface *surface, SDL_Rect *rect);
- bool drawn();
- Toolbar *active();
- virtual ~ToolbarHandler();
-private:
-
- HashMap<String, Toolbar *, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _toolbarMap;
- String _current;
- Toolbar *_active;
- int _offset;
-};
-
-} // End of namespace CEGUI
-
-#endif