diff --git a/src/archivers/lha/slide.cpp b/src/archivers/lha/slide.cpp
index e779d505..9012d5f1 100644
--- a/src/archivers/lha/slide.cpp
+++ b/src/archivers/lha/slide.cpp
@@ -118,7 +118,7 @@ static unsigned int hval;
static int matchlen;
static unsigned int matchpos;
static unsigned int pos;
-//static unsigned int remainder;
+static unsigned int remainder;
#if 0
/* ------------------------------------------------------------------------ */
diff --git a/src/cfgfile.cpp b/src/cfgfile.cpp
index e3056ccc..75b4ec12 100644
--- a/src/cfgfile.cpp
+++ b/src/cfgfile.cpp
@@ -31,6 +31,8 @@
#include "blkdev.h"
#include "calc.h"
+#include "SDL_keysym.h"
+
static int config_newfilesystem;
static struct strlist *temp_lines;
static struct zfile *default_file, *configstore;
diff --git a/src/drawing.cpp b/src/drawing.cpp
index 9be6df29..d2fff6da 100644
--- a/src/drawing.cpp
+++ b/src/drawing.cpp
@@ -71,7 +71,7 @@ bool ham_drawn = false;
coordinates have a lower resolution (i.e. we're shrinking the image). */
static int res_shift;
-extern SDL_Surface *screenSurface;
+extern SDL_Surface *prSDLScreen;
/* Lookup tables for dual playfields. The dblpf_*1 versions are for the case
that playfield 1 has the priority, dbplpf_*2 are used if playfield 2 has
diff --git a/src/guisan/libguisan.a b/src/guisan/libguisan.a
deleted file mode 100644
index 766ed125..00000000
Binary files a/src/guisan/libguisan.a and /dev/null differ
diff --git a/src/include/guisan.hpp b/src/include/guisan.hpp
deleted file mode 100644
index b6492718..00000000
--- a/src/include/guisan.hpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qk
ws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "guisan/platform.hpp"
-
-class Widget;
-
-extern "C"
-{
- /**
- * Gets the the version of Guisan. As it is a C function
- * it can be used to check for Guichan with autotools.
- *
- * @return the version of Guisan.
- */
- GCN_CORE_DECLSPEC extern const char* gcnGuisanVersion();
-}
-
-#endif // end GCN_GUISAN_HPP
diff --git a/src/include/guisan/actionevent.hpp b/src/include/guisan/actionevent.hpp
deleted file mode 100644
index 52a4319c..00000000
--- a/src/include/guisan/actionevent.hpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-namespace gcn
-{
- class Widget;
-
- /**
- * Represents an action event.
- *
- * @author Olof Naessén
- * @since 0.6.0
- */
- class GCN_CORE_DECLSPEC ActionEvent: public Event
- {
- public:
-
- /**
- * Constructor.
- *
- * @param source the source widget of the event.
- * @param id the identifier of the event.
- */
- ActionEvent(Widget* source, const std::string& id);
-
- /**
- * Destructor.
- */
- virtual ~ActionEvent();
-
- /**
- * Gets the id of the event.
- *
- * @return the id of the event.
- */
- const std::string& getId() const;
-
- protected:
- std::string mId;
- };
-}
-
-#endif // GCN_ACTIONEVENT_HPP
-
diff --git a/src/include/guisan/actionlistener.hpp b/src/include/guisan/actionlistener.hpp
deleted file mode 100644
index eff7e9ed..00000000
--- a/src/include/guisan/actionlistener.hpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/actionevent.hpp"
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- /**
- * Listener of action events from Widgets. To be able to
- * listen for actions you must make a class which inherits
- * from this class and implements the action function.
- *
- * @see Widget::addActionListener
- * @author Olof Naessén
- * @author Per Larsson
- */
- class GCN_CORE_DECLSPEC ActionListener
- {
- public:
-
- /**
- * Destructor.
- */
- virtual ~ActionListener() { }
-
- /**
- * Called when an action is recieved from a Widget. It is used
- * to be able to recieve a notification that an action has
- * occured.
- *
- * @param actionEvent the event of the action.
- * @since 0.6.0
- */
- virtual void action(const ActionEvent& actionEvent) = 0;
-
- };
-}
-
-#endif // end GCN_ACTIONLISTENER_HPP
diff --git a/src/include/guisan/basiccontainer.hpp b/src/include/guisan/basiccontainer.hpp
deleted file mode 100644
index 6c12c6ba..00000000
--- a/src/include/guisan/basiccontainer.hpp
+++ /dev/null
@@ -1,159 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/deathlistener.hpp"
-#include "guisan/platform.hpp"
-#include "guisan/widget.hpp"
-
-namespace gcn
-{
- /**
- * Implements basic container behaviour. Most container will suffice by
- * inheriting from this class.
- *
- * @see Container
- */
- class GCN_CORE_DECLSPEC BasicContainer : public Widget, public DeathListener
- {
- public:
- /**
- * Destructor
- */
- virtual ~BasicContainer();
-
-
- // Inherited from Widget
-
- virtual void moveToTop(Widget* widget);
-
- virtual void moveToBottom(Widget* widget);
-
- virtual Rectangle getChildrenArea();
-
- virtual void focusNext();
-
- virtual void focusPrevious();
-
- virtual void logic();
-
- virtual void _setFocusHandler(FocusHandler* focusHandler);
-
- void setInternalFocusHandler(FocusHandler* focusHandler);
-
- virtual void showWidgetPart(Widget* widget, Rectangle area);
-
- virtual Widget *getWidgetAt(int x, int y);
-
-
- // Inherited from DeathListener
-
- virtual void death(const Event& event);
-
- protected:
- /**
- * Adds a widget to the basic container.
- *
- * @param widget the widget to add.
- */
- void add(Widget* widget);
-
- /**
- * Removes a widget from the basic container.
- *
- * @param widget the widget to remove.
- */
- virtual void remove(Widget* widget);
-
- /**
- * Clears the basic container from all widgets.
- */
- virtual void clear();
-
- /**
- * Draws children widgets.
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void drawChildren(Graphics* graphics);
-
- /**
- * Calls logic for children widgets.
- */
- virtual void logicChildren();
-
- /**
- * Finds a widget given an id.
- *
- * @param id the id to find a widget by.
- * @return the widget with the corrosponding id,
- NULL of no widget is found.
- */
- virtual Widget* findWidgetById(const std::string& id);
-
- typedef std::list WidgetList;
- typedef WidgetList::iterator WidgetListIterator;
- typedef WidgetList::reverse_iterator WidgetListReverseIterator;
-
- WidgetList mWidgets;
- };
-}
-
-#endif // end GCN_BASICCONTAINER_HPP
diff --git a/src/include/guisan/cliprectangle.hpp b/src/include/guisan/cliprectangle.hpp
deleted file mode 100644
index dc1190a5..00000000
--- a/src/include/guisan/cliprectangle.hpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/event.hpp"
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- /**
- * Listener of death events from Widgets. To be able to
- * listen for deaths you must make a class which inherits
- * from this class and implements the death function.
- *
- * @see Widget::addDeathListener
- * @author Olof Naessén
- * @since 0.6.0
- */
- class GCN_CORE_DECLSPEC DeathListener
- {
- public:
-
- /**
- * Destructor.
- */
- virtual ~DeathListener() { }
-
- /**
- * Called when a widget dies. It is used to be able to recieve
- * a notification when a death of a widget occurs.
- *
- * @param event the event of the death.
- */
- virtual void death(const Event& event) = 0;
-
- };
-}
-
-#endif // end GCN_DEATHLISTENER_HPP
diff --git a/src/include/guisan/defaultfont.hpp b/src/include/guisan/defaultfont.hpp
deleted file mode 100644
index 544ae0f8..00000000
--- a/src/include/guisan/defaultfont.hpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/platform.hpp"
-
-
-#ifdef _MSC_VER
-#if _MSC_VER <= 1200
-#define __FUNCTION__ "?"
-#endif
-#endif
-
-/*
- * A macro to be used when throwing exceptions.
- * What it basicly does is that it creates a new exception
- * and automatically sets the filename and line number where
- * the exception occured.
- */
-#define GCN_EXCEPTION(mess) gcn::Exception(mess, \
- __FUNCTION__, \
- __FILE__, \
- __LINE__)
-
-namespace gcn
-{
-
- /**
- * An exception containing a message, a file and a line number.
- * Guichan will only throw exceptions of this class. You can use
- * this class for your own exceptions. A nifty feature of the
- * excpetion class is that it can tell you from which line and
- * file it was thrown. To make things easier when throwing
- * exceptions there exists a macro for creating exceptions
- * which automatically sets the filename and line number.
- *
- * EXAMPLE: @code
- * throw GCN_EXCEPTION("my error message");
- * @endcode
- */
- class GCN_CORE_DECLSPEC Exception
- {
- public:
-
- /**
- * Constructor.
- */
- Exception();
-
- /**
- * Constructor.
- *
- * @param message the error message.
- */
- Exception(const std::string& message);
-
- /**
- * Constructor.
- *
- * NOTE: Don't use this constructor. Use the GCN_EXCEPTION macro instead.
- *
- * @param message the error message.
- * @param function the function name.
- * @param filename the name of the file.
- * @param line the line number.
- */
- Exception(const std::string& message,
- const std::string& function,
- const std::string& filename,
- int line);
-
- /**
- * Gets the function name in which the exception was thrown.
- *
- * @return the function name in which the exception was thrown.
- */
- const std::string& getFunction() const;
-
- /**
- * Gets the error message of the exception.
- *
- * @return the error message.
- */
- const std::string& getMessage() const;
-
- /**
- * Gets the filename in which the exceptions was thrown.
- *
- * @return the filename in which the exception was thrown.
- */
- const std::string& getFilename() const;
-
- /**
- * Gets the line number of the line where the exception was thrown.
- *
- * @return the line number of the line where the exception was thrown.
- */
- int getLine() const;
-
- protected:
- std::string mFunction;
- std::string mMessage;
- std::string mFilename;
- int mLine;
- };
-}
-
-#endif // end GCN_EXCEPTION_HPP
-
-/*
- * "Final Fantasy XI is the BEST!... It's even better then water!"
- * - Astrolite
- * I believe it's WoW now days.
- */
diff --git a/src/include/guisan/focushandler.hpp b/src/include/guisan/focushandler.hpp
deleted file mode 100644
index f9fdd90b..00000000
--- a/src/include/guisan/focushandler.hpp
+++ /dev/null
@@ -1,322 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/event.hpp"
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- class Widget;
-
- /**
- * Used to keep track of widget focus. You will probably not have
- * to use the FocusHandler directly to handle focus. Widget has
- * functions for handling focus which uses a FocusHandler. Use them
- * instead.
- *
- * @see Widget::isFocused
- * @see Widget::requestFocus
- * @see Widget::setFocusable
- * @see Widget::isFocusable
- * @see FocusListener
- */
- class GCN_CORE_DECLSPEC FocusHandler
- {
- public:
-
- /**
- * Constructor.
- */
- FocusHandler();
-
- /**
- * Destructor.
- */
- virtual ~FocusHandler() { };
-
- /**
- * Sets focus to a widget. A focus event will also be sent to the widget's
- * focus listeners.
- *
- * @param widget the widget to focus.
- */
- virtual void requestFocus(Widget* widget);
-
- /**
- * Sets modal focus to a widget.
- *
- * @param widget the Widget to focus modal.
- * @throws Exception when another widget already has modal focus.
- */
- virtual void requestModalFocus(Widget* widget);
-
- /**
- * Releases modal focus if the widget has modal focus.
- * Otherwise nothing will be done.
- *
- * @param widget the Widget to release modal focus for.
- */
- virtual void releaseModalFocus(Widget* widget);
-
- /**
- * Sets modal mouse input focus to a widget. Modal mouse input focus means
- * no other widget then the widget with modal mouse input focus will
- * receive mouse input..
- * The widget with modal mouse input focus will also receive mouse input no
- * matter what the mouse input is or where the mouse input occurs.
- *
- * @param widget the widget to focus for modal mouse input focus.
- * @throws Exception when another widget already has modal mouse input focus.
- */
- virtual void requestModalMouseInputFocus(Widget* widget);
-
- /**
- * Releases modal mouse input focus if the widget has modal mouse input
- * focus. Otherwise nothing will be done.
- *
- * @param widget the widget to release modal mouse input focus for.
- */
- virtual void releaseModalMouseInputFocus(Widget* widget);
-
- /**
- * Gets the widget with focus.
- *
- * @return the Widget with focus. NULL will be returned if
- * no Widget has focus.
- */
- virtual Widget* getFocused() const;
-
- /**
- * Gets the widget with modal focus.
- *
- * @return the Widget with modal focus. NULL will be returned
- * if no Widget has modal focus.
- */
- virtual Widget* getModalFocused() const;
-
- /**
- * Gets the widget with modal mouse input focus.
- *
- * @return the widget with modal mouse input focus. NULL will be returned
- * if no widget has modal mouse input focus.
- */
- virtual Widget* getModalMouseInputFocused() const;
-
- /**
- * Focuses the next Widget. If no Widget has focus the first
- * Widget gets focus. The order in which the Widgets are focused
- * depends on the order you add them to the GUI.
- */
- virtual void focusNext();
-
- /**
- * Focuses the previous Widget. If no Widget has focus the first
- * Widget gets focus. The order in which the widgets are focused
- * depends on the order you add them to the GUI.
- */
- virtual void focusPrevious();
-
- /**
- * Checks if a Widget is focused.
- *
- * @param widget widget to check if it is focused.
- * @return true if the widget is focused.
- */
- virtual bool isFocused(const Widget* widget) const;
-
- /**
- * Adds a widget to the FocusHandler.
- *
- * @param widget the widget to add.
- */
- virtual void add(Widget* widget);
-
- /**
- * Removes a widget from the FocusHandler.
- *
- * @param widget the widget to remove.
- */
- virtual void remove(Widget* widget);
-
- /**
- * Focuses nothing. A focus event will also be sent to the focused widget's
- * focus listeners if a widget has focus.
- */
- virtual void focusNone();
-
- /**
- * Focuses the next Widget which allows tab in unless current focused
- * Widget disallows tab out.
- */
- virtual void tabNext();
-
- /**
- * Focuses the previous Widget which allows tab in unless current focused
- * Widget disallows tab out.
- */
- virtual void tabPrevious();
-
- /**
- * Gets the widget being dragged.
- *
- * @return the widget being dragged.
- */
- virtual Widget* getDraggedWidget();
-
- /**
- * Sets the widget being dragged.
- *
- * @param draggedWidget the widget being dragged.
- */
- virtual void setDraggedWidget(Widget* draggedWidget);
-
- /**
- * Gets the last widget with the mouse.
- *
- * @return the last widget with the mouse.
- */
- virtual Widget* getLastWidgetWithMouse();
-
- /**
- * Sets the last widget with the mouse.
- *
- * @param lastWidgetWithMouse the last widget with the mouse.
- */
- virtual void setLastWidgetWithMouse(Widget* lastWidgetWithMouse);
-
- /**
- * Gets the last widget with modal focus.
- *
- * @return the last widget with modal focus.
- */
- virtual Widget* getLastWidgetWithModalFocus();
-
- /**
- * Sets the last widget with modal focus.
- *
- * @param lastWidgetWithModalFocus the last widget with modal focus.
- */
- virtual void setLastWidgetWithModalFocus(Widget* lastWidgetWithModalFocus);
-
- /**
- * Gets the last widget with modal mouse input focus.
- *
- * @return the last widget with modal mouse input focus.
- */
- virtual Widget* getLastWidgetWithModalMouseInputFocus();
-
- /**
- * Sets the last widget with modal mouse input focus.
- *
- * @param lastMouseWithModalMouseInputFocus the last widget with modal mouse input focus.
- */
- virtual void setLastWidgetWithModalMouseInputFocus(Widget* lastWidgetWithModalMouseInputFocus);
-
- /**
- * Gets the last widget pressed.
- *
- * @return the last widget pressed.
- */
- virtual Widget* getLastWidgetPressed();
-
- /**
- * Sets the last widget pressed.
- *
- * @param lastWidgetPressed the last widget pressed.
- */
- virtual void setLastWidgetPressed(Widget* lastWidgetPressed);
-
- protected:
- /**
- * Distributes a focus lost event.
- *
- * @param focusEvent the event to distribute.
- * @author Olof Naessén
- * @since 0.7.0
- */
- virtual void distributeFocusLostEvent(const Event& focusEvent);
-
- /**
- * Distributes a focus gained event.
- *
- * @param focusEvent the event to distribute.
- * @author Olof Naessén
- * @since 0.7.0
- */
- virtual void distributeFocusGainedEvent(const Event& focusEvent);
-
- typedef std::vector WidgetVector;
- typedef WidgetVector::iterator WidgetIterator;
- WidgetVector mWidgets;
-
- Widget* mFocusedWidget;
- Widget* mModalFocusedWidget;
- Widget* mModalMouseInputFocusedWidget;
-
- Widget* mDraggedWidget;
- Widget* mLastWidgetWithMouse;
- Widget* mLastWidgetWithModalFocus;
- Widget* mLastWidgetWithModalMouseInputFocus;
- Widget* mLastWidgetPressed;
- };
-}
-
-#endif // end GCN_FOCUSHANDLER_HPP
diff --git a/src/include/guisan/focuslistener.hpp b/src/include/guisan/focuslistener.hpp
deleted file mode 100644
index e57a8e87..00000000
--- a/src/include/guisan/focuslistener.hpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/event.hpp"
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- /**
- * Listener of focus events from Widgets. To be able to listen for
- * focus events you must make a class which inherits from this class
- * and implements it's functions.
- *
- * @see Widget::addFocusListener
- * @author Olof Naessén
- * @since 0.7.0
- */
- class GCN_CORE_DECLSPEC FocusListener
- {
- public:
-
- /**
- * Destructor.
- */
- virtual ~FocusListener() { }
-
- /**
- * Called when a widget gains focus.
- *
- * @param event discribes the event.
- */
- virtual void focusGained(const Event& event) { };
-
- /**
- * Called when a widget loses focus.
- *
- * @param event discribes the event.
- */
- virtual void focusLost(const Event& event) { };
- };
-}
-
-#endif // end GCN_FOCUSLISTENER_HPP
diff --git a/src/include/guisan/font.hpp b/src/include/guisan/font.hpp
deleted file mode 100644
index 7ea02cd2..00000000
--- a/src/include/guisan/font.hpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- class Graphics;
-
- /**
- * Holder of a font. Fonts should inherit from this class and
- * implements it's functions.
- *
- * @see ImageFont
- */
- class GCN_CORE_DECLSPEC Font
- {
- public:
-
- /**
- * Destructor.
- */
- virtual ~Font(){ }
-
- /**
- * Gets the width of a string. The width of a string is not necesserily
- * the sum of all the widths of it's glyphs.
- *
- * @param text the string to return the width of.
- * @return the width of a string.
- */
- virtual int getWidth(const std::string& text) const = 0;
-
- /**
- * Gets the height of the glyphs in the font.
- *
- * @return the height of the glyphs int the font.
- */
- virtual int getHeight() const = 0;
-
- /**
- * Gets a string index in a string providing an x coordinate.
- * Used to retrive a string index (for a character in a
- * string) at a certain x position. It is especially useful
- * when a mouse clicks in a TextField and you want to know which
- * character was clicked.
- *
- * @return a string index in a string providing an x coordinate.
- */
- virtual int getStringIndexAt(const std::string& text, int x);
-
- /**
- * Draws a string.
- *
- * NOTE: You normally won't use this function to draw text since
- * Graphics contains better functions for drawing text.
- *
- * @param graphics a Graphics object to use for drawing.
- * @param text the string to draw.
- * @param x the x coordinate where to draw the string.
- * @param y the y coordinate where to draw the string.
- */
- virtual void drawString(Graphics* graphics, const std::string& text,
- int x, int y) = 0;
- };
-}
-
-#endif // end GCN_FONT_HPP
diff --git a/src/include/guisan/genericinput.hpp b/src/include/guisan/genericinput.hpp
deleted file mode 100644
index 54e28d1a..00000000
--- a/src/include/guisan/genericinput.hpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/input.hpp"
-#include "guisan/keyinput.hpp"
-#include "guisan/mouseinput.hpp"
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- class Key;
-
- /**
- * Generic input which can be used with any backend.
- */
- class GCN_CORE_DECLSPEC GenericInput: public Input
- {
- public:
-
- /**
- * Constructor.
- */
- GenericInput();
-
- /**
- * Pushes a key pressed event.
- *
- * NOTE: If a special key is pressed, like the F1 key,
- * the corresponding Guichan key value found
- * in the enum in Key should be pushed as the
- * unicode value.
- *
- * @param unicode the unicode value of the key.
- */
- void pushKeyPressed(int unicode);
-
- /**
- * Pushes a key released event.
- *
- * NOTE: If a special key is pressed, like the F1 key,
- * the corresponding Guichan key value found
- * in the enum in Key should be pushed as the
- * unicode value.
- *
- * @param unicode the unicode value of the key.
- */
- void pushKeyReleased(int unicode);
-
- /**
- * Pushes a mouse button pressed event.
- *
- * @param x the x coordinate of the mouse event.
- * @param y the y coordinate of the mouse event.
- * @param button the button of the mouse event.
- */
- void pushMouseButtonPressed(int x, int y, int button);
-
- /**
- * Pushes a mouse button released event.
- *
- * @param x the x coordinate of the mouse event.
- * @param y the y coordinate of the mouse event.
- * @param button the button of the mouse event.
- */
- void pushMouseButtonReleased(int x, int y, int button);
-
- /**
- * Pushes a mouse wheel moved up event.
- *
- * @param x the x coordinate of the mouse event.
- * @param y the y coordinate of the mouse event.
- */
- void pushMouseWheelMovedUp(int x, int y);
-
- /**
- * Pushes a mouse wheel moved down event.
- *
- * @param x the x coordinate of the mouse event.
- * @param y the y coordinate of the mouse event.
- */
- void pushMouseWheelMovedDown(int x, int y);
-
- /**
- * Pushes a mouse moved event.
- *
- * @param x the x coordinate of the mouse event.
- * @param y the y coordinate of the mouse event.
- */
- void pushMouseMoved(int x, int y);
-
-
- // Inherited from Input
-
- virtual bool isKeyQueueEmpty();
-
- virtual KeyInput dequeueKeyInput();
-
- virtual bool isMouseQueueEmpty();
-
- virtual MouseInput dequeueMouseInput();
-
- virtual void _pollInput();
-
- protected:
- std::queue mKeyInputQueue;
- std::queue mMouseInputQueue;
- };
-}
-
-#endif // end GCN_INPUT_HPP
diff --git a/src/include/guisan/glut.hpp b/src/include/guisan/glut.hpp
deleted file mode 100644
index 59c5647d..00000000
--- a/src/include/guisan/glut.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "platform.hpp"
-
-extern "C"
-{
- /**
- * Exists to be able to check for Guichan GLUT with autotools.
- */
- GCN_EXTENSION_DECLSPEC extern void gcnGLUT();
-}
-
-#endif // end GCN_GLUT_HPP
diff --git a/src/include/guisan/graphics.hpp b/src/include/guisan/graphics.hpp
deleted file mode 100644
index b673dbd8..00000000
--- a/src/include/guisan/graphics.hpp
+++ /dev/null
@@ -1,280 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-#include
-
-#include "guisan/cliprectangle.hpp"
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- class Color;
- class Font;
- class Image;
-
- /**
- * Used for drawing graphics. It contains all vital functions for drawing.
- * We include implemented Graphics classes for some common platforms like
- * the Allegro library, the OpenGL library and the SDL library. To make
- * Guichan usable under another platform, a Graphics class must be
- * implemented.
- *
- * In Graphics you can set clip areas to limit drawing to certain
- * areas of the screen. Clip areas are put on a stack, which means that you
- * can push smaller and smaller clip areas onto the stack. All coordinates
- * will be relative to the topmost clip area. In most cases you won't have
- * to worry about the clip areas, unless you want to implement some really
- * complex widget. Pushing and poping of clip areas are handled
- * automatically by container widgets when their child widgets are drawn.
- *
- * IMPORTANT: Remember to pop each clip area that you pushed on the stack
- * after you are done with it.
- *
- * If you feel that Graphics is to restrictive for your needs, there is
- * no one stopping you from using your own code for drawing in Widgets.
- * You could for instance use pure SDL in the drawing of Widgets bypassing
- * Graphics. This might however hurt portability of your application.
- *
- * If you implement a Graphics class not present in Guichan we would be very
- * happy to add it to Guichan.
- *
- * @see AllegroGraphics, OpenGLGraphics, SDLGraphics, Image
- */
- class GCN_CORE_DECLSPEC Graphics
- {
- public:
- Graphics();
-
- virtual ~Graphics() { }
-
- /**
- * Initializes drawing. Called by the Gui when Gui::draw() is called.
- * It is needed by some implementations of Graphics to perform
- * preparations before drawing. An example of such an implementation
- * would be OpenGLGraphics.
- *
- * NOTE: You will never need to call this function yourself.
- * Gui will do it for you.
- *
- * @see _endDraw, Gui::draw
- */
- virtual void _beginDraw() { }
-
- /**
- * Deinitializes drawing. Called by the Gui when a Gui::draw() is done.
- * done. It should reset any state changes made by _beginDraw().
- *
- * NOTE: You will never need to call this function yourself.
- * Gui will do it for you.
- *
- * @see _beginDraw, Gui::draw
- */
- virtual void _endDraw() { }
-
- /**
- * Pushes a clip area onto the stack. The x and y coordinates in the
- * Rectangle will be relative to the last pushed clip area.
- * If the new area falls outside the current clip area, it will be
- * clipped as necessary.
- *
- * @param area the clip area to be pushed onto the stack.
- * @return false if the the new area lays totally outside the
- * current clip area. Note that an empty clip area
- * will be pused in this case.
- */
- virtual bool pushClipArea(Rectangle area);
-
- /**
- * Removes the topmost clip area from the stack.
- *
- * @throws Exception if the stack is empty.
- */
- virtual void popClipArea();
-
- /**
- * Gets the current clip area. Usefull if you want to do drawing
- * bypassing Graphics.
- *
- * @return the current clip area.
- */
- virtual const ClipRectangle& getCurrentClipArea();
-
- /**
- * Draws a part of an Image.
- *
- * NOTE: Width and height arguments will not scale the Image but
- * specifies the size of the part to be drawn. If you want
- * to draw the whole Image there is a simplified version of
- * this function.
- *
- * EXAMPLE: @code drawImage(myImage, 10, 10, 20, 20, 40, 40); @endcode
- * Will draw a rectangular piece of myImage starting at
- * coordinate (10, 10) in myImage, with width and height 40.
- * The piece will be drawn with it's top left corner at
- * coordinate (20, 20).
- *
- * @param image the Image to draw.
- * @param srcX source Image x coordinate.
- * @param srcY source Image y coordinate.
- * @param dstX destination x coordinate.
- * @param dstY destination y coordinate.
- * @param width the width of the piece.
- * @param height the height of the piece.
- */
- virtual void drawImage(const Image* image, int srcX, int srcY,
- int dstX, int dstY, int width,
- int height) = 0;
- /**
- * Draws an image. A simplified version of the other drawImage.
- * It will draw a whole image at the coordinate you specify.
- * It is equivalent to calling:
- * @code drawImage(myImage, 0, 0, dstX, dstY, image->getWidth(), \
- image->getHeight()); @endcode
- */
- virtual void drawImage(const Image* image, int dstX, int dstY);
-
- /**
- * Draws a single point/pixel.
- *
- * @param x the x coordinate.
- * @param y the y coordinate.
- */
- virtual void drawPoint(int x, int y) = 0;
-
- /**
- * Ddraws a line.
- *
- * @param x1 the first x coordinate.
- * @param y1 the first y coordinate.
- * @param x2 the second x coordinate.
- * @param y2 the second y coordinate.
- */
- virtual void drawLine(int x1, int y1, int x2, int y2) = 0;
-
- /**
- * Draws a simple, non-filled, Rectangle with one pixel width.
- *
- * @param rectangle the Rectangle to draw.
- */
- virtual void drawRectangle(const Rectangle& rectangle) = 0;
-
- /**
- * Draws a filled Rectangle.
- *
- * @param rectangle the filled Rectangle to draw.
- */
- virtual void fillRectangle(const Rectangle& rectangle) = 0;
-
- /**
- * Sets the Color to use when drawing.
- *
- * @param color a Color.
- */
- virtual void setColor(const Color& color) = 0;
-
- /**
- * Gets the Color to use when drawing.
- *
- * @return the Color used when drawing.
- */
- virtual const Color& getColor() = 0;
-
- /**
- * Sets the font to use when drawing text.
- *
- * @param font the Font to use when drawing.
- */
- virtual void setFont(Font* font);
-
- /**
- * Draws text.
- *
- * @param text the text to draw.
- * @param x the x coordinate where to draw the text.
- * @param y the y coordinate where to draw the text.
- * @param alignment Graphics::LEFT, Graphics::CENTER or Graphics::RIGHT.
- * @throws Exception when no Font is set.
- */
- virtual void drawText(const std::string& text, int x, int y,
- unsigned int alignment = LEFT);
- /**
- * Alignments for text drawing.
- */
- enum
- {
- LEFT = 0,
- CENTER,
- RIGHT
- };
-
- protected:
- std::stack mClipStack;
- Font* mFont;
- };
-}
-
-#endif // end GCN_GRAPHICS_HPP
-
-/*
- * yakslem - "little cake on cake, but that's the fall"
- * finalman - "skall jag skriva det?"
- * yakslem - "ja, varfor inte?"
- */
-
diff --git a/src/include/guisan/gui.hpp b/src/include/guisan/gui.hpp
deleted file mode 100644
index 5323173e..00000000
--- a/src/include/guisan/gui.hpp
+++ /dev/null
@@ -1,402 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-#include
-
-#include "guisan/keyevent.hpp"
-#include "guisan/mouseevent.hpp"
-#include "guisan/mouseinput.hpp"
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- class FocusHandler;
- class Graphics;
- class Input;
- class KeyListener;
- class Widget;
-
- // The following comment will appear in the doxygen main page.
- /**
- * @mainpage
- * @section Introduction
- * This documentation is mostly intended as a reference to the API. If you want to get started with Guichan, we suggest you check out the programs in the examples directory of the Guichan release.
- * @n
- * @n
- * This documentation is, and will always be, work in progress. If you find any errors, typos or inconsistencies, or if you feel something needs to be explained in more detail - don't hesitate to tell us.
- */
-
- /**
- * Gui core class. Contains a special widget called the top widget.
- * If you want to be able to have more then one Widget in your Gui,
- * the top widget should be a Container.
- *
- * NOTE: For the Gui to function properly you need to set a Graphics
- * object to use and an Input object to use.
- */
- class GCN_CORE_DECLSPEC Gui
- {
- public:
-
- /**
- * Constructor.
- */
- Gui();
-
- /**
- * Destructor.
- */
- virtual ~Gui();
-
- /**
- * Sets the top Widget.
- *
- * @param top the top Widget.
- */
- virtual void setTop(Widget* top);
-
- /**
- * Gets the top Widget.
- *
- * @return the top widget. NULL if no top widget has been set.
- */
- virtual Widget* getTop() const;
-
- /**
- * Sets the Graphics object to use for drawing.
- *
- * @param graphics the Graphics object to use for drawing.
- * @see SDLGraphics, OpenGLGraphics, AllegroGraphics
- */
- virtual void setGraphics(Graphics* graphics);
-
- /**
- * Gets the Graphics object used for drawing.
- *
- * @return the Graphics object used for drawing. NULL if no
- * Graphics object has been set.
- */
- virtual Graphics* getGraphics() const;
-
- /**
- * Sets the Input object to use for input handling.
- *
- * @param input the Input object to use for input handling.
- * @see SDLInput, AllegroInput
- */
- virtual void setInput(Input* input);
-
- /**
- * Gets the Input object being used for input handling.
- *
- * @return the Input object used for handling input. NULL if no
- * Input object has been set.
- */
- virtual Input* getInput() const;
-
- /**
- * Performs the Gui logic. By calling this function all logic
- * functions down in the Gui heirarchy will be called.
- * What performs in Logic can be just about anything like
- * adjusting a Widgets size or doing some calculations.
- *
- * NOTE: Logic also deals with user input (Mouse and Keyboard)
- * for Widgets.
- */
- virtual void logic();
-
- /**
- * Draws the Gui. By calling this funcion all draw functions
- * down in the Gui hierarchy will be called.
- */
- virtual void draw();
-
- /**
- * Focus none of the Widgets in the Gui.
- */
- virtual void focusNone();
-
- /**
- * Toggles the use of the tab key to focus Widgets.
- * By default, tabbing is enabled.
- *
- * @param tabbing set to false if you want to disable tabbing.
- */
- virtual void setTabbingEnabled(bool tabbing);
-
- /**
- * Checks if tabbing is enabled.
- *
- * @return true if tabbing is enabled.
- */
- virtual bool isTabbingEnabled();
-
- /**
- * Adds a global KeyListener to the Gui.
- *
- * @param keyListener a KeyListener to add.
- */
- virtual void addGlobalKeyListener(KeyListener* keyListener);
-
- /**
- * Remove global KeyListener from the Gui.
- *
- * @param keyListener a KeyListener to remove.
- * @throws Exception if the KeyListener hasn't been added.
- */
- virtual void removeGlobalKeyListener(KeyListener* keyListener);
-
- protected:
- /**
- * Handles all mouse input.
- *
- * @since 0.6.0
- */
- virtual void handleMouseInput();
-
- /**
- * Handles key input.
- *
- * @since 0.6.0
- */
- virtual void handleKeyInput();
-
- /**
- * Handles mouse moved input.
- *
- * @param mouseInput the mouse input to handle.
- * @since 0.6.0
- */
- virtual void handleMouseMoved(const MouseInput& mouseInput);
-
- /**
- * Handles mouse pressed input.
- *
- * @param mouseInput the mouse input to handle.
- * @since 0.6.0
- */
- virtual void handleMousePressed(const MouseInput& mouseInput);
-
- /**
- *
- * Handles mouse wheel moved down input.
- *
- * @param mouseInput the mouse input to handle.
- * @since 0.6.0
- */
- virtual void handleMouseWheelMovedDown(const MouseInput& mouseInput);
-
- /**
- * Handles mouse wheel moved up input.
- *
- * @param mouseInput the mouse input to handle.
- * @since 0.6.0
- */
- virtual void handleMouseWheelMovedUp(const MouseInput& mouseInput);
-
- /**
- * Handles mouse released input.
- *
- * @param mouseInput the mouse input to handle.
- * @since 0.6.0
- */
- virtual void handleMouseReleased(const MouseInput& mouseInput);
-
- /**
- * Handles modal focus. Modal focus needs to be checked at
- * each logic iteration as it might be necessary to distribute
- * mouse entered or mouse exited events.
- *
- * @since 0.8.0
- */
- virtual void handleModalFocus();
-
- /**
- * Handles modal mouse input focus. Modal mouse input focus needs
- * to be checked at each logic iteration as it might be necessary to
- * distribute mouse entered or mouse exited events.
- *
- * @since 0.8.0
- */
- virtual void handleModalMouseInputFocus();
-
- /**
- * Handles modal focus gained. If modal focus has been gaind it might
- * be necessary to distribute mouse entered or mouse exited events.
- *
- * @since 0.8.0
- */
- virtual void handleModalFocusGained();
-
- /**
- * Handles modal mouse input focus gained. If modal focus has been gaind
- * it might be necessary to distribute mouse entered or mouse exited events.
- *
- * @since 0.8.0
- */
- virtual void handleModalFocusReleased();
-
- /**
- * Distributes a mouse event.
- *
- * @param type The type of the event to distribute,
- * @param button The button of the event (if any used) to distribute.
- * @param x The x coordinate of the event.
- * @param y The y coordinate of the event.
- * @param fource indicates whether the distribution should be forced or not.
- * A forced distribution distributes the event even if a widget
- * is not enabled, not visible, another widget has modal
- * focus or another widget has modal mouse input focus.
- * Default value is false.
- * @param toSourceOnly indicates whether the distribution should be to the
- * source widget only or to it's parent's mouse listeners
- * as well.
- *
- * @since 0.6.0
- */
- virtual void distributeMouseEvent(Widget* source,
- int type,
- int button,
- int x,
- int y,
- bool force = false,
- bool toSourceOnly = false);
-
- /**
- * Distributes a key event.
- *
- * @param keyEvent the key event to distribute.
-
- * @since 0.6.0
- */
- virtual void distributeKeyEvent(KeyEvent& keyEvent);
-
- /**
- * Distributes a key event to the global key listeners.
- *
- * @param keyEvent the key event to distribute.
- *
- * @since 0.6.0
- */
- virtual void distributeKeyEventToGlobalKeyListeners(KeyEvent& keyEvent);
-
- /**
- * Gets the widget at a certain position.
- *
- * @return the widget at a certain position.
- * @since 0.6.0
- */
- virtual Widget* getWidgetAt(int x, int y);
-
- /**
- * Gets the source of the mouse event.
- *
- * @return the source widget of the mouse event.
- * @since 0.6.0
- */
- virtual Widget* getMouseEventSource(int x, int y);
-
- /**
- * Gets the source of the key event.
- *
- * @return the source widget of the key event.
- * @since 0.6.0
- */
- virtual Widget* getKeyEventSource();
-
- Widget* mTop;
- Graphics* mGraphics;
- Input* mInput;
- FocusHandler* mFocusHandler;
-
- bool mTabbing;
-
- typedef std::list KeyListenerList;
- typedef KeyListenerList::iterator KeyListenerListIterator;
-
- KeyListenerList mKeyListeners;
-
- // Current input state
- bool mShiftPressed;
- bool mMetaPressed;
- bool mControlPressed;
- bool mAltPressed;
-
- // Last mouse state
- unsigned int mLastMousePressButton;
- int mLastMousePressTimeStamp;
- int mLastMouseX;
- int mLastMouseY;
- int mClickCount;
- int mLastMouseDragButton;
-
- // Widget with mouse stack
- std::deque mWidgetWithMouseQueue;
- };
-}
-
-#endif // end GCN_GUI_HPP
-
-/* yakslem - "Women, it's a constant struggle."
- * finalman - "Yes, but sometimes they succeed with their guesses."
- * yaklsem - "...eh...I was talking about love."
- * finalman - "Oh...ok..."
- * An awkward silence followed.
- */
diff --git a/src/include/guisan/image.hpp b/src/include/guisan/image.hpp
deleted file mode 100644
index 37244130..00000000
--- a/src/include/guisan/image.hpp
+++ /dev/null
@@ -1,178 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- class Color;
- class ImageLoader;
-
- /**
- * Holds an image. To be able to use this class you must first set an
- * ImageLoader in Image by calling
- * @code Image::setImageLoader(myImageLoader) @endcode
- * The function is static. If this is not done, the constructor taking a
- * filename will throw an exception. The ImageLoader you use must be
- * compatible with the Graphics object you use.
- *
- * EXAMPLE: If you use SDLGraphics you should use SDLImageLoader.
- * Otherwise your program will crash in a most bizarre way.
- */
- class GCN_CORE_DECLSPEC Image
- {
- public:
-
- /**
- * Constructor.
- */
- Image();
-
- /**
- * Destructor.
- */
- virtual ~Image();
-
- /**
- * Loads an image by calling the Image class' ImageLoader.
- *
- * NOTE: The functions getPixel and putPixel are only guaranteed to work
- * before an image has been converted to display format.
- *
- * @param filename the file to load.
- * @param convertToDisplayFormat true if the image should be converted
- * to display, false otherwise.
- */
- static Image* load(const std::string& filename, bool convertToDisplayFormat = true);
-
- /**
- * Gets the ImageLoader used for loading Images.
- *
- * @return the ImageLoader used for loading Images.
- * @see SDLImageLoader, AllegroImageLoader
- */
- static ImageLoader* getImageLoader();
-
- /**
- * Sets the ImageLoader to be used for loading images.
- *
- * IMPORTANT: The ImageLoader is static and MUST be set before loading
- * images!
- *
- * @param imageLoader the ImageLoader to be used for loading images.
- * @see SDLImageLoader, AllegroImageLoader
- */
- static void setImageLoader(ImageLoader* imageLoader);
-
- /**
- * Frees an image.
- */
- virtual void free() = 0;
-
- /**
- * Gets the width of the Image.
- *
- * @return the image width
- */
- virtual int getWidth() const = 0;
-
- /**
- * Gets the height of the Image.
- *
- * @return the image height
- */
- virtual int getHeight() const = 0;
-
- /**
- * Gets the color of a pixel at coordinate (x, y) in the image.
- *
- * IMPORTANT: Only guaranteed to work before the image has been
- * converted to display format.
- *
- * @param x the x coordinate.
- * @param y the y coordinate.
- * @return the color of the pixel.
- */
- virtual Color getPixel(int x, int y) = 0;
-
- /**
- * Puts a pixel with a certain color at coordinate (x, y).
- *
- * @param x the x coordinate.
- * @param y the y coordinate.
- * @param color the color of the pixel to put.
- */
- virtual void putPixel(int x, int y, const Color& color) = 0;
-
- /**
- * Converts the image, if possible, to display format.
- *
- * IMPORTANT: Only guaranteed to work before the image has been
- * converted to display format.
- */
- virtual void convertToDisplayFormat() = 0;
-
- protected:
- static ImageLoader* mImageLoader;
- };
-}
-
-#endif // end GCN_IMAGE_HPP
diff --git a/src/include/guisan/imagefont.hpp b/src/include/guisan/imagefont.hpp
deleted file mode 100644
index fb148b08..00000000
--- a/src/include/guisan/imagefont.hpp
+++ /dev/null
@@ -1,213 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/font.hpp"
-#include "guisan/platform.hpp"
-#include "guisan/rectangle.hpp"
-
-namespace gcn
-{
- class Color;
- class Graphics;
- class Image;
-
- /**
- * A font using an image containing the font data. It implements the font
- * class. You can use any filetype for the font data as long as it can be
- * loaded with your ImageLoader.
- *
- * This are two examples of an image containing a font.
- * \image html imagefontexample.bmp
- * \image html imagefontexample2.bmp
- *
- * The Image font format works like this: The first pixel, the pixal at
- * coordinate (0,0), tells which color to look for when seperating glyphs.
- * You create an image with your glyphs and simple separates them with
- * the seperation color. When you create your ImageFont you supply the
- * constructor with the glyphs present in your image. When creating an
- * ImageFont for the image data in the first example above, the following
- * constructor call would be used.
- * @code gcn::ImageFont imageFont("fixedfont_big.bmp"," abcdefghijklmno\
-pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); @endcode
- * Noteworthy is that the first glyph actually gives the width of space.
- * Glyphs can, as seen in the second example above, be seperated with
- * horizontal lines making it possible to draw glyphs on more then one
- * line in the image. However, these vertical lines must be of one pixel
- * size!
- */
- class GCN_CORE_DECLSPEC ImageFont: public Font
- {
- public:
-
- /**
- * Constructor which takes an image file containing the font and
- * a string containing the glyphs. The glyphs in the string should
- * be in the same order as they appear in the font image.
- *
- * @param filename the filename of the image.
- * @param glyphs the glyphs found in the image.
- * @throws Exception when glyph list is incorrect or the font file is
- * corrupt or if no ImageLoader exists.
- */
- ImageFont(const std::string& filename, const std::string& glyphs);
-
- /**
- * Constructor which takes an image file containing the font and
- * two boundaries of ASCII values. The font image should include
- * all glyphs specified with the boundaries in increasing ASCII
- * order. The boundaries are inclusive.
- *
- * @param filename the filename of the image.
- * @param glyphsFrom the ASCII value of the first glyph found in the
- * image.
- * @param glyphsTo the ASCII value of the last glyph found in the
- * image.
- * @throws Exception when glyph bondaries are incorrect or the font
- * file is corrupt or if no ImageLoader exists.
- */
- ImageFont(const std::string& filename, unsigned char glyphsFrom=32,
- unsigned char glyphsTo=126);
-
- /**
- * Destructor.
- */
- virtual ~ImageFont();
-
- /**
- * Draws a glyph.
- *
- * NOTE: You normally won't use this function to draw text since
- * the Graphics class contains better functions for drawing
- * text.
- *
- * @param graphics a graphics object to be used for drawing.
- * @param glyph a glyph to draw.
- * @param x the x coordinate where to draw the glyph.
- * @param y the y coordinate where to draw the glyph.
- * @return the width of the glyph in pixels.
- * @see Graphics
- */
- virtual int drawGlyph(Graphics* graphics, unsigned char glyph,
- int x, int y);
-
- /**
- * Sets the spacing between rows in pixels. Default is 0 pixels.
- * The spacing can be negative.
- *
- * @param spacing the spacing in pixels.
- */
- virtual void setRowSpacing(int spacing);
-
- /**
- * Gets the spacing between rows in pixels.
- *
- * @return the spacing.
- */
- virtual int getRowSpacing();
-
- /**
- * Sets the spacing between letters in pixels. Default is 0 pixels.
- * The spacing can be negative.
- *
- * @param spacing the spacing in pixels
- */
- virtual void setGlyphSpacing(int spacing);
-
- /**
- * Gets the spacing between letters in pixels.
- *
- * @return the spacing.
- */
- virtual int getGlyphSpacing();
-
- /**
- * Gets a width of a glyph.
- *
- * @param glyph the glyph which width will be returned
- * @return the width of a glyph
- */
- virtual int getWidth(unsigned char glyph) const;
-
-
- // Inherited from Font
-
- virtual int getWidth(const std::string& text) const;
-
- virtual void drawString(Graphics* graphics, const std::string& text,
- int x, int y);
-
- virtual int getHeight() const;
-
- virtual int getStringIndexAt(const std::string& text, int x);
-
- protected:
- void addGlyph(unsigned char c, int &x, int &y, const Color& separator);
-
- Rectangle mGlyph[256];
- int mHeight;
- int mGlyphSpacing;
- int mRowSpacing;
- Image* mImage;
- std::string mFilename;
- };
-}
-
-#endif // end GCN_IMAGEFONT_HPP
diff --git a/src/include/guisan/imageloader.hpp b/src/include/guisan/imageloader.hpp
deleted file mode 100644
index a53c9b19..00000000
--- a/src/include/guisan/imageloader.hpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- class Image;
-
- /**
- * ImageLoaders base class. Contains basic image loading functions every
- * image loader should have. Image loaders should inherit from this
- * class and impements it's functions.
- */
- class GCN_CORE_DECLSPEC ImageLoader
- {
- public:
-
- /**
- * Destructor.
- */
- virtual ~ImageLoader() { }
-
- /**
- * Loads an image by calling the image's ImageLoader.
- *
- * NOTE: The functions getPixel and putPixel in Image are only guaranteed to
- * work before an image has been converted to display format.
- *
- * @param filename the file to load.
- * @param convertToDisplayFormat true if the image should be converted
- * to display, false otherwise.
- */
- virtual Image* load(const std::string& filename, bool convertToDisplayFormat = true) = 0;
- };
-}
-
-#endif // end GCN_IMAGELOADER_HPP
diff --git a/src/include/guisan/input.hpp b/src/include/guisan/input.hpp
deleted file mode 100644
index 33b15b99..00000000
--- a/src/include/guisan/input.hpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- /**
- * Represents a list. It is used in certain Widgets, like the ListBox, to
- * handle a list with string elements. If you want to use Widgets like
- * ListBox, you should inherit from this class and implement it's
- * functions.
- */
- class GCN_CORE_DECLSPEC ListModel
- {
-
- public:
- /**
- * Destructor.
- */
- virtual ~ListModel() { }
-
- /**
- * Gets the number of elements in the ListModel.
- *
- * @return the number of elements in the ListModel
- */
- virtual int getNumberOfElements() = 0;
-
- /**
- * Gets an element at a certain index in the list.
- *
- * @param i an index in the list.
- * @return an element as a string.
- */
- virtual std::string getElementAt(int i) = 0;
- };
-}
-
-#endif // end GCN_LISTMODEL_HPP
diff --git a/src/include/guisan/mouseevent.hpp b/src/include/guisan/mouseevent.hpp
deleted file mode 100644
index e0ed0db2..00000000
--- a/src/include/guisan/mouseevent.hpp
+++ /dev/null
@@ -1,178 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-#include
-
-#include "guisan/platform.hpp"
-
-extern "C"
-{
- /**
- * Exists to be able to check for Guichan OpenGL with autotools.
- */
- GCN_EXTENSION_DECLSPEC extern void gcnOpenGL();
-}
-
-#endif // end GCN_OPENGL_HPP
diff --git a/src/include/guisan/opengl/openglgraphics.hpp b/src/include/guisan/opengl/openglgraphics.hpp
deleted file mode 100644
index 0456234f..00000000
--- a/src/include/guisan/opengl/openglgraphics.hpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-#if defined (DELETE)
-#undef DELETE
-#endif
-#endif
-
-#if defined (__APPLE__)
-#include
-#else
-#include
-#endif
-
-#include
-
-#include "guisan/color.hpp"
-#include "guisan/platform.hpp"
-#include "guisan/image.hpp"
-
-namespace gcn
-{
- /**
- * OpenGL implementation of Image.
- */
- class GCN_EXTENSION_DECLSPEC OpenGLImage : public Image
- {
- public:
- /**
- * Constructor. Loads an image from an array of pixels. The pixel array is
- * is copied in the constructor and should thus be freed after the constructor
- * has been called.
- *
- * NOTE: The functions getPixel and putPixel are only guaranteed to work
- * before an image has been converted to display format.
- *
- * @param pixels to load from.
- * @param width the width of the image.
- * @param height the height of the image.
- * @param convertToDisplayFormat true if the image should be converted
- * to display, false otherwise.
- */
- OpenGLImage(unsigned int* pixels, int width, int height, bool convertToDisplayFormat = true);
-
- /**
- * Constructor. Load an image from an OpenGL texture handle. The width
- * and height specifies the size of the "interesting" part of the
- * texture, the real width and height of the texture are assumed to
- * be the closest higher power of two.
- *
- * @param textureHandle the texture handle from which to load.
- * @param width the width of the image.
- * @param height the height of the image.
- * @param autoFree true if the surface should automatically be deleted.
- */
- OpenGLImage(GLuint textureHandle, int width, int height, bool autoFree);
-
- /**
- * Destructor.
- */
- virtual ~OpenGLImage();
-
- /**
- * Gets the OpenGL texture handle for the image.
- *
- * @return the OpenGL texture handle for the image.
- */
-
- virtual GLuint getTextureHandle() const;
-
- /**
- * Gets the width of texture.
- *
- * @return the width of the texture.
- */
- virtual int getTextureWidth() const;
-
- /**
- * Gets the height of the texture.
- *
- * @return the height of the texture.
- */
- virtual int getTextureHeight() const;
-
-
- // Inherited from Image
-
- virtual void free();
-
- virtual int getWidth() const;
-
- virtual int getHeight() const;
-
- virtual Color getPixel(int x, int y);
-
- virtual void putPixel(int x, int y, const Color& color);
-
- virtual void convertToDisplayFormat();
-
- protected:
- GLuint mTextureHandle;
- unsigned int* mPixels;
- bool mAutoFree;
- int mWidth;
- int mHeight;
- int mTextureWidth;
- int mTextureHeight;
-
- };
-}
-
-#endif // end GCN_OPENGLIMAGE_HPP
diff --git a/src/include/guisan/opengl/openglsdlimageloader.hpp b/src/include/guisan/opengl/openglsdlimageloader.hpp
deleted file mode 100644
index a4e0dfff..00000000
--- a/src/include/guisan/opengl/openglsdlimageloader.hpp
+++ /dev/null
@@ -1,109 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include
-#include
-
-namespace gcn
-{
- class Image;
-
- /**
- * OpenGL ImageLoader that loads images with SDL.
- */
- class OpenGLSDLImageLoader : public SDLImageLoader
- {
- public:
-
- // Inherited from ImageLoader
-
- virtual Image* load(const std::string& filename,
- bool convertToDisplayFormat = true)
- {
- SDL_Surface *loadedSurface = loadSDLSurface(filename);
-
- if (loadedSurface == NULL)
- {
- throw GCN_EXCEPTION(
- std::string("Unable to load image file: ") + filename);
- }
-
- SDL_Surface *surface = convertToStandardFormat(loadedSurface);
- SDL_FreeSurface(loadedSurface);
-
- if (surface == NULL)
- {
- throw GCN_EXCEPTION(
- std::string("Not enough memory to load: ") + filename);
- }
-
- OpenGLImage *image = new OpenGLImage((unsigned int*)surface->pixels,
- surface->w,
- surface->h,
- convertToDisplayFormat);
- SDL_FreeSurface(surface);
-
- return image;
- }
- };
-}
-
-#endif // end GCN_OPENGLSDLIMAGELOADER_HPP
diff --git a/src/include/guisan/platform.hpp b/src/include/guisan/platform.hpp
deleted file mode 100644
index b7a7609f..00000000
--- a/src/include/guisan/platform.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-#include
-#include
-#include
-
-#include "platform.hpp"
-
-extern "C"
-{
- /**
- * Exists to be able to check for Guichan SDL with autotools.
- */
- GCN_EXTENSION_DECLSPEC extern void gcnSDL();
-}
-
-#endif // end GCN_SDL_HPP
diff --git a/src/include/guisan/sdl/sdlgraphics.hpp b/src/include/guisan/sdl/sdlgraphics.hpp
deleted file mode 100644
index 8bd1231e..00000000
--- a/src/include/guisan/sdl/sdlgraphics.hpp
+++ /dev/null
@@ -1,164 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/color.hpp"
-#include "guisan/platform.hpp"
-#include "guisan/image.hpp"
-
-namespace gcn
-{
- /**
- * SDL implementation of Image.
- */
- class GCN_EXTENSION_DECLSPEC SDLImage : public Image
- {
- public:
- /**
- * Constructor. Load an image from an SDL surface.
- *
- * NOTE: The functions getPixel and putPixel are only guaranteed to work
- * before an image has been converted to display format.
- *
- * @param surface the surface from which to load.
- * @param autoFree true if the surface should automatically be deleted.
- */
- SDLImage(SDL_Surface* surface, bool autoFree);
-
- /**
- * Destructor.
- */
- virtual ~SDLImage();
-
- /**
- * Gets the SDL surface for the image.
- *
- * @return the SDL surface for the image.
- */
- virtual SDL_Surface* getSurface() const;
-
-
- // Inherited from Image
-
- virtual void free();
-
- virtual int getWidth() const;
-
- virtual int getHeight() const;
-
- virtual Color getPixel(int x, int y);
-
- virtual void putPixel(int x, int y, const Color& color);
-
- virtual void convertToDisplayFormat();
-
- protected:
- SDL_Surface* mSurface;
- bool mAutoFree;
- };
-}
-
-#endif // end GCN_SDLIMAGE_HPP
diff --git a/src/include/guisan/sdl/sdlimageloader.hpp b/src/include/guisan/sdl/sdlimageloader.hpp
deleted file mode 100644
index 5d4455f1..00000000
--- a/src/include/guisan/sdl/sdlimageloader.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "SDL.h"
-
-#include "guisan/input.hpp"
-#include "guisan/keyinput.hpp"
-#include "guisan/mouseinput.hpp"
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- class Key;
-
- /**
- * SDL implementation of Input.
- */
- class GCN_EXTENSION_DECLSPEC SDLInput : public Input
- {
- public:
-
- /**
- * Constructor.
- */
- SDLInput();
-
- /**
- * Pushes an SDL event. It should be called at least once per frame to
- * update input with user input.
- *
- * @param event an event from SDL.
- */
- virtual void pushInput(SDL_Event event);
-
- /**
- * Polls all input. It exists for input driver compatibility. If you
- * only use SDL and plan sticking with SDL you can safely ignore this
- * function as it in the SDL case does nothing.
- */
- virtual void _pollInput() { }
-
-
- // Inherited from Input
-
- virtual bool isKeyQueueEmpty();
-
- virtual KeyInput dequeueKeyInput();
-
- virtual bool isMouseQueueEmpty();
-
- virtual MouseInput dequeueMouseInput();
-
- protected:
- /**
- * Converts a mouse button from SDL to a Guichan mouse button
- * representation.
- *
- * @param button an SDL mouse button.
- * @return a Guichan mouse button.
- */
- int convertMouseButton(int button);
-
- /**
- * Converts an SDL event key to a key value.
- *
- * @param event an SDL event with a key to convert.
- * @return a key value.
- * @see Key
- */
- int convertKeyCharacter(SDL_Event event);
-
- std::queue mKeyInputQueue;
- std::queue mMouseInputQueue;
-
- bool mMouseDown;
- bool mMouseInWindow;
- };
-}
-
-#endif // end GCN_SDLINPUT_HPP
diff --git a/src/include/guisan/sdl/sdlpixel.hpp b/src/include/guisan/sdl/sdlpixel.hpp
deleted file mode 100644
index 0812bc0a..00000000
--- a/src/include/guisan/sdl/sdlpixel.hpp
+++ /dev/null
@@ -1,274 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1uformat->BytesPerPixel;
-
- SDL_LockSurface(surface);
-
- Uint8 *p = (Uint8 *)surface->pixels + y * surface->pitch + x * bpp;
-
- unsigned int color = 0;
-
- switch(bpp)
- {
- case 1:
- color = *p;
- break;
-
- case 2:
- color = *(Uint16 *)p;
- break;
-
- case 3:
- if(SDL_BYTEORDER == SDL_BIG_ENDIAN)
- {
- color = p[0] << 16 | p[1] << 8 | p[2];
- }
- else
- {
- color = p[0] | p[1] << 8 | p[2] << 16;
- }
- break;
-
- case 4:
- color = *(Uint32 *)p;
- break;
-
- }
-
- unsigned char r,g,b,a;
-
- SDL_GetRGBA(color, surface->format, &r, &g, &b, &a);
- SDL_UnlockSurface(surface);
-
- return Color(r,g,b,a);
- }
-
- /**
- * Puts a pixel on an SDL_Surface.
- *
- * @param x the x coordinate on the surface.
- * @param y the y coordinate on the surface.
- * @param color the color the pixel should be in.
- */
- inline void SDLputPixel(SDL_Surface* surface, int x, int y, const Color& color)
- {
- int bpp = surface->format->BytesPerPixel;
-
- SDL_LockSurface(surface);
-
- Uint8 *p = (Uint8 *)surface->pixels + y * surface->pitch + x * bpp;
-
- Uint32 pixel = SDL_MapRGB(surface->format, color.r, color.g, color.b);
-
- switch(bpp)
- {
- case 1:
- *p = pixel;
- break;
-
- case 2:
- *(Uint16 *)p = pixel;
- break;
-
- case 3:
- if(SDL_BYTEORDER == SDL_BIG_ENDIAN)
- {
- p[0] = (pixel >> 16) & 0xff;
- p[1] = (pixel >> 8) & 0xff;
- p[2] = pixel & 0xff;
- }
- else
- {
- p[0] = pixel & 0xff;
- p[1] = (pixel >> 8) & 0xff;
- p[2] = (pixel >> 16) & 0xff;
- }
- break;
-
- case 4:
- *(Uint32 *)p = pixel;
- break;
- }
-
- SDL_UnlockSurface(surface);
- }
-
- /**
- * Blends two 32 bit colors together.
- *
- * @param src the source color.
- * @param dst the destination color.
- * @param a alpha.
- */
- inline unsigned int SDLAlpha32(unsigned int src, unsigned int dst, unsigned char a)
- {
- unsigned int b = ((src & 0xff) * a + (dst & 0xff) * (255 - a)) >> 8;
- unsigned int g = ((src & 0xff00) * a + (dst & 0xff00) * (255 - a)) >> 8;
- unsigned int r = ((src & 0xff0000) * a + (dst & 0xff0000) * (255 - a)) >> 8;
-
- return (b & 0xff) | (g & 0xff00) | (r & 0xff0000);
- }
-
- /**
- * Blends two 16 bit colors together.
- *
- * @param src the source color.
- * @param dst the destination color.
- * @param a alpha.
- */
- inline unsigned short SDLAlpha16(unsigned short src, unsigned short dst, unsigned char a, const SDL_PixelFormat *f)
- {
- unsigned int b = ((src & f->Rmask) * a + (dst & f->Rmask) * (255 - a)) >> 8;
- unsigned int g = ((src & f->Gmask) * a + (dst & f->Gmask) * (255 - a)) >> 8;
- unsigned int r = ((src & f->Bmask) * a + (dst & f->Bmask) * (255 - a)) >> 8;
-
- return (unsigned short)((b & f->Rmask) | (g & f->Gmask) | (r & f->Bmask));
- }
-
- /*
- typedef struct{
- SDL_Palette *palette;
- Uint8 BitsPerPixel;
- Uint8 BytesPerPixel;
- Uint32 Rmask, Gmask, Bmask, Amask;
- Uint8 Rshift, Gshift, Bshift, Ashift;
- Uint8 Rloss, Gloss, Bloss, Aloss;
- Uint32 colorkey;
- Uint8 alpha;
- } SDL_PixelFormat;
- */
-
- /**
- * Puts a pixel on an SDL_Surface with alpha
- *
- * @param x the x coordinate on the surface.
- * @param y the y coordinate on the surface.
- * @param color the color the pixel should be in.
- */
- inline void SDLputPixelAlpha(SDL_Surface* surface, int x, int y, const Color& color)
- {
- int bpp = surface->format->BytesPerPixel;
-
- SDL_LockSurface(surface);
-
- Uint8 *p = (Uint8 *)surface->pixels + y * surface->pitch + x * bpp;
-
- Uint32 pixel = SDL_MapRGB(surface->format, color.r, color.g, color.b);
-
- switch(bpp)
- {
- case 1:
- *p = pixel;
- break;
-
- case 2:
- *(Uint16 *)p = SDLAlpha16(pixel, *(Uint32 *)p, color.a, surface->format);
- break;
-
- case 3:
- unsigned int c;
- if(SDL_BYTEORDER == SDL_BIG_ENDIAN)
- {
- unsigned int r = (p[0] * (255 - color.a) + color.r * color.a) >> 8;
- unsigned int g = (p[1] * (255 - color.a) + color.g * color.a) >> 8;
- unsigned int b = (p[2] * (255 - color.a) + color.b * color.a) >> 8;
-
- p[2] = b;
- p[1] = g;
- p[0] = r;
- }
- else
- {
- unsigned int r = (p[2] * (255 - color.a) + color.r * color.a) >> 8;
- unsigned int g = (p[1] * (255 - color.a) + color.g * color.a) >> 8;
- unsigned int b = (p[0] * (255 - color.a) + color.b * color.a) >> 8;
-
- p[0] = b;
- p[1] = g;
- p[2] = r;
- }
- break;
-
- case 4:
- *(Uint32 *)p = SDLAlpha32(pixel, *(Uint32 *)p, color.a);
- break;
- }
-
- SDL_UnlockSurface(surface);
- }
-}
-
-#endif // end GCN_SDLPIXEL_HPP
diff --git a/src/include/guisan/selectionevent.hpp b/src/include/guisan/selectionevent.hpp
deleted file mode 100644
index 47646084..00000000
--- a/src/include/guisan/selectionevent.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/selectionevent.hpp"
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- /**
- * Listener of value change events from Widgets. To be able to
- * listen for value changes you must make a class which inherits
- * from this class and implements the valueChanged function.
- *
- * @see ListBox::addSelectionListener
- * @author Olof Naessén
- * @since 0.8.0
- */
- class GCN_CORE_DECLSPEC SelectionListener
- {
- public:
-
- /**
- * Destructor.
- */
- virtual ~SelectionListener() { }
-
- /**
- * Called when a value has been changed in a Widget. It is used
- * to be able to recieve a notification that a value has been changed.
- *
- * @param event the event of the value change.
- * @since 0.8.0
- */
- virtual void valueChanged(const SelectionEvent& event) { };
-
- };
-}
-
-#endif // end GCN_SELECTIONLISTENER_HPP
diff --git a/src/include/guisan/widget.hpp b/src/include/guisan/widget.hpp
deleted file mode 100644
index eb28f596..00000000
--- a/src/include/guisan/widget.hpp
+++ /dev/null
@@ -1,877 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-#include
-
-#include "guisan/color.hpp"
-#include "guisan/rectangle.hpp"
-
-namespace gcn
-{
- class ActionListener;
- class BasicContainer;
- class DeathListener;
- class DefaultFont;
- class FocusHandler;
- class FocusListener;
- class Font;
- class Graphics;
- class KeyInput;
- class KeyListener;
- class MouseInput;
- class MouseListener;
- class WidgetListener;
-
- /**
- * Widget base class. Contains basic widget functions every widget should
- * have. Widgets should inherit from this class and implements it's
- * functions.
- *
- * NOTE: Functions begining with underscore "_" should not
- * be overloaded unless you know what you are doing
- *
- * @author Olof Naessén
- * @author Per Larsson.
- */
- class GCN_CORE_DECLSPEC Widget
- {
- public:
- /**
- * Constructor. Resets member variables. Noteable, a widget is not
- * focusable as default, therefore, widgets that are supposed to be
- * focusable should overide this default in their own constructor.
- */
- Widget();
-
- /**
- * Default destructor.
- */
- virtual ~Widget();
-
- /**
- * Draws the widget. It is called by the parent widget when it is time
- * for the widget to draw itself. The graphics object is set up so
- * that all drawing is relative to the widget, i.e coordinate (0,0) is
- * the top-left corner of the widget. It is not possible to draw
- * outside of a widgets dimension.
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void draw(Graphics* graphics) = 0;
-
- /**
- * Draws the widget border. A border is drawn around a widget.
- * The width and height of the border is therefore the widgets
- * height+2*bordersize. Think of a painting that has a certain size,
- * the border surrounds the painting.
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void drawBorder(Graphics* graphics) { }
-
- /**
- * Called for all widgets in the gui each time Gui::logic is called.
- * You can do logic stuff here like playing an animation.
- *
- * @see Gui
- */
- virtual void logic() { }
-
- /**
- * Gets the widget parent container.
- *
- * @return the widget parent container. Returns NULL if the widget
- * has no parent.
- */
- virtual Widget* getParent() const;
-
- /**
- * Sets the width of the widget in pixels.
- *
- * @param width the widget width in pixels.
- */
- void setWidth(int width);
-
- /**
- * Gets the width of the widget in pixels.
- *
- * @return the widget with in pixels.
- */
- int getWidth() const;
-
- /**
- * Sets the height of the widget in pixels.
- *
- * @param height the widget height in pixels.
- */
- void setHeight(int height);
-
- /**
- * Gets the height of the widget in pixels.
- *
- * @return the widget height in pixels.
- */
- int getHeight() const;
-
- /**
- * Sets the size of the widget.
- *
- * @param width the width.
- * @param height the height.
- */
- void setSize(int width, int height);
-
- /**
- * Set the widget x coordinate. It is relateive to it's parent.
- *
- * @param x the widget x coordinate.
- */
- void setX(int x);
-
- /**
- * Gets the widget x coordinate. It is relative to it's parent.
- *
- * @return the widget x coordinate.
- */
- int getX() const;
-
- /**
- * Set the widget y coordinate. It is relative to it's parent.
- *
- * @param y the widget y coordinate.
- */
- void setY(int y);
-
- /**
- * Gets the widget y coordinate. It is relative to it's parent.
- *
- * @return the widget y coordinate.
- */
- int getY() const;
-
- /**
- * Sets the widget position. It is relative to it's parent.
- *
- * @param x the widget x coordinate.
- * @param y the widgets y coordinate.
- */
- void setPosition(int x, int y);
-
- /**
- * Sets the dimension of the widget. It is relative to it's parent.
- *
- * @param dimension the widget dimension.
- */
- void setDimension(const Rectangle& dimension);
-
- /**
- * Sets the size of the border, or the width if you so like. The size
- * is the number of pixels that the border extends outside the widget.
- * Border size = 0 means no border.
- *
- * @param borderSize the size of the border.
- * @see drawBorder
- */
- void setBorderSize(unsigned int borderSize);
-
- /**
- * Gets the size of the border, or the width if you so like. The size
- * is the number of pixels that the border extends outside the widget.
- * Border size = 0 means no border.
- *
- * @return the size of the border.
- * @see drawBorder
- */
- unsigned int getBorderSize() const;
-
- /**
- * Gets the dimension of the widget. It is relative to it's parent.
- *
- * @return the widget dimension.
- */
- const Rectangle& getDimension() const;
-
- /**
- * Sets a widgets focusability.
- *
- * @param focusable true if the widget should be focusable.
- */
- void setFocusable(bool focusable);
-
- /**
- * Checks whether the widget is focusable.
- *
- * @return true if the widget is focusable.
- */
- bool isFocusable() const;
-
- /**
- * Checks if the widget is focused.
- *
- * @return true if the widget currently has focus.
- */
- virtual bool isFocused() const;
-
- /**
- * Sets the widget to be disabled or enabled. A disabled
- * widget will never recieve mouse or key input.
- *
- * @param enabled true if widget is enabled.
- */
- void setEnabled(bool enabled);
-
- /**
- * Checks if a widget is disabled or not.
- *
- * @return true if the widget should be enabled.
- */
- bool isEnabled() const;
-
- /**
- * Sets the widget to be visible.
- *
- * @param visible true if the widget should be visiable.
- */
- void setVisible(bool visible);
-
- /**
- * Checks if the widget is visible.
- *
- * @return true if the widget is visible.
- */
- bool isVisible() const;
-
- /**
- * Sets the base color. The base color is the background
- * color for many widgets like the Button and Contianer widgets.
- *
- * @param color the baseground color.
- */
- void setBaseColor(const Color& color);
-
- /**
- * Gets the base color.
- *
- * @return the foreground color.
- */
- const Color& getBaseColor() const;
-
- /**
- * Sets the foreground color.
- *
- * @param color the foreground color.
- */
- void setForegroundColor(const Color& color);
-
- /**
- * Gets the foreground color.
- *
- * @return the foreground color.
- */
- const Color& getForegroundColor() const;
-
- /**
- * Sets the background color.
- *
- * @param color the background Color.
- */
- void setBackgroundColor(const Color& color);
-
- /**
- * Gets the background color.
- *
- * @return the background color.
- */
- const Color& getBackgroundColor() const;
-
- /**
- * Sets the selection color.
- *
- * @param color the selection color.
- */
- void setSelectionColor(const Color& color);
-
- /**
- * Gets the selection color.
- *
- * @return the selection color.
- */
- const Color& getSelectionColor() const;
-
- /**
- * Requests focus for the widget. A widget will only recieve focus
- * if it is focusable.
- */
- virtual void requestFocus();
-
- /**
- * Requests a move to the top in the parent widget.
- */
- virtual void requestMoveToTop();
-
- /**
- * Requests a move to the bottom in the parent widget.
- */
- virtual void requestMoveToBottom();
-
- /**
- * Sets the FocusHandler to be used.
- *
- * WARNING: This function is used internally and should not
- * be called or overloaded unless you know what you
- * are doing.
- *
- * @param focusHandler the FocusHandler to use.
- */
- virtual void _setFocusHandler(FocusHandler* focusHandler);
-
- /**
- * Gets the FocusHandler used.
- *
- * WARNING: This function is used internally and should not
- * be called or overloaded unless you know what you
- * are doing.
- *
- * @return the FocusHandler used.
- */
- virtual FocusHandler* _getFocusHandler();
-
- /**
- * Adds an ActionListener to the widget. When an action is triggered
- * by the widget, the action function in all the widget's
- * ActionListeners will be called.
- *
- * @param actionListener the ActionListener to add.
- */
- void addActionListener(ActionListener* actionListener);
-
- /**
- * Removes an added ActionListener from the widget.
- *
- * @param actionListener the ActionListener to remove.
- */
- void removeActionListener(ActionListener* actionListener);
-
- /**
- * Adds a DeathListener to the widget. When the widget dies
- * the death function in all the widget's DeathListeners will be called.
- *
- * @param actionListener the DeathListener to add.
- */
- void addDeathListener(DeathListener* deathListener);
-
- /**
- * Removes an added DeathListener from the widget.
- *
- * @param deathListener the DeathListener to remove.
- */
- void removeDeathListener(DeathListener* deathListener);
-
- /**
- * Adds a MouseListener to the widget. When a mouse message is
- * recieved, it will be sent to the widget's MouseListeners.
- *
- * @param mouseListener the MouseListener to add.
- */
- void addMouseListener(MouseListener* mouseListener);
-
- /**
- * Removes an added MouseListener from the widget.
- *
- * @param mouseListener the MouseListener to remove.
- */
- void removeMouseListener(MouseListener* mouseListener);
-
- /**
- * Adds a KeyListener to the widget. When a key message is recieved,
- * it will be sent to the widget's KeyListeners.
- *
- * @param keyListener the KeyListener to add.
- */
- void addKeyListener(KeyListener* keyListener);
-
- /**
- * Removes an added KeyListener from the widget.
- *
- * @param keyListener the KeyListener to remove.
- */
- void removeKeyListener(KeyListener* keyListener);
-
- /**
- * Adds a FocusListener to the widget. When a focus event is recieved,
- * it will be sent to the widget's FocusListeners.
- *
- * @param focusListener the FocusListener to add.
- * @author Olof Naessén
- * @since 0.7.0
- */
- void addFocusListener(FocusListener* focusListener);
-
- /**
- * Removes an added FocusListener from the widget.
- *
- * @param focusListener the FocusListener to remove.
- * @author Olof Naessén
- * @since 0.7.0
- */
- void removeFocusListener(FocusListener* focusListener);
-
- /**
- * Adds a WidgetListener to the widget.
- *
- * @param widgetListener the WidgetListener to add.
- * @author Olof Naessén
- * @since 0.8.0
- */
- void addWidgetListener(WidgetListener* widgetListener);
-
- /**
- * Removes an added WidgetListener from the widget.
- *
- * @param widgetListener the WidgetListener to remove.
- * @author Olof Naessén
- * @since 0.8.0
- */
- void removeWidgetListener(WidgetListener* widgetListener);
-
- /**
- * Sets the action event identifier of the widget. The identifier is
- * used to be able to identify which action has occured.
- *
- * NOTE: An action event identifier should not be used to identify a
- * certain widget but rather a certain event in your application.
- * Several widgets can have the same action event identifer.
- *
- * @param actionEventId the action event identifier.
- * @since 0.6.0
- */
- void setActionEventId(const std::string& actionEventId);
-
- /**
- * Gets the action event identifier.
- *
- * @return the action event identifier.
- */
- const std::string& getActionEventId() const;
-
- /**
- * Gets the absolute position on the screen for the widget.
- *
- * @param x absolute x coordinate will be stored in this parameter.
- * @param y absolute y coordinate will be stored in this parameter.
- */
- virtual void getAbsolutePosition(int& x, int& y) const;
-
- /**
- * Sets the parent of the widget. A parent must be a BasicContainer.
- *
- * WARNING: This function is used internally and should not
- * be called or overloaded unless you know what you
- * are doing.
- *
- * @param parent the parent BasicContainer..
- */
- virtual void _setParent(Widget* parent);
-
- /**
- * Gets the font used. If no font has been set, the global font will
- * be returned instead. If no global font has been set, the default
- * font will be returend.
- * ugly default.
- *
- * @return the used Font.
- */
- Font *getFont() const;
-
- /**
- * Sets the global font to be used by default for all widgets.
- *
- * @param font the global Font.
- */
- static void setGlobalFont(Font* font);
-
- /**
- * Sets the font. If font is NULL, the global font will be used.
- *
- * @param font the Font.
- */
- void setFont(Font* font);
-
- /**
- * Called when the font has changed. If the change is global,
- * this function will only be called if the widget don't have a
- * font already set.
- */
- virtual void fontChanged() { }
-
- /**
- * Checks whether a widget exists or not, that is if it still exists
- * an instance of the object.
- *
- * @param widget the widget to check.
- */
- static bool widgetExists(const Widget* widget);
-
- /**
- * Check if tab in is enabled. Tab in means that you can set focus
- * to this widget by pressing the tab button. If tab in is disabled
- * then the FocusHandler will skip this widget and focus the next
- * in its focus order.
- *
- * @return true if tab in is enabled.
- */
- bool isTabInEnabled() const;
-
- /**
- * Sets tab in enabled. Tab in means that you can set focus
- * to this widget by pressing the tab button. If tab in is disabled
- * then the FocusHandler will skip this widget and focus the next
- * in its focus order.
- *
- * @param enabled true if tab in should be enabled.
- */
- void setTabInEnabled(bool enabled);
-
- /**
- * Checks if tab out is enabled. Tab out means that you can lose
- * focus to this widget by pressing the tab button. If tab out is
- * disabled then the FocusHandler ignores tabbing and focus will
- * stay with this widget.
- *
- * @return true if tab out is enabled.
- */
- bool isTabOutEnabled() const;
-
- /**
- * Sets tab out enabled. Tab out means that you can lose
- * focus to this widget by pressing the tab button. If tab out is
- * disabled then the FocusHandler ignores tabbing and focus will
- * stay with this widget.
- *
- * @param enabled true if tab out should be enabled.
- */
- void setTabOutEnabled(bool enabled);
-
- /**
- * Requests modal focus. When a widget has modal focus, only that
- * widget and it's children may recieve input.
- *
- * @throws Exception if another widget already has modal focus.
- */
- virtual void requestModalFocus();
-
- /**
- * Requests modal mouse input focus. When a widget has modal input focus
- * that widget will be the only widget receiving input even if the input
- * occurs outside of the widget and no matter what the input is.
- *
- * @throws Exception if another widget already has modal focus.
- * @since 0.6.0
- */
- virtual void requestModalMouseInputFocus();
-
- /**
- * Releases modal focus. Modal focus will only be released if the
- * widget has modal focus.
- */
- virtual void releaseModalFocus();
-
- /**
- * Releases modal mouse input focus. Modal mouse input focus will only
- * be released if the widget has modal mouse input focus.
- *
- * @since 0.6.0
- */
- virtual void releaseModalMouseInputFocus();
-
- /**
- * Checks if the widget or it's parent has modal focus.
- */
- virtual bool hasModalFocus() const;
-
- /**
- * Checks if the widget or it's parent has modal mouse input focus.
- *
- * @since 0.6.0
- */
- virtual bool hasModalMouseInputFocus() const;
-
- /**
- * Gets a widget from a certain position in the widget.
- * This function is used to decide which gets mouse input,
- * thus it can be overloaded to change that behaviour.
- *
- * NOTE: This always returns NULL if the widget is not
- * a container.
- *
- * @param x the x coordinate.
- * @param y the y coordinate.
- * @return the widget at the specified coodinate, or NULL
- * if no such widget exists.
- * @since 0.6.0
- */
- virtual Widget *getWidgetAt(int x, int y);
-
- /**
- * Gets the mouse listeners of the widget.
- *
- * @return the mouse listeners of the widget.
- * @since 0.6.0
- */
- virtual const std::list& _getMouseListeners();
-
- /**
- * Gets the key listeners of the widget.
- *
- * @return the key listeners of the widget.
- * @since 0.6.0
- */
- virtual const std::list& _getKeyListeners();
-
- /**
- * Gets the focus listeners of the widget.
- *
- * @return the focus listeners of the widget.
- * @since 0.7.0
- */
- virtual const std::list& _getFocusListeners();
-
- /**
- * Gets the subarea of the widget that the children occupy.
- *
- * @return the subarea as a Rectangle.
- */
- virtual Rectangle getChildrenArea();
-
- /**
- * Gets the internal FocusHandler used.
- *
- * @return the internalFocusHandler used. If no internal FocusHandler
- * is used, NULL will be returned.
- */
- virtual FocusHandler* _getInternalFocusHandler();
-
- /**
- * Sets the internal FocusHandler. An internal focushandler is
- * needed if both a widget in the widget and the widget itself
- * should be foucsed at the same time.
- *
- * @param focusHandler the FocusHandler to be used.
- */
- void setInternalFocusHandler(FocusHandler* focusHandler);
-
- /**
- * Moves a widget to the top of this widget. The moved widget will be
- * drawn above all other widgets in this widget.
- *
- * @param widget the widget to move.
- */
- virtual void moveToTop(Widget* widget) { };
-
- /**
- * Moves a widget in this widget to the bottom of this widget.
- * The moved widget will be drawn below all other widgets in this widget.
- *
- * @param widget the widget to move.
- */
- virtual void moveToBottom(Widget* widget) { };
-
- /**
- * Focuses the next widget in the widget.
- */
- virtual void focusNext() { };
-
- /**
- * Focuses the previous widget in the widget.
- */
- virtual void focusPrevious() { };
-
- /**
- * Tries to show a specific part of a widget by moving it. Used if the
- * widget should act as a container.
- *
- * @param widget the target widget.
- * @param area the area to show.
- */
- virtual void showWidgetPart(Widget* widget, Rectangle area) { };
-
- /**
- * Sets an id of a widget. An id can be useful if a widget needs to be
- * identified in a container. For example, if widgets are created by an
- * XML document, a certain widget can be retrieved given that the widget
- * has an id.
- *
- * @param id the id to set to the widget.
- * @see BasicContainer::findWidgetById
- */
- void setId(const std::string& id);
-
- /**
- * Gets the id of a widget. An id can be useful if a widget needs to be
- * identified in a container. For example, if widgets are created by an
- * XML document, a certain widget can be retrieved given that the widget
- * has an id.
- *
- * @param id the id to set to the widget.
- * @see BasicContainer::findWidgetById
- */
- const std::string& getId();
-
- protected:
- /**
- * Generates an action to the widget's ActionListeners.
- */
- void generateAction();
-
- /**
- * Distributes resized events to all of the widget's listeners.
- *
- * @since 0.8.0
- * @author Olof Naessén
- */
- void distributeResizedEvent();
-
- /**
- * Distributes moved events to all of the widget's listeners.
- *
- * @since 0.8.0
- * @author Olof Naessén
- */
- void distributeMovedEvent();
-
- /**
- * Distributes hidden events to all of the widget's listeners.
- *
- * @since 0.8.0
- * @author Olof Naessén
- */
- void distributeHiddenEvent();
-
- /**
- * Distributes shown events to all of the widget's listeners.
- *
- * @since 0.8.0
- * @author Olof Naessén
- */
- void distributeShownEvent();
-
- typedef std::list MouseListenerList;
- typedef MouseListenerList::iterator MouseListenerIterator;
- MouseListenerList mMouseListeners;
-
- typedef std::list KeyListenerList;
- KeyListenerList mKeyListeners;
- typedef KeyListenerList::iterator KeyListenerIterator;
-
- typedef std::list ActionListenerList;
- ActionListenerList mActionListeners;
- typedef ActionListenerList::iterator ActionListenerIterator;
-
- typedef std::list DeathListenerList;
- DeathListenerList mDeathListeners;
- typedef DeathListenerList::iterator DeathListenerIterator;
-
- typedef std::list FocusListenerList;
- FocusListenerList mFocusListeners;
- typedef FocusListenerList::iterator FocusListenerIterator;
-
- typedef std::list WidgetListenerList;
- WidgetListenerList mWidgetListeners;
- typedef WidgetListenerList::iterator WidgetListenerIterator;
-
- Color mForegroundColor;
- Color mBackgroundColor;
- Color mBaseColor;
- Color mSelectionColor;
- FocusHandler* mFocusHandler;
- FocusHandler* mInternalFocusHandler;
- Widget* mParent;
- Rectangle mDimension;
- unsigned int mBorderSize;
- std::string mActionEventId;
- bool mFocusable;
- bool mVisible;
- bool mTabIn;
- bool mTabOut;
- bool mEnabled;
- std::string mId;
-
- Font* mCurrentFont;
- static DefaultFont mDefaultFont;
- static Font* mGlobalFont;
- static std::list mWidgets;
- };
-}
-
-#endif // end GCN_WIDGET_HPP
-
-/*
- * yakslem - "I have a really great idea! Why not have an
- * interesting and funny quote or story at the
- * end of every source file."
- * finalman - "Yeah - good idea! .... do you know any funny
- * quotes?"
- * yakslem - "Well.. I guess not. I just thought it would be
- * fun to tell funny quotes."
- * finalman - "That's not a very funny quote. But i believe
- * pointless quotes are funny in their own pointless
- * way."
- * yakslem - "...eh...ok..."
- */
diff --git a/src/include/guisan/widgetlistener.hpp b/src/include/guisan/widgetlistener.hpp
deleted file mode 100644
index d63a7f16..00000000
--- a/src/include/guisan/widgetlistener.hpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/event.hpp"
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- /**
- * Listener on events from a Widget. Whenever a widget changes it's
- * size or position the listener of a widget will get notified. To be able to
- * listen for events from a widget you must make a class which inherits
- * from this class and implements it's functions.
- *
- * @see Widget::addWidgetListener
- * @author Olof Naessén
- * @since 0.8.0
- */
- class GCN_CORE_DECLSPEC WidgetListener
- {
- public:
-
- /**
- * Destructor.
- */
- virtual ~WidgetListener() { }
-
- /**
- * Invoked when a widget changes its size.
- *
- * @param event Describes the event.
- * @since 0.8.0
- */
- virtual void widgetResized(const Event& event) { }
-
- /**
- * Invoked when a widget is moved.
- *
- * @param event Describes the event.
- * @since 0.8.0
- */
- virtual void widgetMoved(const Event& event) { }
-
- /**
- * Invoked when a widget is hidden, i.e it's set to be
- * not visible.
- *
- * @param event Describes the event.
- * @since 0.8.0
- */
- virtual void widgetHidden(const Event& event) { }
-
- /**
- * Invoked when a widget is shown, i.e it's set to be
- * visible.
- *
- * @param event Describes the event.
- * @since 0.8.0
- */
- virtual void widgetShown(const Event& event) { }
-
- };
-}
-
-#endif // end GCN_WIDGETLISTENER_HPP
diff --git a/src/include/guisan/widgets/button.hpp b/src/include/guisan/widgets/button.hpp
deleted file mode 100644
index d120302e..00000000
--- a/src/include/guisan/widgets/button.hpp
+++ /dev/null
@@ -1,195 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/focuslistener.hpp"
-#include "guisan/keylistener.hpp"
-#include "guisan/mouseevent.hpp"
-#include "guisan/mouselistener.hpp"
-#include "guisan/platform.hpp"
-#include "guisan/widget.hpp"
-
-namespace gcn
-{
- /**
- * A regular button. Add an ActionListener to it to know when it
- * has been clicked.
- *
- * NOTE: You can only have text (a caption) on the button. If you want it
- * to handle, for instance images, you can implement an ImageButton
- * of your own and overload member functions from Button.
- */
- class GCN_CORE_DECLSPEC Button : public Widget,
- public MouseListener,
- public KeyListener,
- public FocusListener
- {
- public:
- /**
- * Constructor.
- */
- Button();
-
- /**
- * Constructor.
- *
- * @param caption the caption of the Button.
- */
- Button(const std::string& caption);
-
- /**
- * Sets the Button caption.
- *
- * @param caption the Button caption.
- */
- void setCaption(const std::string& caption);
-
- /**
- * Gets the Button caption.
- *
- * @return the Button caption.
- */
- const std::string& getCaption() const;
-
- /**
- * Sets the alignment for the caption.
- *
- * @param alignment Graphics::LEFT, Graphics::CENTER or Graphics::RIGHT
- * @see Graphics
- */
- void setAlignment(unsigned int alignment);
-
- /**
- * Gets the alignment for the caption.
- *
- * @return alignment of caption.
- */
- unsigned int getAlignment() const;
-
- /**
- * Sets the spacing between the border of this button and its caption.
- *
- * @param spacing is a number between 0 and 255. The default value for
- spacing is 4 and can be changed using this method.
- */
- void setSpacing(unsigned int spacing);
-
- /**
- * Gets the spacing between the border of this button and its caption.
- *
- * @return spacing.
- */
- unsigned int getSpacing() const;
-
- /**
- * Adjusts the buttons size to fit the content.
- */
- void adjustSize();
-
- /**
- * Checks if the button is pressed down. Useful when drawing.
- *
- * @return true if the button is pressed down.
- */
- bool isPressed() const;
-
-
- //Inherited from Widget
-
- virtual void draw(Graphics* graphics);
-
- virtual void drawBorder(Graphics* graphics);
-
-
- // Inherited from FocusListener
-
- virtual void focusLost(const Event& event);
-
-
- // Inherited from MouseListener
-
- virtual void mousePressed(MouseEvent& mouseEvent);
-
- virtual void mouseReleased(MouseEvent& mouseEvent);
-
- virtual void mouseEntered(MouseEvent& mouseEvent);
-
- virtual void mouseExited(MouseEvent& mouseEvent);
-
- virtual void mouseDragged(MouseEvent& mouseEvent);
-
-
- // Inherited from KeyListener
-
- virtual void keyPressed(KeyEvent& keyEvent);
-
- virtual void keyReleased(KeyEvent& keyEvent);
-
- protected:
- std::string mCaption;
- bool mHasMouse;
- bool mKeyPressed;
- bool mMousePressed;
- unsigned int mAlignment;
- unsigned int mSpacing;
- };
-}
-
-#endif // end GCN_BUTTON_HPP
diff --git a/src/include/guisan/widgets/checkbox.hpp b/src/include/guisan/widgets/checkbox.hpp
deleted file mode 100644
index 0820f7d1..00000000
--- a/src/include/guisan/widgets/checkbox.hpp
+++ /dev/null
@@ -1,188 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/keylistener.hpp"
-#include "guisan/mouselistener.hpp"
-#include "guisan/platform.hpp"
-#include "guisan/widget.hpp"
-
-namespace gcn
-{
- /**
- * An implementation of a check box where a user can select or deselect
- * the check box and where the status of the check box is displayed to the user.
- * A check box is capable of displaying a caption.
- *
- * If a check box's state changes an action event will be sent to all action
- * listeners of the check box.
- */
- class GCN_CORE_DECLSPEC CheckBox :
- public Widget,
- public MouseListener,
- public KeyListener
- {
- public:
-
- /**
- * Contructor.
- */
- CheckBox();
-
- /**
- * Constructor. The check box will be automatically resized
- * to fit it's caption.
- *
- * @param caption The caption of the check box.
- * @param marked True if the check box is selected, false otherwise.
- */
- CheckBox(const std::string &caption, bool selected = false);
-
- /**
- * Destructor.
- */
- virtual ~CheckBox() { }
-
- /**
- * Checks if the check box is selected.
- *
- * @return True if the check box is selected, false otherwise.
- * @see setSelected
- */
- bool isSelected() const;
-
- /**
- * Sets the check box to be selected.
- *
- * @param selected True if the check box should be set as selected.
- * @see isSelected
- */
- void setSelected(bool selected);
-
- /**
- * Gets the caption of the check box.
- *
- * @return The caption of the check box.
- * @see setCaption
- */
- const std::string &getCaption() const;
-
- /**
- * Sets the caption of the check box. It's advisable to call
- * adjustSize after setting of the caption to adjust the
- * check box's size to fit the caption.
- *
- * @param caption The caption of the check box.
- * @see getCaption, adjustSize
- */
- void setCaption(const std::string& caption);
-
- /**
- * Adjusts the check box's size to fit the caption.
- */
- void adjustSize();
-
-
- // Inherited from Widget
-
- virtual void draw(Graphics* graphics);
-
- virtual void drawBorder(Graphics* graphics);
-
-
- // Inherited from KeyListener
-
- virtual void keyPressed(KeyEvent& keyEvent);
-
-
- // Inherited from MouseListener
-
- virtual void mouseClicked(MouseEvent& mouseEvent);
-
- virtual void mouseDragged(MouseEvent& mouseEvent);
-
-
- protected:
- /**
- * Draws the box of the check box.
- *
- * @param graphics A Graphics object to draw with.
- */
- virtual void drawBox(Graphics *graphics);
-
- /**
- * Toggles the check box between being selected and
- * not being selected.
- */
- virtual void toggleSelected();
-
- /**
- * True if the check box is selected, false otherwise.
- */
- bool mSelected;
-
- /**
- * Holds the caption of the check box.
- */
- std::string mCaption;
- };
-}
-
-#endif // end GCN_CHECKBOX_HPP
diff --git a/src/include/guisan/widgets/container.hpp b/src/include/guisan/widgets/container.hpp
deleted file mode 100644
index ad6c0bc9..00000000
--- a/src/include/guisan/widgets/container.hpp
+++ /dev/null
@@ -1,177 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/basiccontainer.hpp"
-#include "guisan/graphics.hpp"
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- /**
- * An implementation of a container able to contain other widgets. A widget's
- * position in the container is relative to the container itself and not the screen.
- * A container is the most common widget to use as the Gui's top widget as makes the Gui
- * able to contain more than one widget.
- *
- * @see Gui::setTop
- */
- class GCN_CORE_DECLSPEC Container: public BasicContainer
- {
- public:
-
- /**
- * Constructor. A container is opauqe as default, if you want a
- * none opaque container call setQpaque(false).
- *
- * @see setOpaque, isOpaque
- */
- Container();
-
- /**
- * Destructor.
- */
- virtual ~Container();
-
- /**
- * Sets the container to be opaque or not. If the container
- * is opaque it's background will be drawn, if it's not opaque
- * it's background will not be drawn, and thus making the container
- * completely transparent.
- *
- * NOTE: This is not the same as to set visibility. A non visible
- * container will not itself nor will it draw it's content.
- *
- * @param opaque True if the container should be opaque, false otherwise.
- * @see isOpaque
- */
- void setOpaque(bool opaque);
-
- /**
- * Checks if the container is opaque or not.
- *
- * @return true if the container is opaque, false otherwise.
- * @see setOpaque
- */
- bool isOpaque() const;
-
- /**
- * Adds a widget to the container.
- *
- * @param widget The widget to add.
- * @see remove, clear
- */
- virtual void add(Widget* widget);
-
- /**
- * Adds a widget to the container and also specifices the widget's
- * postion in the container. The position is relative to the container
- * and not relative to the screen.
- *
- * @param widget The widget to add.
- * @param x The x coordinat for the widget.
- * @param y The y coordinat for the widget.
- * @see remove, clear
- */
- virtual void add(Widget* widget, int x, int y);
-
- /**
- * Removes a widget from the Container.
- *
- * @param widget The widget to remove.
- * @throws Exception when the widget has not been added to the
- * container.
- * @see add, clear
- */
- virtual void remove(Widget* widget);
-
- /**
- * Clears the container of all widgets.
- *
- * @see add, remove
- */
- virtual void clear();
-
- /**
- * Finds a widget given an id.
- *
- * @param id The id to find a widget by.
- * @return A widget with a corrosponding id, NULL if no widget
- * is found.
- * @see Widget::setId
- */
- virtual Widget* findWidgetById(const std::string &id);
-
-
- // Inherited from Widget
-
- virtual void draw(Graphics* graphics);
-
- virtual void drawBorder(Graphics* graphics);
-
- protected:
- /**
- * True if the container is opaque, false otherwise.
- */
- bool mOpaque;
- };
-}
-
-#endif // end GCN_CONTAINER_HPP
diff --git a/src/include/guisan/widgets/dropdown.hpp b/src/include/guisan/widgets/dropdown.hpp
deleted file mode 100644
index 89edc525..00000000
--- a/src/include/guisan/widgets/dropdown.hpp
+++ /dev/null
@@ -1,301 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u SelectionListenerList;
-
- /**
- * The selection listener's of the drop down.
- */
- SelectionListenerList mSelectionListeners;
-
- /**
- * Typedef.
- */
- typedef SelectionListenerList::iterator SelectionListenerIterator;
-
- };
-}
-
-#endif // end GCN_DROPDOWN_HPP
diff --git a/src/include/guisan/widgets/icon.hpp b/src/include/guisan/widgets/icon.hpp
deleted file mode 100644
index 63604145..00000000
--- a/src/include/guisan/widgets/icon.hpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/platform.hpp"
-#include "guisan/widget.hpp"
-
-namespace gcn
-{
- /**
- * Implementation of a label capable of displaying a caption.
- */
- class GCN_CORE_DECLSPEC Label: public Widget
- {
- public:
- /**
- * Constructor.
- */
- Label();
-
- /**
- * Constructor.
- *
- * @param caption The caption of the label.
- */
- Label(const std::string& caption);
-
- /**
- * Gets the caption of the label.
- *
- * @return The caption of the label.
- * @see setCaption
- */
- const std::string &getCaption() const;
-
- /**
- * Sets the caption of the label. It's advisable to call
- * adjustSize after setting of the caption to adjust the
- * label's size to fit the caption.
- *
- * @param caption The caption of the label.
- * @see getCaption, adjustSize
- */
- void setCaption(const std::string& caption);
-
- /**
- * Sets the alignment for the caption. The alignment is relative
- * to the center of the label.
- *
- * @param alignemnt Graphics::LEFT, Graphics::CENTER or Graphics::RIGHT.
- * @see getAlignment, Graphics
- */
- void setAlignment(unsigned int alignment);
-
- /**
- * Gets the alignment for the caption. The alignment is relative to
- * the center of the label.
- *
- * @return alignment of caption. Graphics::LEFT, Graphics::CENTER or Graphics::RIGHT.
- * @see setAlignmentm Graphics
- */
- unsigned int getAlignment() const;
-
- /**
- * Adjusts the label's size to fit the caption size.
- */
- void adjustSize();
-
-
- // Inherited from Widget
-
- virtual void draw(Graphics* graphics);
-
- virtual void drawBorder(Graphics* graphics);
-
- protected:
- /**
- * Holds the caption of the label.
- */
- std::string mCaption;
-
- /**
- * Holds the alignment of the caption.
- */
- unsigned int mAlignment;
- };
-}
-
-#endif // end GCN_LABEL_HPP
diff --git a/src/include/guisan/widgets/listbox.hpp b/src/include/guisan/widgets/listbox.hpp
deleted file mode 100644
index fc0e0f0b..00000000
--- a/src/include/guisan/widgets/listbox.hpp
+++ /dev/null
@@ -1,254 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/keylistener.hpp"
-#include "guisan/listmodel.hpp"
-#include "guisan/mouselistener.hpp"
-#include "guisan/platform.hpp"
-#include "guisan/widget.hpp"
-
-namespace gcn
-{
- class SelectionListener;
-
- /**
- * An implementation of a list box where an item can be selected.
- *
- * To be able display a list the list box uses a user provided list model.
- * A list model can be any class that implements the ListModel interface.
- *
- * If an item is selected in the list box a select event will be sent to all selection
- * listeners of the list box. If an item is selected by using a mouse click or by using
- * the enter or space key an action event will be sent to all action listeners of the
- * list box.
- */
- class GCN_CORE_DECLSPEC ListBox :
- public Widget,
- public MouseListener,
- public KeyListener
- {
- public:
- /**
- * Constructor.
- */
- ListBox();
-
- /**
- * Constructor.
- *
- * @param listModel the list model to use.
- */
- ListBox(ListModel *listModel);
-
- /**
- * Destructor.
- */
- virtual ~ListBox() { }
-
- /**
- * Gets the selected item as an index in the list model.
- *
- * @return the selected item as an index in the list model.
- * @see setSelected
- */
- int getSelected() const;
-
- /**
- * Sets the selected item. The selected item is represented by
- * an index from the list model.
- *
- * @param selected the selected item as an index from the list model.
- * @see getSelected
- */
- void setSelected(int selected);
-
- /**
- * Sets the list model to use.
- *
- * @param listModel the list model to use.
- * @see getListModel
- */
- void setListModel(ListModel *listModel);
-
- /**
- * Gets the list model used.
- *
- * @return the list model used.
- * @see setListModel
- */
- ListModel *getListModel();
-
- /**
- * Adjusts the size of the list box to fit it's list model.
- */
- void adjustSize();
-
- /**
- * Checks whether the list box wraps when selecting items with a keyboard.
- *
- * Wrapping means that the selection of items will be wrapped. That is, if
- * the first item is selected and up is pressed, the last item will get
- * selected. If the last item is selected and down is pressed, the first item
- * will get selected.
- *
- * @return true if wrapping is enabled, fasle otherwise.
- * @see setWrappingEnabled
- */
- bool isWrappingEnabled() const;
-
- /**
- * Sets the list box to wrap or not when selecting items with a keyboard.
- *
- * Wrapping means that the selection of items will be wrapped. That is, if
- * the first item is selected and up is pressed, the last item will get
- * selected. If the last item is selected and down is pressed, the first item
- * will get selected.
- *
- * @see isWrappingEnabled
- */
- void setWrappingEnabled(bool wrappingEnabled);
-
- /**
- * Adds a selection listener to the list box. When the selection
- * changes an event will be sent to all selection listeners of the
- * list box.
- *
- * @param selectionListener The selection listener to add.
- * @since 0.8.0
- */
- void addSelectionListener(SelectionListener* selectionListener);
-
- /**
- * Removes a selection listener from the list box.
- *
- * @param selectionListener The selection listener to remove.
- * @since 0.8.0
- */
- void removeSelectionListener(SelectionListener* selectionListener);
-
-
- // Inherited from Widget
-
- virtual void draw(Graphics* graphics);
-
- virtual void drawBorder(Graphics* graphics);
-
- virtual void logic();
-
-
- // Inherited from KeyListener
-
- virtual void keyPressed(KeyEvent& keyEvent);
-
-
- // Inherited from MouseListener
-
- virtual void mousePressed(MouseEvent& mouseEvent);
-
- virtual void mouseWheelMovedUp(MouseEvent& mouseEvent);
-
- virtual void mouseWheelMovedDown(MouseEvent& mouseEvent);
-
- virtual void mouseDragged(MouseEvent& mouseEvent);
-
-
- protected:
- /**
- * Distributes a value changed event to all selection listeners
- * of the list box.
- *
- * @since 0.8.0
- */
- void distributeValueChangedEvent();
-
- /**
- * The list model to use.
- */
- ListModel *mListModel;
-
- /**
- * The selected item as an index in the list model.
- */
- int mSelected;
-
- /**
- * True if wrapping is enabled, false otherwise.
- */
- bool mWrappingEnabled;
-
- /**
- * Typdef.
- */
- typedef std::list SelectionListenerList;
-
- /**
- * The selection listeners of the list box.
- */
- SelectionListenerList mSelectionListeners;
-
- /**
- * Typedef.
- */
- typedef SelectionListenerList::iterator SelectionListenerIterator;
- };
-}
-
-#endif // end GCN_LISTBOX_HPP
diff --git a/src/include/guisan/widgets/radiobutton.hpp b/src/include/guisan/widgets/radiobutton.hpp
deleted file mode 100644
index 0b1e0aca..00000000
--- a/src/include/guisan/widgets/radiobutton.hpp
+++ /dev/null
@@ -1,225 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-#include
-
-#include "guisan/keylistener.hpp"
-#include "guisan/mouselistener.hpp"
-#include "guisan/platform.hpp"
-#include "guisan/widget.hpp"
-
-namespace gcn
-{
- /**
- * Implementation of a radio button where a user can select or deselect
- * the radio button and where the status of the radio button is displayed to the user.
- * A radio button can belong to a group and when a radio button belongs to a
- * group only one radio button can be selected in the group. A radio button is
- * capable of displaying a caption.
- *
- * If a radio button's state changes an action event will be sent to all action
- * listeners of the check box.
- */
- class GCN_CORE_DECLSPEC RadioButton :
- public Widget,
- public MouseListener,
- public KeyListener
- {
- public:
-
- /**
- * Constructor.
- */
- RadioButton();
-
- /**
- * Constructor.
- *
- * @param caption The caption of the radio button.
- * @param group The group the radio button should belong to.
- * @param selected True if the radio button should be selected.
- */
- RadioButton(const std::string &caption,
- const std::string &group,
- bool selected = false);
-
- /**
- * Destructor.
- */
- virtual ~RadioButton();
-
- /**
- * Checks if the radio button is selected.
- *
- * @return True if the radio button is selecte, false otherwise.
- * @see setSelected
- */
- bool isSelected() const;
-
- /**
- * Sets the radio button to selected or not.
- *
- * @param selected True if the radio button should be selected,
- * false otherwise.
- * @see isSelected
- */
- void setSelected(bool selected);
-
- /**
- * Gets the caption of the radio button.
- *
- * @return The caption of the radio button.
- * @see setCaption
- */
- const std::string &getCaption() const;
-
- /**
- * Sets the caption of the radio button. It's advisable to call
- * adjustSize after setting of the caption to adjust the
- * radio button's size to fit the caption.
- *
- * @param caption The caption of the radio button.
- * @see getCaption, adjustSize
- */
- void setCaption(const std::string caption);
-
- /**
- * Sets the group the radio button should belong to. Note that
- * a radio button group is unique per application, not per Gui object
- * as the group is stored in a static map.
- *
- * @param group The name of the group.
- * @see getGroup
- */
- void setGroup(const std::string &group);
-
- /**
- * Gets the group the radio button belongs to.
- *
- * @return The group the radio button belongs to.
- * @see setGroup
- */
- const std::string &getGroup() const;
-
- /**
- * Adjusts the radio button's size to fit the caption.
- */
- void adjustSize();
-
-
- // Inherited from Widget
-
- virtual void draw(Graphics* graphics);
-
- virtual void drawBorder(Graphics* graphics);
-
-
- // Inherited from KeyListener
-
- virtual void keyPressed(KeyEvent& keyEvent);
-
-
- // Inherited from MouseListener
-
- virtual void mouseClicked(MouseEvent& mouseEvent);
-
- virtual void mouseDragged(MouseEvent& mouseEvent);
-
- protected:
- /**
- * Draws the box.
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void drawBox(Graphics *graphics);
-
- /**
- * True if the radio button is selected, false otherwise.
- */
- bool mSelected;
-
- /**
- * Holds the caption of the radio button.
- */
- std::string mCaption;
-
- /**
- * Holds the group of the radio button.
- */
- std::string mGroup;
-
- /**
- * Typdef.
- */
- typedef std::multimap GroupMap;
-
- /**
- * Typdef.
- */
- typedef GroupMap::iterator GroupIterator;
-
- /**
- * Holds all available radio button groups.
- */
- static GroupMap mGroupMap;
- };
-}
-
-#endif // end GCN_RADIOBUTTON_HPP
diff --git a/src/include/guisan/widgets/scrollarea.hpp b/src/include/guisan/widgets/scrollarea.hpp
deleted file mode 100644
index 6a723ea8..00000000
--- a/src/include/guisan/widgets/scrollarea.hpp
+++ /dev/null
@@ -1,488 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u
-
-#include "guisan/basiccontainer.hpp"
-#include "guisan/mouselistener.hpp"
-#include "guisan/platform.hpp"
-
-namespace gcn
-{
- /**
- * A ScrollArea in which another Widget can be added. It the other Widget
- * is bigger then the ScrollArea, the ScrollArea will only display the part
- * of the Widget that fits the ScrollArea and make it possible to scroll
- * to the other areas of the Widget.
- *
- * NOTE: A TextBox or a ListBox looks really ugly unless they exist in a
- * ScrollArea.
- */
- class GCN_CORE_DECLSPEC ScrollArea:
- public BasicContainer,
- public MouseListener
- {
- public:
-
- /**
- * Constructor.
- */
- ScrollArea();
-
- /**
- * Constructor.
- *
- * @param content the content of the ScrollArea.
- */
- ScrollArea(Widget *content);
-
- /**
- * Constructor.
- *
- * @param content the content of the ScrollArea.
- * @param hPolicy the policy for the horizontal scrollbar. See enum with
- * policies.
- * @param vPolicy the policy for the vertical scrollbar. See enum with
- * policies.
- */
- ScrollArea(Widget *content, unsigned int hPolicy, unsigned int vPolicy);
-
- /**
- * Destructor.
- */
- virtual ~ScrollArea();
-
- /**
- * Sets the content.
- *
- * @param widget the content of the ScrollArea.
- */
- void setContent(Widget* widget);
-
- /**
- * Gets the content.
- *
- * @return the content of the ScrollArea.
- */
- Widget* getContent();
-
- /**
- * Sets the horizontal scrollbar policy. See enum with policies.
- *
- * @param hPolicy the policy for the horizontal scrollbar. See enum with
- * policies.
- */
- void setHorizontalScrollPolicy(unsigned int hPolicy);
-
- /**
- * Gets the horizontal scrollbar policy. See enum with policies.
- *
- * @return the policy for the horizontal scrollbar policy. See enum with
- * policies.
- */
- unsigned int getHorizontalScrollPolicy() const;
-
- /**
- * Sets the vertical scrollbar policy. See enum with policies.
- *
- * @param vPolicy the policy for the vertical scrollbar. See enum with
- * policies.
- */
- void setVerticalScrollPolicy(unsigned int vPolicy);
-
- /**
- * Gets the vertical scrollbar policy. See enum with policies.
- *
- * @return the policy for the vertical scrollbar. See enum with
- * policies.
- */
- unsigned int getVerticalScrollPolicy() const;
-
- /**
- * Sets the horizontal and vertical scrollbar policy. See enum with policies.
- *
- * @param hPolicy the policy for the horizontal scrollbar. See enum with
- * policies.
- * @param vPolicy the policy for the vertical scrollbar. See enum with
- * policies.
- */
- void setScrollPolicy(unsigned int hPolicy, unsigned int vPolicy);
-
- /**
- * Sets the amount to scroll vertically.
- *
- * @param vScroll the amount to scroll.
- */
- void setVerticalScrollAmount(int vScroll);
-
- /**
- * Gets the amount that is scrolled vertically.
- * @return the scroll amount on vertical scroll.
- */
- int getVerticalScrollAmount() const;
-
- /**
- * Sets the amount to scroll horizontally.
- *
- * @param hScroll the amount to scroll.
- */
- void setHorizontalScrollAmount(int hScroll);
-
- /**
- * Gets the amount that is scrolled horizontally.
- *
- * @return the scroll amount on horizontal scroll.
- */
- int getHorizontalScrollAmount() const;
-
- /**
- * Sets the amount to scroll horizontally and vertically.
- *
- * @param hScroll the amount to scroll on horizontal scroll.
- * @param vScroll the amount to scroll on vertical scroll.
- */
- void setScrollAmount(int hScroll, int vScroll);
-
- /**
- * Gets the maximum amount of horizontal scroll.
- *
- * @return the horizontal max scroll.
- */
- int getHorizontalMaxScroll();
-
- /**
- * Gets the maximum amount of vertical scroll.
- *
- * @return the vertical max scroll.
- */
- int getVerticalMaxScroll();
-
- /**
- * Sets the width.
- *
- * @param width the width of the ScrollBar.
- */
- void setScrollbarWidth(int width);
-
- /**
- * Gets the width.
-
- * @return the width of the ScrollBar.
- */
- int getScrollbarWidth() const;
-
- /**
- * Sets the amount to scroll in pixels when the left scroll button is
- * pushed.
- */
- void setLeftButtonScrollAmount(int amount);
-
- /**
- * Sets the amount to scroll in pixels when the right scroll button is
- * pushed.
- */
- void setRightButtonScrollAmount(int amount);
-
- /**
- * Sets the amount to scroll in pixels when the up scroll button is
- * pushed.
- */
- void setUpButtonScrollAmount(int amount);
-
- /**
- * Sets the amount to scroll in pixels when the down scroll button is
- * pushed.
- */
- void setDownButtonScrollAmount(int amount);
-
- /**
- * Gets the amount to scroll in pixels when the left scroll button is
- * pushed.
- *
- * @return the amount to scroll when the left scroll button is pushed.
- */
- int getLeftButtonScrollAmount() const;
-
- /**
- * Gets the amount to scroll in pixels when the right scroll button is
- * pushed.
- *
- * @return the amount to scroll when the right scroll button is pushed.
- */
- int getRightButtonScrollAmount() const;
-
- /**
- * Gets the amount to scroll in pixels when the up scroll button is
- * pushed.
- *
- * @return the amount to scroll when the up scroll button is pushed.
- */
- int getUpButtonScrollAmount() const;
-
- /**
- * Gets the amount to scroll in pixels when the down scroll button is
- * pushed.
- *
- * @return the amount to scroll when the down scroll button is pushed.
- */
- int getDownButtonScrollAmount() const;
-
-
- // Inherited from BasicContainer
-
- virtual void showWidgetPart(Widget* widget, Rectangle area);
-
- virtual Rectangle getChildrenArea();
-
- virtual Widget *getWidgetAt(int x, int y);
-
-
- // Inherited from Widget
-
- virtual void draw(Graphics *graphics);
-
- virtual void drawBorder(Graphics* graphics);
-
- virtual void logic();
-
- void setWidth(int width);
-
- void setHeight(int height);
-
- void setDimension(const Rectangle& dimension);
-
-
- // Inherited from MouseListener
-
- virtual void mousePressed(MouseEvent& mouseEvent);
-
- virtual void mouseReleased(MouseEvent& mouseEvent);
-
- virtual void mouseDragged(MouseEvent& mouseEvent);
-
- virtual void mouseWheelMovedUp(MouseEvent& mouseEvent);
-
- virtual void mouseWheelMovedDown(MouseEvent& mouseEvent);
-
-
- /**
- * Scrollpolicies for the horizontal and vertical scrollbar.
- * The policies are:
- *
- * SHOW_ALWAYS - Always show the scrollbars no matter what.
- * SHOW_NEVER - Never show the scrollbars no matter waht.
- * SHOW_AUTO - Show the scrollbars only when needed. That is if the
- * content grows larger then the ScrollArea.
- */
- enum
- {
- SHOW_ALWAYS,
- SHOW_NEVER,
- SHOW_AUTO
- };
-
- protected:
- /**
- * Draws the background of the ScrollArea
- * (the area behind the content).
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void drawBackground(Graphics *graphics);
-
- /**
- * Draws the up button.
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void drawUpButton(Graphics *graphics);
-
- /**
- * Draws the down button.
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void drawDownButton(Graphics *graphics);
-
- /**
- * Draws the left button.
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void drawLeftButton(Graphics *graphics);
-
- /**
- * Draws the right button.
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void drawRightButton(Graphics *graphics);
-
- /**
- * Draws the vertical scrollbar.
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void drawVBar(Graphics* graphics);
-
- /**
- * Draws the horizontal scrollbar.
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void drawHBar(Graphics* graphics);
-
- /**
- * Draws the vertical marker.
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void drawVMarker(Graphics* graphics);
-
- /**
- * Draws the horizontal marker.
- *
- * @param graphics a Graphics object to draw with.
- */
- virtual void drawHMarker(Graphics* graphics);
-
- /**
- * Checks the policies for the scrollbars.
- */
- virtual void checkPolicies();
-
- /**
- * Gets the up button dimension.
- *
- * @return the dimension of the up button.
- */
- Rectangle getUpButtonDimension();
-
- /**
- * Gets the down button dimension.
- *
- * @return the dimension of the down button.
- */
- Rectangle getDownButtonDimension();
-
- /**
- * Gets the left button dimension.
- *
- * @return the dimension of the left button.
- */
- Rectangle getLeftButtonDimension();
-
- /**
- * Gets the right button dimension.
- *
- * @return the dimension of the right button.
- */
- Rectangle getRightButtonDimension();
-
- /**
- * Gets the vertical scrollbar dimension.
- *
- * @return the dimension of the vertical scrollbar.
- */
- Rectangle getVerticalBarDimension();
-
- /**
- * Gets the horizontal scrollbar dimension.
- *
- * @return the dimension of the horizontal scrollbar.
- */
- Rectangle getHorizontalBarDimension();
-
- /**
- * Gets the vertical marker dimension.
- *
- * @return the dimension of the vertical marker.
- */
- Rectangle getVerticalMarkerDimension();
-
- /**
- * Gets the horizontal marker dimension.
- *
- * @return the dimension of the horizontal marker.
- */
- Rectangle getHorizontalMarkerDimension();
-
- int mVScroll;
- int mHScroll;
- int mScrollbarWidth;
- unsigned int mHPolicy;
- unsigned int mVPolicy;
- bool mVBarVisible;
- bool mHBarVisible;
- bool mUpButtonPressed;
- bool mDownButtonPressed;
- bool mLeftButtonPressed;
- bool mRightButtonPressed;
- int mUpButtonScrollAmount;
- int mDownButtonScrollAmount;
- int mLeftButtonScrollAmount;
- int mRightButtonScrollAmount;
- bool mIsVerticalMarkerDragged;
- bool mIsHorizontalMarkerDragged;
- int mHorizontalMarkerDragOffset;
- int mVerticalMarkerDragOffset;
- };
-}
-
-#endif // end GCN_SCROLLAREA_HPP
diff --git a/src/include/guisan/widgets/slider.hpp b/src/include/guisan/widgets/slider.hpp
deleted file mode 100644
index 99656147..00000000
--- a/src/include/guisan/widgets/slider.hpp
+++ /dev/null
@@ -1,267 +0,0 @@
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson
- *
- * Js_./
- * Per Larsson a.k.a finalman _RqZ{a<^_aa
- * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u )\a//
- * _Qhm`] _f "'c 1!5m
- * Visit: http://guichan.darkbits.org )Qkws?a-?' ._/L #'
- * binary forms, with or without )4d[#7r, . ' )d`)[
- * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam'
- * that the following conditions are met: j<. a J@\
- * this list of conditions and the j(]1u