guichan fixes
This commit is contained in:
0
project/jni/guichan/Android.mk
Normal file → Executable file
0
project/jni/guichan/Android.mk
Normal file → Executable file
33
project/jni/guichan/NEWS
Normal file → Executable file
33
project/jni/guichan/NEWS
Normal file → Executable file
@@ -1,4 +1,34 @@
|
||||
2008-01-23 Eigth Beta release Guichan 0.6.1
|
||||
2009-09-03 Fourteenth Beta release Guichan 0.8.2
|
||||
|
||||
A minor release that fixes some bugs in 0.8.1 as well as updating outdated
|
||||
autoconf files in the release.
|
||||
|
||||
2008-04-26 Thirteenth Beta release Guichan 0.8.1
|
||||
|
||||
A minor release that fixes a soname problem along with a couple of GCC
|
||||
3.4.2 issues.
|
||||
|
||||
2008-04-06 Twelfth Beta release Guichan 0.8.0
|
||||
|
||||
The new version of Guichan has better HGE support, enhanced API documentation,
|
||||
enhanced examples and two new widgets called TabbedArea and Tab. Also a
|
||||
number of nasty bugs have been fixed.
|
||||
|
||||
2007-07-11 Tenth Beta release Guichan 0.7.1
|
||||
|
||||
Small update compared to the 0.7.0 release. Missing source for the add ons,
|
||||
the HGE support and the OpenLayer support was added.
|
||||
|
||||
2007-06-30 Ninth Beta release Guichan 0.7.0
|
||||
|
||||
The new version of Guichan contains support for the library OpenLayer
|
||||
and experimental support for the library HGE. As users have had many
|
||||
problems related to binary incompatibility with DLLs we are not going
|
||||
to provide pre-compiled binaries anymore. From now on users are encourage
|
||||
to compile Guichan themselves either by making DLLs and library files or
|
||||
by simply including the source of Guichan in to the project using Guichan.
|
||||
|
||||
2007-01-23 Eigth Beta release Guichan 0.6.1
|
||||
|
||||
A small update compared to the 0.6.0 release which fixes a prolem
|
||||
with inclusion OpenGL headers on Macintosh and removes some unneccesary
|
||||
@@ -56,3 +86,4 @@ complete list of changes, check out the ChangeLog.
|
||||
|
||||
The first Guichan API is ready for testing and evaluation.
|
||||
Please send us feedbacks.
|
||||
|
||||
|
||||
77
project/jni/guichan/README
Normal file → Executable file
77
project/jni/guichan/README
Normal file → Executable file
@@ -1,58 +1,59 @@
|
||||
IMPORTANT!
|
||||
=========
|
||||
Guichan is currently in a beta stage. This means that the API is not fixed and may
|
||||
change in the future. Every API change will break compatibility between older
|
||||
versions of Guichan.
|
||||
Guichan is currently in a beta stage. This means that the API is not fixed and
|
||||
may change in the future. Every API change will break compatibility between
|
||||
older versions of Guichan.
|
||||
|
||||
INTRODUCTON TO GUICHAN
|
||||
======================
|
||||
Guichan is a C++ GUI library designed for games. It comes with a standard set of
|
||||
'widgets' and can use several different objects for displaying graphics and
|
||||
capturing user input.
|
||||
Guichan has an abstract design which allows users of Guichan to use different
|
||||
objects for displaying of graphics and grabbing of user input. Guichan comes with
|
||||
three implemented graphics objects (SDLGraphics, OpenGLGraphics and AllegroGraphics)
|
||||
and two implemented input objects (SDLInput and AllegroInput). Due to Guichan's
|
||||
extendible nature, new objects can also be created by the developer to suit their
|
||||
needs.
|
||||
As Guichan is designed for games, Guichan lacks many features of more advanced GUI
|
||||
libraries (such as GTK and QT). However, a game developer may not normally require
|
||||
all the advanced features of the larger GUI libraries. Guichan aims to keep small
|
||||
and simple, thus avoiding the complication and large dependencies found with some
|
||||
other GUI libraries. Guichan is small but contains all basic GUI features making it
|
||||
ideal for games.
|
||||
Guichan is a C++ GUI library designed for games. It comes with a standard set
|
||||
of 'widgets' and can use several different objects for displaying graphics and
|
||||
capturing user input. Guichan has an abstract design which allows users of
|
||||
Guichan to use different objects for displaying of graphics and grabbing of
|
||||
user input. Guichan comes with three implemented graphics objects (SDLGraphics,
|
||||
OpenGLGraphics and AllegroGraphics) and two implemented input objects (SDLInput
|
||||
and AllegroInput). Due to Guichan's extendible nature, new objects can also be
|
||||
created by the developer to suit their needs. As Guichan is designed for
|
||||
games, Guichan lacks many features of more advanced GUI libraries (such as GTK
|
||||
and QT). However, a game developer may not normally require all the advanced
|
||||
features of the larger GUI libraries. Guichan aims to keep small and simple,
|
||||
thus avoiding the complication and large dependencies found with some other GUI
|
||||
libraries. Guichan is small but contains all basic GUI features making it ideal
|
||||
for games.
|
||||
|
||||
Guichan allows the developer control over the initialization of external libraries,
|
||||
giving a degree of freedom which is almost required in game development, but not
|
||||
provided by some GUI libraries. Guichan should not be considered a full GUI library
|
||||
but rather a tool or helper library for game development.
|
||||
Guichan allows the developer control over the initialization of external
|
||||
libraries, giving a degree of freedom which is almost required in game
|
||||
development, but not provided by some GUI libraries. Guichan should not be
|
||||
considered a full GUI library but rather a tool or helper library for game
|
||||
development.
|
||||
|
||||
The basic nature of Guichan means that it comes with a small number of default
|
||||
widgets. There exists no themes or theme handling for Guichan, as their
|
||||
implementation would increase the size and complexity of the library unnecessarily.
|
||||
Instead, the developer creates their own new widgets by inheriting from the standard
|
||||
widgets or by overloading standard widget functions. This makes Guichan much more
|
||||
flexible for customisation than theme based GUIs, and more natural to use for C++
|
||||
developers, as they need only learn the API instead of a whole new theming system.
|
||||
The basic nature of Guichan means that it comes with a small number of default
|
||||
widgets. There exists no themes or theme handling for Guichan, as their
|
||||
implementation would increase the size and complexity of the library
|
||||
unnecessarily. Instead, the developer creates their own new widgets by
|
||||
inheriting from the standard widgets or by overloading standard widget
|
||||
functions. This makes Guichan much more flexible for customisation than theme
|
||||
based GUIs, and more natural to use for C++ developers, as they need only learn
|
||||
the API instead of a whole new theming system.
|
||||
|
||||
FOR MORE INFORMATION AND DOWNLOADS
|
||||
==================================
|
||||
For more general information about Guichan and/or downloads related to Guichan
|
||||
For more general information about Guichan and/or downloads related to Guichan
|
||||
please visit the Guichan homepage at http://guichan.sourceforge.net.
|
||||
|
||||
GETTING HELP WITH GUICHAN
|
||||
=========================
|
||||
If you need help with Guichan, the best way to proceed is to ask questions either
|
||||
by joining the users mailing list or by joining our forum. Information about
|
||||
Guichan's mailing lists and our forum is found at the Guichan homepate at
|
||||
If you need help with Guichan, the best way to proceed is to ask questions
|
||||
either by joining the users mailing list or by joining our forum. Information
|
||||
about Guichan's mailing lists and our forum is found at the Guichan homepate at
|
||||
http://guichan.sourceforge.net.
|
||||
|
||||
|
||||
GETTING INVOLVED WITH GUICHAN DEVELOPMENT
|
||||
=========================================
|
||||
If you want to get involved with Guichan development, the best way to proceed is to
|
||||
suggest improvements to Guichan either by joining the developers mailing list or
|
||||
by joining our forum. Information about Guichan's mailing lists and our forum is
|
||||
found at the Guichan homepate at http://guichan.sourceforge.net.
|
||||
If you want to get involved with Guichan development, the best way to proceed
|
||||
is to suggest improvements to Guichan either by joining the developers mailing
|
||||
list or by joining our forum. Information about Guichan's mailing lists and our
|
||||
forum is found at the Guichan homepate at http://guichan.sourceforge.net.
|
||||
|
||||
By Olof Naessén 2006-06-30.
|
||||
By Olof Naessén 2006-06-30.
|
||||
|
||||
2
project/jni/guichan/include/config.hpp
Normal file → Executable file
2
project/jni/guichan/include/config.hpp
Normal file → Executable file
@@ -8,7 +8,7 @@
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the <GL/gl.h> header file. */
|
||||
/* #undef HAVE_GL_GL_H */
|
||||
#define HAVE_GL_GL_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
0
project/jni/guichan/include/config.hpp.in
Normal file → Executable file
0
project/jni/guichan/include/config.hpp.in
Normal file → Executable file
0
project/jni/guichan/include/guichan.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/actionevent.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/actionevent.hpp
Normal file → Executable file
115
project/jni/guichan/include/guichan/actionevent.hpp~
Executable file
115
project/jni/guichan/include/guichan/actionevent.hpp~
Executable file
@@ -0,0 +1,115 @@
|
||||
/* _______ __ __ __ ______ __ __ _______ __ __
|
||||
* / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
|
||||
* / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
|
||||
* / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
|
||||
* / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
|
||||
* /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
|
||||
* \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
|
||||
*
|
||||
* Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson
|
||||
*
|
||||
*
|
||||
* Per Larsson a.k.a finalman
|
||||
* Olof Naessén a.k.a jansem/yakslem
|
||||
*
|
||||
* Visit: http://guichan.sourceforge.net
|
||||
*
|
||||
* License: (BSD)
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name of Guichan nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef GCN_ACTIONEVENT_HPP
|
||||
#define GCN_ACTIONEVENT_HPP
|
||||
|
||||
#include "guichan/event.hpp"
|
||||
#include "guichan/platform.hpp"
|
||||
#ifndef CLANG
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
namespace gcn
|
||||
{
|
||||
class Widget;
|
||||
|
||||
/**
|
||||
* Represents an action event. An action event is an event
|
||||
* that can be fired by a widget whenever an action has occured.
|
||||
* What exactly an action is is up to the widget that fires
|
||||
* the action event. An example is a Button which fires an action
|
||||
* event as soon as the Button is clicked, another example is
|
||||
* TextField which fires an action event as soon as the enter
|
||||
* key is pressed.
|
||||
*
|
||||
* Any object can listen for actions from widgets by implementing
|
||||
* the ActionListener interface.
|
||||
*
|
||||
* If you have implement a widget of your own it's a good idea to
|
||||
* let the widget fire action events whenever you feel an action
|
||||
* has occured so action listeners of the widget can be informed
|
||||
* of the state of the widget.
|
||||
*
|
||||
* @see Widget::addActionListener, Widget::removeActionListener,
|
||||
* Widget::distributeActionEvent
|
||||
* @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 An identifier of the event.
|
||||
*/
|
||||
ActionEvent(Widget* source, const std::string& id);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
virtual ~ActionEvent();
|
||||
|
||||
/**
|
||||
* Gets the identifier of the event. An identifier can
|
||||
* be used to distinguish from two actions from the same
|
||||
* widget or to let many widgets fire the same widgets
|
||||
* that should be treated equally.
|
||||
*
|
||||
* @return The identifier of the event.
|
||||
*/
|
||||
const std::string& getId() const;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Holds the identifier of the event.
|
||||
*/
|
||||
std::string mId;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // GCN_ACTIONEVENT_HPP
|
||||
|
||||
0
project/jni/guichan/include/guichan/actionlistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/actionlistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/allegro.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/allegro.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/basiccontainer.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/basiccontainer.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/cliprectangle.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/cliprectangle.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/color.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/color.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/contrib/sdl/sdltruetypefont.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/contrib/sdl/sdltruetypefont.hpp
Normal file → Executable file
237
project/jni/guichan/include/guichan/contrib/widgets/adjustingcontainer.hpp
Executable file
237
project/jni/guichan/include/guichan/contrib/widgets/adjustingcontainer.hpp
Executable file
@@ -0,0 +1,237 @@
|
||||
/* _______ __ __ __ ______ __ __ _______ __ __
|
||||
* / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
|
||||
* / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
|
||||
* / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
|
||||
* / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
|
||||
* /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
|
||||
* \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
|
||||
*
|
||||
* Copyright (c) 2007 - 2008 Josh Matthews and Olof Naessén
|
||||
*
|
||||
*
|
||||
* Per Larsson a.k.a finalman
|
||||
* Olof Naessén a.k.a jansem/yakslem
|
||||
*
|
||||
* Visit: http://guichan.sourceforge.net
|
||||
*
|
||||
* License: (BSD)
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name of Guichan nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef GCN_CONTRIB_ADJUSTINGCONTAINER_HPP
|
||||
#define GCN_CONTRIB_ADJUSTINGCONTAINER_HPP
|
||||
|
||||
#include "guichan/widgets/container.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace gcn
|
||||
{
|
||||
namespace contrib
|
||||
{
|
||||
/**
|
||||
* Self-adjusting Container class. AdjustingContainers are an easy way to
|
||||
* have Guichan position a group of widgets for you. It organizes elements
|
||||
* in a table layout, with fixed columns and variable rows. The user specifies
|
||||
*
|
||||
* @verbitam
|
||||
* <ul>
|
||||
* <li>the number of columns</li>
|
||||
* <li>horizontal spacing between columns</li>
|
||||
* <li>vertical spacing between rows</li>
|
||||
* <li>padding around the sides of the container</li>
|
||||
* <li>each column's alignment</li>
|
||||
* </ul>
|
||||
* @endverbitam
|
||||
*
|
||||
* These properties give the user a lot of flexibility to make the
|
||||
* widgets look just right.
|
||||
* @code
|
||||
* AdjustingContainer *adjust = new AdjustingContainer;
|
||||
* adjust->setPadding(5, 5, 5, 5); //left, right, top, bottom
|
||||
* adjust->setHorizontalSpacing(3);
|
||||
* adjust->setVerticalSpacing(3);
|
||||
* adjust->setColumns(3);
|
||||
* adjust->setColumnAlignment(0, AdjustingContainer::LEFT);
|
||||
* adjust->setColumnAlignment(1, AdjustingContainer::CENTER);
|
||||
* adjust->setColumnAlignment(2, AdjustingContainer::RIGHT);
|
||||
* top->add(adjust);
|
||||
*
|
||||
* for(int j = 0; j < 9; j++)
|
||||
* {
|
||||
* gcn::Label *l;
|
||||
* int r = rand() % 3;
|
||||
* if(r == 0)
|
||||
* l = new gcn::Label("Short");
|
||||
* else if(r == 1)
|
||||
* l = new gcn::Label("A longer phrase");
|
||||
* else
|
||||
* l = new gcn::Label("Extravagent and wordy text");
|
||||
* adjust->add(l);
|
||||
* @endcode
|
||||
*
|
||||
* Output:
|
||||
* @verbitam
|
||||
* <pre>
|
||||
*+---------------------------------------------------------------------------+
|
||||
*| |
|
||||
*| A longer phrase Short Extravagent and wordy text |
|
||||
*| |
|
||||
*| Short Extravagent and wordy text Short |
|
||||
*| |
|
||||
*| Short A longer phrase A longer phrase |
|
||||
*| |
|
||||
*+---------------------------------------------------------------------------+
|
||||
* </pre>
|
||||
* @endverbitam
|
||||
* As you can see, each column is only as big as its largest element.
|
||||
* The AdjustingContainer will resize itself and rearrange its contents
|
||||
* based on whatever widgets it contains, allowing dynamic addition and
|
||||
* removal while the program is running. It also plays nicely with ScrollAreas,
|
||||
* allowing you to show a fixed, maximum size while not limiting the actual
|
||||
* container.
|
||||
*
|
||||
* For more help with using AdjustingContainers, try the Guichan forums
|
||||
* (http://guichan.sourceforge.net/forum/) or email mrlachatte@gmail.com.
|
||||
*
|
||||
* @author Josh Matthews
|
||||
*/
|
||||
class AdjustingContainer : public gcn::Container
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
AdjustingContainer();
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
virtual ~AdjustingContainer();
|
||||
|
||||
/**
|
||||
* Set the number of columns to divide the widgets into.
|
||||
* The number of rows is derived automatically from the number
|
||||
* of widgets based on the number of columns. Default column
|
||||
* alignment is left.
|
||||
*
|
||||
* @param numberOfColumns the number of columns.
|
||||
*/
|
||||
virtual void setNumberOfColumns(unsigned int numberOfColumns);
|
||||
|
||||
/**
|
||||
* Set a specific column's alignment.
|
||||
*
|
||||
* @param column the column number, starting from 0.
|
||||
* @param alignment the column's alignment. See enum with alignments.
|
||||
*/
|
||||
virtual void setColumnAlignment(unsigned int column, unsigned int alignment);
|
||||
|
||||
/**
|
||||
* Set the padding for the sides of the container.
|
||||
*
|
||||
* @param paddingLeft left padding.
|
||||
* @param paddingRight right padding.
|
||||
* @param paddingTop top padding.
|
||||
* @param paddingBottom bottom padding.
|
||||
*/
|
||||
virtual void setPadding(unsigned int paddingLeft,
|
||||
unsigned int paddingRight,
|
||||
unsigned int paddingTop,
|
||||
unsigned int paddingBottom);
|
||||
|
||||
/**
|
||||
* Set the spacing between rows.
|
||||
*
|
||||
* @param verticalSpacing spacing in pixels.
|
||||
*/
|
||||
virtual void setVerticalSpacing(unsigned int verticalSpacing);
|
||||
|
||||
/**
|
||||
* Set the horizontal spacing between columns.
|
||||
*
|
||||
* @param horizontalSpacing spacing in pixels.
|
||||
*/
|
||||
virtual void setHorizontalSpacing(unsigned int horizontalSpacing);
|
||||
|
||||
/**
|
||||
* Rearrange the widgets and resize the container.
|
||||
*/
|
||||
virtual void adjustContent();
|
||||
|
||||
|
||||
// Inherited from Container
|
||||
|
||||
virtual void logic();
|
||||
|
||||
virtual void add(Widget *widget);
|
||||
|
||||
virtual void add(Widget *widget, int x, int y);
|
||||
|
||||
virtual void remove(Widget *widget);
|
||||
|
||||
virtual void clear();
|
||||
|
||||
/**
|
||||
* Possible alignment values for each column.
|
||||
*
|
||||
* LEFT - Align content to the left of the column.
|
||||
* MIDDLE - Align content to the middle of the column.
|
||||
* RIGHT - Align content to the right of the column.
|
||||
*/
|
||||
enum
|
||||
{
|
||||
LEFT = 0,
|
||||
CENTER,
|
||||
RIGHT
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Adjust the size of the container to fit all the widgets.
|
||||
*/
|
||||
virtual void adjustSize();
|
||||
|
||||
std::vector<Widget*> mContainedWidgets;
|
||||
std::vector<unsigned int> mColumnWidths;
|
||||
std::vector<unsigned int> mColumnAlignment;
|
||||
std::vector<unsigned int> mRowHeights;
|
||||
unsigned int mWidth;
|
||||
unsigned int mHeight;
|
||||
unsigned int mNumberOfColumns;
|
||||
unsigned int mNumberOfRows;
|
||||
unsigned int mPaddingLeft;
|
||||
unsigned int mPaddingRight;
|
||||
unsigned int mPaddingTop;
|
||||
unsigned int mPaddingBottom;
|
||||
unsigned int mVerticalSpacing;
|
||||
unsigned int mHorizontalSpacing;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
0
project/jni/guichan/include/guichan/deathlistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/deathlistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/defaultfont.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/defaultfont.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/event.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/event.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/exception.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/exception.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/focushandler.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/focushandler.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/focuslistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/focuslistener.hpp
Normal file → Executable file
3
project/jni/guichan/include/guichan/font.hpp
Normal file → Executable file
3
project/jni/guichan/include/guichan/font.hpp
Normal file → Executable file
@@ -103,8 +103,7 @@ namespace gcn
|
||||
* @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;
|
||||
virtual void drawString(Graphics* graphics, const std::string& text, int x, int y) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
0
project/jni/guichan/include/guichan/genericinput.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/genericinput.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/glut.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/glut.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/graphics.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/graphics.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/gui.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/gui.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/hge.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/hge.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/image.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/image.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/imagefont.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/imagefont.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/imageloader.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/imageloader.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/input.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/input.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/inputevent.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/inputevent.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/key.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/key.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/keyevent.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/keyevent.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/keyinput.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/keyinput.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/keylistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/keylistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/listmodel.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/listmodel.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/mouseevent.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/mouseevent.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/mouseinput.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/mouseinput.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/mouselistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/mouselistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/opengl.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/opengl.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/openlayer.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/openlayer.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/platform.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/platform.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/rectangle.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/rectangle.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/sdl.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/sdl.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/sdl/sdlgraphics.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/sdl/sdlgraphics.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/sdl/sdlimage.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/sdl/sdlimage.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/sdl/sdlimageloader.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/sdl/sdlimageloader.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/sdl/sdlinput.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/sdl/sdlinput.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/sdl/sdlpixel.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/sdl/sdlpixel.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/selectionevent.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/selectionevent.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/selectionlistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/selectionlistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widget.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widget.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgetlistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgetlistener.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/button.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/button.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/checkbox.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/checkbox.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/container.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/container.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/dropdown.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/dropdown.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/icon.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/icon.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/imagebutton.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/imagebutton.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/label.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/label.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/listbox.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/listbox.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/radiobutton.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/radiobutton.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/scrollarea.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/scrollarea.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/slider.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/slider.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/tab.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/tab.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/tabbedarea.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/tabbedarea.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/textbox.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/textbox.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/textfield.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/textfield.hpp
Normal file → Executable file
33
project/jni/guichan/include/guichan/widgets/uaeradiobutton.hpp
Executable file
33
project/jni/guichan/include/guichan/widgets/uaeradiobutton.hpp
Executable file
@@ -0,0 +1,33 @@
|
||||
#ifndef GCN_UAERADIOBUTTON_HPP
|
||||
#define GCN_UAERADIOBUTTON_HPP
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "guichan/keylistener.hpp"
|
||||
#include "guichan/mouselistener.hpp"
|
||||
#include "guichan/platform.hpp"
|
||||
#include "guichan/widget.hpp"
|
||||
#include "guichan/widgets/radiobutton.hpp"
|
||||
|
||||
|
||||
namespace gcn
|
||||
{
|
||||
class GCN_CORE_DECLSPEC UaeRadioButton : public RadioButton
|
||||
{
|
||||
public:
|
||||
UaeRadioButton();
|
||||
|
||||
UaeRadioButton(const std::string &caption,
|
||||
const std::string &group,
|
||||
bool selected = false);
|
||||
|
||||
virtual ~UaeRadioButton();
|
||||
|
||||
virtual void draw(Graphics* graphics);
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif // end GCN_UAERADIOBUTTON_HPP
|
||||
0
project/jni/guichan/include/guichan/widgets/window.hpp
Normal file → Executable file
0
project/jni/guichan/include/guichan/widgets/window.hpp
Normal file → Executable file
1
project/jni/guichan/include/stamp-h1
Executable file
1
project/jni/guichan/include/stamp-h1
Executable file
@@ -0,0 +1 @@
|
||||
timestamp for include/config.hpp
|
||||
0
project/jni/guichan/src/actionevent.cpp
Normal file → Executable file
0
project/jni/guichan/src/actionevent.cpp
Normal file → Executable file
0
project/jni/guichan/src/basiccontainer.cpp
Normal file → Executable file
0
project/jni/guichan/src/basiccontainer.cpp
Normal file → Executable file
0
project/jni/guichan/src/cliprectangle.cpp
Normal file → Executable file
0
project/jni/guichan/src/cliprectangle.cpp
Normal file → Executable file
0
project/jni/guichan/src/color.cpp
Normal file → Executable file
0
project/jni/guichan/src/color.cpp
Normal file → Executable file
0
project/jni/guichan/src/contrib/sdl/sdltruetypefont.cpp
Normal file → Executable file
0
project/jni/guichan/src/contrib/sdl/sdltruetypefont.cpp
Normal file → Executable file
279
project/jni/guichan/src/contrib/widgets/adjustingcontainer.cpp
Executable file
279
project/jni/guichan/src/contrib/widgets/adjustingcontainer.cpp
Executable file
@@ -0,0 +1,279 @@
|
||||
/* _______ __ __ __ ______ __ __ _______ __ __
|
||||
* / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
|
||||
* / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
|
||||
* / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
|
||||
* / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
|
||||
* /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
|
||||
* \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
|
||||
*
|
||||
* Copyright (c) 2007 - 2008 Josh Matthews and Olof Naessén
|
||||
*
|
||||
*
|
||||
* Per Larsson a.k.a finalman
|
||||
* Olof Naessén a.k.a jansem/yakslem
|
||||
*
|
||||
* Visit: http://guichan.sourceforge.net
|
||||
*
|
||||
* License: (BSD)
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name of Guichan nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* For comments regarding functions please see the header file.
|
||||
*/
|
||||
|
||||
#include "guichan/contrib/widgets/adjustingcontainer.hpp"
|
||||
|
||||
#include <guichan.hpp>
|
||||
|
||||
namespace gcn
|
||||
{
|
||||
namespace contrib
|
||||
{
|
||||
AdjustingContainer::AdjustingContainer()
|
||||
: mWidth(0),
|
||||
mHeight(0),
|
||||
mNumberOfColumns(1),
|
||||
mNumberOfRows(1),
|
||||
mPaddingLeft(0),
|
||||
mPaddingRight(0),
|
||||
mPaddingTop(0),
|
||||
mPaddingBottom(0),
|
||||
mVerticalSpacing(0),
|
||||
mHorizontalSpacing(0)
|
||||
|
||||
|
||||
{
|
||||
mColumnWidths.push_back(0);
|
||||
mRowHeights.push_back(0);
|
||||
}
|
||||
|
||||
AdjustingContainer::~AdjustingContainer()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void AdjustingContainer::setNumberOfColumns(unsigned int numberOfColumns)
|
||||
{
|
||||
mNumberOfColumns = numberOfColumns;
|
||||
|
||||
if (mColumnAlignment.size() < numberOfColumns)
|
||||
{
|
||||
while (mColumnAlignment.size() < numberOfColumns)
|
||||
{
|
||||
mColumnAlignment.push_back(LEFT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (mColumnAlignment.size() > numberOfColumns)
|
||||
{
|
||||
mColumnAlignment.pop_back();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AdjustingContainer::setColumnAlignment(unsigned int column,
|
||||
unsigned int alignment)
|
||||
{
|
||||
if (column < mColumnAlignment.size())
|
||||
{
|
||||
mColumnAlignment[column] = alignment;
|
||||
}
|
||||
}
|
||||
|
||||
void AdjustingContainer::setPadding(unsigned int paddingLeft,
|
||||
unsigned int paddingRight,
|
||||
unsigned int paddingTop,
|
||||
unsigned int paddingBottom)
|
||||
{
|
||||
mPaddingLeft = paddingLeft;
|
||||
mPaddingRight = paddingRight;
|
||||
mPaddingTop = paddingTop;
|
||||
mPaddingBottom = paddingBottom;
|
||||
}
|
||||
|
||||
void AdjustingContainer::setVerticalSpacing(unsigned int verticalSpacing)
|
||||
{
|
||||
mVerticalSpacing = verticalSpacing;
|
||||
}
|
||||
|
||||
void AdjustingContainer::setHorizontalSpacing(unsigned int horizontalSpacing)
|
||||
{
|
||||
mHorizontalSpacing = horizontalSpacing;
|
||||
}
|
||||
|
||||
void AdjustingContainer::logic()
|
||||
{
|
||||
Container::logic();
|
||||
adjustContent();
|
||||
}
|
||||
|
||||
void AdjustingContainer::add(Widget *widget)
|
||||
{
|
||||
Container::add(widget);
|
||||
mContainedWidgets.push_back(widget);
|
||||
}
|
||||
|
||||
void AdjustingContainer::add(Widget *widget, int x, int y)
|
||||
{
|
||||
add(widget);
|
||||
}
|
||||
|
||||
void AdjustingContainer::clear()
|
||||
{
|
||||
Container::clear();
|
||||
mContainedWidgets.clear();
|
||||
}
|
||||
|
||||
void AdjustingContainer::remove(Widget *widget)
|
||||
{
|
||||
Container::remove(widget);
|
||||
std::vector<gcn::Widget *>::iterator it;
|
||||
for(it = mContainedWidgets.begin(); it != mContainedWidgets.end(); it++)
|
||||
{
|
||||
if(*it == widget)
|
||||
{
|
||||
mContainedWidgets.erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AdjustingContainer::adjustSize()
|
||||
{
|
||||
mNumberOfRows = mContainedWidgets.size()
|
||||
/ mNumberOfColumns + mContainedWidgets.size() % mNumberOfColumns;
|
||||
|
||||
mColumnWidths.clear();
|
||||
|
||||
unsigned int i;
|
||||
for (i = 0; i < mNumberOfColumns; i++)
|
||||
{
|
||||
mColumnWidths.push_back(0);
|
||||
}
|
||||
|
||||
mRowHeights.clear();
|
||||
|
||||
for (i = 0; i < mNumberOfRows; i++)
|
||||
{
|
||||
mRowHeights.push_back(0);
|
||||
}
|
||||
|
||||
for (i = 0; i < mNumberOfColumns; i++)
|
||||
{
|
||||
unsigned int j;
|
||||
for (j = 0; j < mNumberOfRows && mNumberOfColumns * j + i < mContainedWidgets.size(); j++)
|
||||
{
|
||||
if ((unsigned int)mContainedWidgets[mNumberOfColumns * j + i]->getWidth() > mColumnWidths[i])
|
||||
{
|
||||
mColumnWidths[i] = mContainedWidgets[mNumberOfColumns * j + i]->getWidth();
|
||||
}
|
||||
if ((unsigned int)mContainedWidgets[mNumberOfColumns * j + i]->getHeight() > mRowHeights[j])
|
||||
{
|
||||
mRowHeights[j] = mContainedWidgets[mNumberOfColumns * j + i]->getHeight();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mWidth = mPaddingLeft;
|
||||
|
||||
for (i = 0; i < mColumnWidths.size(); i++)
|
||||
{
|
||||
mWidth += mColumnWidths[i] + mHorizontalSpacing;
|
||||
}
|
||||
|
||||
mWidth -= mHorizontalSpacing;
|
||||
mWidth += mPaddingRight;
|
||||
|
||||
mHeight = mPaddingTop;
|
||||
|
||||
for (i = 0; i < mRowHeights.size(); i++)
|
||||
{
|
||||
mHeight += mRowHeights[i] + mVerticalSpacing;
|
||||
}
|
||||
|
||||
mHeight -= mVerticalSpacing;
|
||||
mHeight += mPaddingBottom;
|
||||
|
||||
setHeight(mHeight);
|
||||
setWidth(mWidth);
|
||||
}
|
||||
|
||||
void AdjustingContainer::adjustContent()
|
||||
{
|
||||
adjustSize();
|
||||
|
||||
unsigned int columnCount = 0;
|
||||
unsigned int rowCount = 0;
|
||||
unsigned int y = mPaddingTop;
|
||||
|
||||
for (unsigned int i = 0; i < mContainedWidgets.size(); i++)
|
||||
{
|
||||
unsigned basex;
|
||||
if (columnCount % mNumberOfColumns)
|
||||
{
|
||||
basex = mPaddingLeft;
|
||||
unsigned int j;
|
||||
|
||||
for (j = 0; j < columnCount; j++)
|
||||
{
|
||||
basex += mColumnWidths[j] + mHorizontalSpacing;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
basex = mPaddingLeft;
|
||||
}
|
||||
|
||||
switch (mColumnAlignment[columnCount])
|
||||
{
|
||||
case LEFT:
|
||||
mContainedWidgets[i]->setX(basex);
|
||||
break;
|
||||
case CENTER:
|
||||
mContainedWidgets[i]->setX(basex + (mColumnWidths[columnCount] - mContainedWidgets[i]->getWidth()) / 2);
|
||||
break;
|
||||
case RIGHT:
|
||||
mContainedWidgets[i]->setX(basex + mColumnWidths[columnCount] - mContainedWidgets[i]->getWidth());
|
||||
break;
|
||||
default:
|
||||
throw GCN_EXCEPTION("Unknown alignment.");
|
||||
}
|
||||
|
||||
mContainedWidgets[i]->setY(y);
|
||||
columnCount++;
|
||||
|
||||
if (columnCount == mNumberOfColumns)
|
||||
{
|
||||
columnCount = 0;
|
||||
y += mRowHeights[rowCount] + mVerticalSpacing;
|
||||
rowCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
0
project/jni/guichan/src/defaultfont.cpp
Normal file → Executable file
0
project/jni/guichan/src/defaultfont.cpp
Normal file → Executable file
0
project/jni/guichan/src/event.cpp
Normal file → Executable file
0
project/jni/guichan/src/event.cpp
Normal file → Executable file
0
project/jni/guichan/src/exception.cpp
Normal file → Executable file
0
project/jni/guichan/src/exception.cpp
Normal file → Executable file
0
project/jni/guichan/src/focushandler.cpp
Normal file → Executable file
0
project/jni/guichan/src/focushandler.cpp
Normal file → Executable file
0
project/jni/guichan/src/font.cpp
Normal file → Executable file
0
project/jni/guichan/src/font.cpp
Normal file → Executable file
0
project/jni/guichan/src/genericinput.cpp
Normal file → Executable file
0
project/jni/guichan/src/genericinput.cpp
Normal file → Executable file
0
project/jni/guichan/src/graphics.cpp
Normal file → Executable file
0
project/jni/guichan/src/graphics.cpp
Normal file → Executable file
0
project/jni/guichan/src/gui.cpp
Normal file → Executable file
0
project/jni/guichan/src/gui.cpp
Normal file → Executable file
0
project/jni/guichan/src/guichan.cpp
Normal file → Executable file
0
project/jni/guichan/src/guichan.cpp
Normal file → Executable file
0
project/jni/guichan/src/image.cpp
Normal file → Executable file
0
project/jni/guichan/src/image.cpp
Normal file → Executable file
0
project/jni/guichan/src/imagefont.cpp
Normal file → Executable file
0
project/jni/guichan/src/imagefont.cpp
Normal file → Executable file
0
project/jni/guichan/src/inputevent.cpp
Normal file → Executable file
0
project/jni/guichan/src/inputevent.cpp
Normal file → Executable file
0
project/jni/guichan/src/key.cpp
Normal file → Executable file
0
project/jni/guichan/src/key.cpp
Normal file → Executable file
0
project/jni/guichan/src/keyevent.cpp
Normal file → Executable file
0
project/jni/guichan/src/keyevent.cpp
Normal file → Executable file
0
project/jni/guichan/src/keyinput.cpp
Normal file → Executable file
0
project/jni/guichan/src/keyinput.cpp
Normal file → Executable file
0
project/jni/guichan/src/mouseevent.cpp
Normal file → Executable file
0
project/jni/guichan/src/mouseevent.cpp
Normal file → Executable file
0
project/jni/guichan/src/mouseinput.cpp
Normal file → Executable file
0
project/jni/guichan/src/mouseinput.cpp
Normal file → Executable file
0
project/jni/guichan/src/rectangle.cpp
Normal file → Executable file
0
project/jni/guichan/src/rectangle.cpp
Normal file → Executable file
12
project/jni/guichan/src/sdl/guichan_sdl-0.8.pc
Executable file
12
project/jni/guichan/src/sdl/guichan_sdl-0.8.pc
Executable file
@@ -0,0 +1,12 @@
|
||||
prefix=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: guichan
|
||||
Description: A portable C++ GUI library designed for games using Allegro, HGE, OpenGL, OpenLayer and/or SDL.
|
||||
Version: 0.8.2
|
||||
Requires: sdl
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lguichan_sdl
|
||||
Cflags: -I${includedir}
|
||||
12
project/jni/guichan/src/sdl/guichan_sdl-0.8.pc.in
Executable file
12
project/jni/guichan/src/sdl/guichan_sdl-0.8.pc.in
Executable file
@@ -0,0 +1,12 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=${prefix}
|
||||
libdir=@libdir@
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: guichan
|
||||
Description: A portable C++ GUI library designed for games using Allegro, HGE, OpenGL, OpenLayer and/or SDL.
|
||||
Version: @VERSION@
|
||||
Requires: sdl
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lguichan_sdl
|
||||
Cflags: -I${includedir}
|
||||
0
project/jni/guichan/src/sdl/sdl.cpp
Normal file → Executable file
0
project/jni/guichan/src/sdl/sdl.cpp
Normal file → Executable file
0
project/jni/guichan/src/sdl/sdlgraphics.cpp
Normal file → Executable file
0
project/jni/guichan/src/sdl/sdlgraphics.cpp
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user