summaryrefslogtreecommitdiff
path: root/src/guichan
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-30 13:05:34 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-30 13:11:34 +0300
commit0cff44ef5c1383a638c30cc9f5f8c81b6b4318f9 (patch)
tree077c2ff59d6656096aa0acaaf4dd6bf4fb7867f7 /src/guichan
parent6b1684d33dec02eb6308bb3d8d3707f4d5252ba5 (diff)
downloadmanaplus-0cff44ef5c1383a638c30cc9f5f8c81b6b4318f9.tar.gz
manaplus-0cff44ef5c1383a638c30cc9f5f8c81b6b4318f9.tar.bz2
manaplus-0cff44ef5c1383a638c30cc9f5f8c81b6b4318f9.tar.xz
manaplus-0cff44ef5c1383a638c30cc9f5f8c81b6b4318f9.zip
Add unused warnings to other files.
Diffstat (limited to 'src/guichan')
-rw-r--r--src/guichan/include/guichan/actionevent.hpp2
-rw-r--r--src/guichan/include/guichan/basiccontainer.hpp7
-rw-r--r--src/guichan/include/guichan/event.hpp4
-rw-r--r--src/guichan/include/guichan/exception.hpp8
-rw-r--r--src/guichan/include/guichan/focushandler.hpp16
-rw-r--r--src/guichan/include/guichan/font.hpp8
-rw-r--r--src/guichan/include/guichan/gui.hpp14
-rw-r--r--src/guichan/include/guichan/image.hpp8
-rw-r--r--src/guichan/include/guichan/input.hpp4
-rw-r--r--src/guichan/include/guichan/inputevent.hpp10
-rw-r--r--src/guichan/include/guichan/key.hpp8
-rw-r--r--src/guichan/include/guichan/keyevent.hpp6
-rw-r--r--src/guichan/include/guichan/keyinput.hpp12
-rw-r--r--src/guichan/include/guichan/listmodel.hpp6
-rw-r--r--src/guichan/include/guichan/mouseevent.hpp10
-rw-r--r--src/guichan/include/guichan/mouseinput.hpp10
-rw-r--r--src/guichan/include/guichan/platform.hpp4
-rw-r--r--src/guichan/include/guichan/rectangle.hpp6
-rw-r--r--src/guichan/include/guichan/widget.hpp63
19 files changed, 105 insertions, 101 deletions
diff --git a/src/guichan/include/guichan/actionevent.hpp b/src/guichan/include/guichan/actionevent.hpp
index 082f7bdef..0d70c54ce 100644
--- a/src/guichan/include/guichan/actionevent.hpp
+++ b/src/guichan/include/guichan/actionevent.hpp
@@ -103,7 +103,7 @@ namespace gcn
*
* @return The identifier of the event.
*/
- const std::string& getId() const;
+ const std::string& getId() const A_WARN_UNUSED;
protected:
/**
diff --git a/src/guichan/include/guichan/basiccontainer.hpp b/src/guichan/include/guichan/basiccontainer.hpp
index 9c1a22b2e..fb6e1a54e 100644
--- a/src/guichan/include/guichan/basiccontainer.hpp
+++ b/src/guichan/include/guichan/basiccontainer.hpp
@@ -89,14 +89,13 @@ namespace gcn
*/
virtual void showWidgetPart(Widget* widget, Rectangle area);
-
// Inherited from Widget
virtual void moveToTop(Widget* widget);
virtual void moveToBottom(Widget* widget);
- virtual Rectangle getChildrenArea();
+ virtual Rectangle getChildrenArea() A_WARN_UNUSED;
virtual void focusNext();
@@ -108,7 +107,7 @@ namespace gcn
void setInternalFocusHandler(FocusHandler* focusHandler);
- virtual Widget *getWidgetAt(int x, int y);
+ virtual Widget *getWidgetAt(int x, int y) A_WARN_UNUSED;
// Inherited from DeathListener
@@ -161,7 +160,7 @@ namespace gcn
* @return The widget with the corrosponding id,
NULL of no widget is found.
*/
- virtual Widget* findWidgetById(const std::string& id);
+ virtual Widget* findWidgetById(const std::string& id) A_WARN_UNUSED;
/**
* Typedef.
diff --git a/src/guichan/include/guichan/event.hpp b/src/guichan/include/guichan/event.hpp
index c6afee48c..5657b473a 100644
--- a/src/guichan/include/guichan/event.hpp
+++ b/src/guichan/include/guichan/event.hpp
@@ -83,11 +83,9 @@ namespace gcn
*
* @return The source widget of the event.
*/
- Widget* getSource() const;
-
+ Widget* getSource() const A_WARN_UNUSED;
protected:
-
/**
* Holds the source widget of the event.
*/
diff --git a/src/guichan/include/guichan/exception.hpp b/src/guichan/include/guichan/exception.hpp
index 0e929ebe1..cf0051846 100644
--- a/src/guichan/include/guichan/exception.hpp
+++ b/src/guichan/include/guichan/exception.hpp
@@ -124,28 +124,28 @@ namespace gcn
*
* @return The function name where the exception occured.
*/
- const std::string& getFunction() const;
+ const std::string& getFunction() const A_WARN_UNUSED;
/**
* Gets the error message of the exception.
*
* @return The error message of the exception.
*/
- const std::string& getMessage() const;
+ const std::string& getMessage() const A_WARN_UNUSED;
/**
* Gets the filename where the exception occured.
*
* @return The filename where the exception occured.
*/
- const std::string& getFilename() const;
+ const std::string& getFilename() const A_WARN_UNUSED;
/**
* Gets the line number where the exception occured.
*
* @return The line number where the exception occured.
*/
- unsigned int getLine() const;
+ unsigned int getLine() const A_WARN_UNUSED;
protected:
/**
diff --git a/src/guichan/include/guichan/focushandler.hpp b/src/guichan/include/guichan/focushandler.hpp
index 716f3966a..6cf971522 100644
--- a/src/guichan/include/guichan/focushandler.hpp
+++ b/src/guichan/include/guichan/focushandler.hpp
@@ -157,7 +157,7 @@ namespace gcn
*
* @return The widget with focus. NULL if no widget has focus.
*/
- virtual Widget* getFocused() const;
+ virtual Widget* getFocused() const A_WARN_UNUSED;
/**
* Gets the widget with modal focus.
@@ -165,7 +165,7 @@ namespace gcn
* @return The widget with modal focus. NULL if no widget has
* modal focus.
*/
- virtual Widget* getModalFocused() const;
+ virtual Widget* getModalFocused() const A_WARN_UNUSED;
/**
* Gets the widget with modal mouse input focus.
@@ -173,7 +173,7 @@ namespace gcn
* @return The widget with modal mouse input focus. NULL if
* no widget has modal mouse input focus.
*/
- virtual Widget* getModalMouseInputFocused() const;
+ virtual Widget* getModalMouseInputFocused() const A_WARN_UNUSED;
/**
* Focuses the next widget added to a conainer.
@@ -240,7 +240,7 @@ namespace gcn
* @return the widget being dragged.
* @see setDraggedWidget
*/
- virtual Widget* getDraggedWidget();
+ virtual Widget* getDraggedWidget() A_WARN_UNUSED;
/**
* Sets the widget being dragged. Used by the Gui class to
@@ -258,7 +258,7 @@ namespace gcn
* @return The last widget with the mouse.
* @see setLastWidgetWithMouse
*/
- virtual Widget* getLastWidgetWithMouse();
+ virtual Widget* getLastWidgetWithMouse() A_WARN_UNUSED;
/**
* Sets the last widget with the mouse. Used by the Gui class
@@ -275,7 +275,7 @@ namespace gcn
* @return The last widget with modal focus.
* @see setLastWidgetWithModalFocus
*/
- virtual Widget* getLastWidgetWithModalFocus();
+ virtual Widget* getLastWidgetWithModalFocus() A_WARN_UNUSED;
/**
* Sets the last widget with modal focus.
@@ -291,7 +291,7 @@ namespace gcn
* @return The last widget with modal mouse input focus.
* @see setLastWidgetWithModalMouseInputFocus
*/
- virtual Widget* getLastWidgetWithModalMouseInputFocus();
+ virtual Widget* getLastWidgetWithModalMouseInputFocus() A_WARN_UNUSED;
/**
* Sets the last widget with modal mouse input focus.
@@ -308,7 +308,7 @@ namespace gcn
* @return The last widget pressed.
* @see setLastWidgetPressed
*/
- virtual Widget* getLastWidgetPressed();
+ virtual Widget* getLastWidgetPressed() A_WARN_UNUSED;
/**
* Sets the last widget pressed. Used by the Gui class to keep track
diff --git a/src/guichan/include/guichan/font.hpp b/src/guichan/include/guichan/font.hpp
index cc177928e..e780b3808 100644
--- a/src/guichan/include/guichan/font.hpp
+++ b/src/guichan/include/guichan/font.hpp
@@ -48,6 +48,8 @@
#include <string>
#include "guichan/platform.hpp"
+#include "localconsts.h"
+
namespace gcn
{
class Graphics;
@@ -74,14 +76,14 @@ namespace gcn
* @param text The string to return the width of.
* @return The width of a string.
*/
- virtual int getWidth(const std::string& text) const = 0;
+ virtual int getWidth(const std::string& text) const A_WARN_UNUSED = 0;
/**
* Gets the height of the glyphs in the font.
*
* @return The height of the glyphs int the font.
*/
- virtual int getHeight() const = 0;
+ virtual int getHeight() const A_WARN_UNUSED = 0;
/**
* Gets a string index in a string providing an x coordinate.
@@ -93,7 +95,7 @@ namespace gcn
* @return A string index in a string providing an x coordinate.
*/
virtual int getStringIndexAt(const std::string& text,
- const int x) const;
+ const int x) const A_WARN_UNUSED;
/**
* Draws a string.
diff --git a/src/guichan/include/guichan/gui.hpp b/src/guichan/include/guichan/gui.hpp
index 782983dd4..a8bdfa6d5 100644
--- a/src/guichan/include/guichan/gui.hpp
+++ b/src/guichan/include/guichan/gui.hpp
@@ -128,7 +128,7 @@ namespace gcn
* @return The top widget. NULL if no top widget has been set.
* @since 0.1.0
*/
- virtual Widget* getTop() const;
+ virtual Widget* getTop() const A_WARN_UNUSED;
/**
* Sets the graphics object to use for drawing.
@@ -149,7 +149,7 @@ namespace gcn
* OpenLayerGraphics, OpenGLGraphics, SDLGraphics
* @since 0.1.0
*/
- virtual Graphics* getGraphics() const;
+ virtual Graphics* getGraphics() const A_WARN_UNUSED;
/**
* Sets the input object to use for input handling.
@@ -170,7 +170,7 @@ namespace gcn
* SDLInput
* @since 0.1.0
*/
- virtual Input* getInput() const;
+ virtual Input* getInput() const A_WARN_UNUSED;
/**
* Performs logic of the GUI. By calling this function all logic
@@ -384,7 +384,7 @@ namespace gcn
* @return The widget at a certain position.
* @since 0.6.0
*/
- virtual Widget* getWidgetAt(int x, int y);
+ virtual Widget* getWidgetAt(int x, int y) A_WARN_UNUSED;
/**
* Gets the source of the mouse event.
@@ -392,7 +392,7 @@ namespace gcn
* @return The source widget of the mouse event.
* @since 0.6.0
*/
- virtual Widget* getMouseEventSource(int x, int y);
+ virtual Widget* getMouseEventSource(int x, int y) A_WARN_UNUSED;
/**
* Gets the source of the key event.
@@ -400,7 +400,7 @@ namespace gcn
* @return The source widget of the key event.
* @since 0.6.0
*/
- virtual Widget* getKeyEventSource();
+ virtual Widget* getKeyEventSource() A_WARN_UNUSED;
/**
* Holds the top widget.
@@ -441,7 +441,7 @@ namespace gcn
* Holds the global key listeners of the Gui.
*/
KeyListenerList mKeyListeners;
-
+
/**
* True if shift is pressed, false otherwise.
*/
diff --git a/src/guichan/include/guichan/image.hpp b/src/guichan/include/guichan/image.hpp
index 7e4ad7b78..1933df293 100644
--- a/src/guichan/include/guichan/image.hpp
+++ b/src/guichan/include/guichan/image.hpp
@@ -49,6 +49,8 @@
#include "guichan/platform.hpp"
+#include "localconsts.h"
+
namespace gcn
{
class Color;
@@ -95,7 +97,7 @@ namespace gcn
*
* @since 0.1.0
*/
- virtual int getWidth() const = 0;
+ virtual int getWidth() const A_WARN_UNUSED = 0;
/**
* Gets the height of the image.
@@ -104,7 +106,7 @@ namespace gcn
*
* @since 0.1.0
*/
- virtual int getHeight() const = 0;
+ virtual int getHeight() const A_WARN_UNUSED = 0;
/**
* Gets the color of a pixel at coordinate (x, y) in the image.
@@ -118,7 +120,7 @@ namespace gcn
*
* @since 0.5.0
*/
- virtual Color getPixel(int x, int y) = 0;
+ virtual Color getPixel(int x, int y) A_WARN_UNUSED = 0;
/**
* Puts a pixel with a certain color at coordinate (x, y).
diff --git a/src/guichan/include/guichan/input.hpp b/src/guichan/include/guichan/input.hpp
index 673140ec0..229dfe9a6 100644
--- a/src/guichan/include/guichan/input.hpp
+++ b/src/guichan/include/guichan/input.hpp
@@ -79,7 +79,7 @@ namespace gcn
* @return True if the key queue is empty,
* false otherwise.
*/
- virtual bool isKeyQueueEmpty() = 0;
+ virtual bool isKeyQueueEmpty() A_WARN_UNUSED = 0;
/**
* Dequeues the key input queue.
@@ -94,7 +94,7 @@ namespace gcn
* @return True if the mouse queue is empty,
* false otherwise.
*/
- virtual bool isMouseQueueEmpty() = 0;
+ virtual bool isMouseQueueEmpty() A_WARN_UNUSED = 0;
/**
* Dequeues the mouse input queue.
diff --git a/src/guichan/include/guichan/inputevent.hpp b/src/guichan/include/guichan/inputevent.hpp
index 296f14cd2..46b2581c4 100644
--- a/src/guichan/include/guichan/inputevent.hpp
+++ b/src/guichan/include/guichan/inputevent.hpp
@@ -81,7 +81,7 @@ namespace gcn
* @return True if shift was pressed at the same time as the key,
* false otherwise.
*/
- bool isShiftPressed() const;
+ bool isShiftPressed() const A_WARN_UNUSED;
/**
* Checks if control is pressed.
@@ -89,7 +89,7 @@ namespace gcn
* @return True if control was pressed at the same time as the key,
* false otherwise.
*/
- bool isControlPressed() const;
+ bool isControlPressed() const A_WARN_UNUSED;
/**
* Checks if alt is pressed.
@@ -97,7 +97,7 @@ namespace gcn
* @return True if alt was pressed at the same time as the key,
* false otherwise.
*/
- bool isAltPressed() const;
+ bool isAltPressed() const A_WARN_UNUSED;
/**
* Checks whether meta is pressed.
@@ -105,7 +105,7 @@ namespace gcn
* @return True if meta was pressed at the same time as the key,
* false otherwise.
*/
- bool isMetaPressed() const;
+ bool isMetaPressed() const A_WARN_UNUSED;
/**
* Marks the event as consumed. Input event listeners may discard
@@ -126,7 +126,7 @@ namespace gcn
* false otherwise.
* @see consume
*/
- bool isConsumed() const;
+ bool isConsumed() const A_WARN_UNUSED;
protected:
/**
diff --git a/src/guichan/include/guichan/key.hpp b/src/guichan/include/guichan/key.hpp
index c2af0ac60..96785a816 100644
--- a/src/guichan/include/guichan/key.hpp
+++ b/src/guichan/include/guichan/key.hpp
@@ -78,7 +78,7 @@ namespace gcn
* @return True if the key is a letter, number or whitespace,
* false otherwise.
*/
- bool isCharacter() const;
+ bool isCharacter() const A_WARN_UNUSED;
/**
* Checks if a key is a number.
@@ -86,7 +86,7 @@ namespace gcn
* @return True if the key is a number (0-9),
* false otherwise.
*/
- bool isNumber() const;
+ bool isNumber() const A_WARN_UNUSED;
/**
* Checks if a key is a letter.
@@ -94,7 +94,7 @@ namespace gcn
* @return True if the key is a letter (a-z,A-Z),
* false otherwise.
*/
- bool isLetter() const;
+ bool isLetter() const A_WARN_UNUSED;
/**
* Gets the value of the key. If an ascii value exists it
@@ -102,7 +102,7 @@ namespace gcn
*
* @return the value of the key.
*/
- int getValue() const;
+ int getValue() const A_WARN_UNUSED;
/**
* Compares two keys.
diff --git a/src/guichan/include/guichan/keyevent.hpp b/src/guichan/include/guichan/keyevent.hpp
index 5cf1d26c7..968c4f2df 100644
--- a/src/guichan/include/guichan/keyevent.hpp
+++ b/src/guichan/include/guichan/keyevent.hpp
@@ -100,7 +100,7 @@ namespace gcn
*
* @return The type of the event.
*/
- unsigned int getType() const;
+ unsigned int getType() const A_WARN_UNUSED;
/**
* Checks if the key event occured on the numeric pad.
@@ -109,14 +109,14 @@ namespace gcn
* false otherwise.
*
*/
- bool isNumericPad() const;
+ bool isNumericPad() const A_WARN_UNUSED;
/**
* Gets the key of the event.
*
* @return The key of the event.
*/
- const Key& getKey() const;
+ const Key& getKey() const A_WARN_UNUSED;
protected:
/**
diff --git a/src/guichan/include/guichan/keyinput.hpp b/src/guichan/include/guichan/keyinput.hpp
index 06892b660..0694883a3 100644
--- a/src/guichan/include/guichan/keyinput.hpp
+++ b/src/guichan/include/guichan/keyinput.hpp
@@ -95,7 +95,7 @@ namespace gcn
* @return the input type.
* @see setType
*/
- int getType() const;
+ int getType() const A_WARN_UNUSED;
/**
* Sets the key of the key input.
@@ -111,7 +111,7 @@ namespace gcn
* @return The key of the key input.
* @see setKey
*/
- const Key& getKey() const;
+ const Key& getKey() const A_WARN_UNUSED;
/**
* Checks if shift is pressed.
@@ -121,7 +121,7 @@ namespace gcn
* @see setShiftPressed
* @since 0.6.0
*/
- bool isShiftPressed() const;
+ bool isShiftPressed() const A_WARN_UNUSED;
/**
* Sets shift to be pressed at the same time as the key,
@@ -141,7 +141,7 @@ namespace gcn
* @see setControlPressed
* @since 0.6.0
*/
- bool isControlPressed() const;
+ bool isControlPressed() const A_WARN_UNUSED;
/**
* Sets control to be pressed at the same time as the key,
@@ -182,7 +182,7 @@ namespace gcn
* @see setMetaPressed
* @since 0.6.0
*/
- bool isMetaPressed() const;
+ bool isMetaPressed() const A_WARN_UNUSED;
/**
* Sets meta to be pressed at the same time as the key,
@@ -203,7 +203,7 @@ namespace gcn
* @setNumericPad
* @since 0.6.0
*/
- bool isNumericPad() const;
+ bool isNumericPad() const A_WARN_UNUSED;
/**
* Sets the key to be pressed at the numeric pad.
diff --git a/src/guichan/include/guichan/listmodel.hpp b/src/guichan/include/guichan/listmodel.hpp
index bf139afb1..682338f5b 100644
--- a/src/guichan/include/guichan/listmodel.hpp
+++ b/src/guichan/include/guichan/listmodel.hpp
@@ -49,6 +49,8 @@
#include "guichan/platform.hpp"
+#include "localconsts.h"
+
namespace gcn
{
/**
@@ -73,7 +75,7 @@ namespace gcn
*
* @return The number of elements in the list
*/
- virtual int getNumberOfElements() = 0;
+ virtual int getNumberOfElements() A_WARN_UNUSED = 0;
/**
* Gets an element at a certain index in the list.
@@ -81,7 +83,7 @@ namespace gcn
* @param i An index in the list.
* @return An element as a string at the a certain index.
*/
- virtual std::string getElementAt(int i) = 0;
+ virtual std::string getElementAt(int i) A_WARN_UNUSED = 0;
};
}
diff --git a/src/guichan/include/guichan/mouseevent.hpp b/src/guichan/include/guichan/mouseevent.hpp
index ba2200d8d..86d224845 100644
--- a/src/guichan/include/guichan/mouseevent.hpp
+++ b/src/guichan/include/guichan/mouseevent.hpp
@@ -94,7 +94,7 @@ namespace gcn
*
* @return The button of the mouse event.
*/
- unsigned int getButton() const;
+ unsigned int getButton() const A_WARN_UNUSED;
/**
* Gets the x coordinate of the mouse event.
@@ -104,7 +104,7 @@ namespace gcn
* @return The x coordinate of the mouse event.
* @see Widget::addMouseListener, Widget::removeMouseListener
*/
- int getX() const;
+ int getX() const A_WARN_UNUSED;
/**
* Gets the y coordinate of the mouse event.
@@ -114,7 +114,7 @@ namespace gcn
* @return The y coordinate of the mouse event.
* @see Widget::addMouseListener, Widget::removeMouseListener
*/
- int getY() const;
+ int getY() const A_WARN_UNUSED;
/**
* Gets the number of clicks generated with the same button.
@@ -122,14 +122,14 @@ namespace gcn
*
* @return The number of clicks generated with the same button.
*/
- int getClickCount() const;
+ int getClickCount() const A_WARN_UNUSED;
/**
* Gets the type of the event.
*
* @return The type of the event.
*/
- unsigned int getType() const;
+ unsigned int getType() const A_WARN_UNUSED;
/**
* Mouse event types.
diff --git a/src/guichan/include/guichan/mouseinput.hpp b/src/guichan/include/guichan/mouseinput.hpp
index b2fc9d36a..ab286cac1 100644
--- a/src/guichan/include/guichan/mouseinput.hpp
+++ b/src/guichan/include/guichan/mouseinput.hpp
@@ -110,7 +110,7 @@ namespace gcn
* @see setType
* @since 0.1.0
*/
- unsigned int getType() const;
+ unsigned int getType() const A_WARN_UNUSED;
/**
* Sets the button pressed.
@@ -130,7 +130,7 @@ namespace gcn
* @see setButton
* @since 0.1.0
*/
- unsigned int getButton() const;
+ unsigned int getButton() const A_WARN_UNUSED;
/**
* Sets the timestamp for the mouse input.
@@ -150,7 +150,7 @@ namespace gcn
* @see setTimeStamp
* @since 0.1.0
*/
- int getTimeStamp() const;
+ int getTimeStamp() const A_WARN_UNUSED;
/**
* Sets the x coordinate of the mouse input.
@@ -168,7 +168,7 @@ namespace gcn
* @see setX
* @since 0.6.0
*/
- int getX() const;
+ int getX() const A_WARN_UNUSED;
/**
* Sets the y coordinate of the mouse input.
@@ -186,7 +186,7 @@ namespace gcn
* @see setY
* @since 0.6.0
*/
- int getY() const;
+ int getY() const A_WARN_UNUSED;
/**
* Mouse input event types. This enum partially corresponds
diff --git a/src/guichan/include/guichan/platform.hpp b/src/guichan/include/guichan/platform.hpp
index 9e3d1338a..0371f499d 100644
--- a/src/guichan/include/guichan/platform.hpp
+++ b/src/guichan/include/guichan/platform.hpp
@@ -73,8 +73,4 @@
#define GCN_EXTENSION_DECLSPEC
#endif
-//#ifndef NULL
-//#define NULL 0
-//#endif
-
#endif // end GCN_PLATFORM_HPP
diff --git a/src/guichan/include/guichan/rectangle.hpp b/src/guichan/include/guichan/rectangle.hpp
index a4de652a4..0d4d64004 100644
--- a/src/guichan/include/guichan/rectangle.hpp
+++ b/src/guichan/include/guichan/rectangle.hpp
@@ -49,6 +49,8 @@
#include <iostream>
+#include "localconsts.h"
+
namespace gcn
{
/**
@@ -95,7 +97,7 @@ namespace gcn
* @return True if the rectangles intersect, false otherwise.
* @since 0.1.0
*/
- bool isIntersecting(const Rectangle& rectangle) const;
+ bool isIntersecting(const Rectangle& rectangle) const A_WARN_UNUSED;
/**
* Checks if a point is inside the rectangle
@@ -105,7 +107,7 @@ namespace gcn
* @return True if the point is inside the rectangle.
* @since 0.1.0
*/
- bool isPointInRect(int x, int y) const;
+ bool isPointInRect(int x, int y) const A_WARN_UNUSED;
/**
* Output operator for output.
diff --git a/src/guichan/include/guichan/widget.hpp b/src/guichan/include/guichan/widget.hpp
index 26aef1d0d..85c3f0d87 100644
--- a/src/guichan/include/guichan/widget.hpp
+++ b/src/guichan/include/guichan/widget.hpp
@@ -161,7 +161,7 @@ namespace gcn
* @see setFrameSize, drawFrame
* @since 0.8.0
*/
- unsigned int getFrameSize() const;
+ unsigned int getFrameSize() const A_WARN_UNUSED;
/**
* Called for all widgets in the gui each time Gui::logic is called.
@@ -180,7 +180,7 @@ namespace gcn
* has no parent.
* @since 0.1.0
*/
- virtual Widget* getParent() const
+ virtual Widget* getParent() const A_WARN_UNUSED
{ return mParent; }
/**
@@ -201,7 +201,7 @@ namespace gcn
* setDimension, getDimension
* @since 0.1.0
*/
- int getWidth() const
+ int getWidth() const A_WARN_UNUSED
{ return mDimension.width; }
/**
@@ -222,7 +222,7 @@ namespace gcn
* setDimension, getDimension
* @since 0.1.0
*/
- int getHeight() const
+ int getHeight() const A_WARN_UNUSED
{ return mDimension.height; }
/**
@@ -254,7 +254,7 @@ namespace gcn
* @see setX, setY, getY, setPosition, setDimension, getDimension
* @since 0.1.0
*/
- int getX() const
+ int getX() const A_WARN_UNUSED
{ return mDimension.x; }
/**
@@ -275,7 +275,7 @@ namespace gcn
* @see setY, setX, getX, setPosition, setDimension, getDimension
* @since 0.1.0
*/
- int getY() const
+ int getY() const A_WARN_UNUSED
{ return mDimension.y; }
/**
@@ -307,7 +307,7 @@ namespace gcn
* @see getDimension, setX, getX, setY, getY, setPosition
* @since 0.1.0
*/
- const Rectangle& getDimension() const;
+ const Rectangle& getDimension() const A_WARN_UNUSED;
/**
* Sets the widget to be fosusable, or not.
@@ -326,7 +326,7 @@ namespace gcn
* @see setFocusable
* @since 0.1.0
*/
- bool isFocusable() const;
+ bool isFocusable() const A_WARN_UNUSED;
/**
* Checks if the widget is focused.
@@ -334,7 +334,7 @@ namespace gcn
* @return True if the widget is focused, false otherwise.
* @since 0.1.0
*/
- virtual bool isFocused() const;
+ virtual bool isFocused() const A_WARN_UNUSED;
/**
* Sets the widget to enabled, or not. A disabled
@@ -355,7 +355,7 @@ namespace gcn
* @see setEnabled
* @since 0.1.0
*/
- bool isEnabled() const;
+ bool isEnabled() const A_WARN_UNUSED;
/**
* Sets the widget to be visible, or not.
@@ -373,7 +373,7 @@ namespace gcn
* @see setVisible
* @since 0.1.0
*/
- bool isVisible() const
+ bool isVisible() const A_WARN_UNUSED
{ return mVisible && (!mParent || mParent->isVisible()); }
/**
@@ -392,7 +392,7 @@ namespace gcn
* @see setBaseColor
* @since 0.1.0
*/
- const Color& getBaseColor() const;
+ const Color& getBaseColor() const A_WARN_UNUSED;
/**
* Sets the foreground color.
@@ -409,7 +409,7 @@ namespace gcn
* @see setForegroundColor
* @since 0.1.0
*/
- const Color& getForegroundColor() const;
+ const Color& getForegroundColor() const A_WARN_UNUSED;
/**
* Sets the background color.
@@ -426,7 +426,7 @@ namespace gcn
* @see setBackgroundColor
* @since 0.1.0
*/
- const Color& getBackgroundColor() const;
+ const Color& getBackgroundColor() const A_WARN_UNUSED;
/**
* Sets the selection color.
@@ -444,8 +444,8 @@ namespace gcn
* @see setSelectionColor
* @since 0.6.0
*/
- const Color& getSelectionColor() const;
-
+ const Color& getSelectionColor() const A_WARN_UNUSED;
+
/**
* Requests focus for the widget. A widget will only recieve focus
* if it is focusable.
@@ -486,7 +486,7 @@ namespace gcn
* @see _setFocusHandler
* @since 0.1.0
*/
- virtual FocusHandler* _getFocusHandler();
+ virtual FocusHandler* _getFocusHandler() A_WARN_UNUSED;
/**
* Adds an action listener to the widget. When an action event
@@ -662,7 +662,7 @@ namespace gcn
* @see setFont, setGlobalFont
* @since 0.1.0
*/
- Font *getFont() const;
+ Font *getFont() const A_WARN_UNUSED;
/**
* Sets the global font to be used by default for all widgets.
@@ -701,7 +701,7 @@ namespace gcn
* @return True if an instance of the widget exists, false otherwise.
* @since 0.1.0
*/
- static bool widgetExists(const Widget* widget);
+ static bool widgetExists(const Widget* widget) A_WARN_UNUSED;
/**
* Checks if tab in is enabled. Tab in means that you can set focus
@@ -713,7 +713,7 @@ namespace gcn
* @see setTabInEnabled
* @since 0.1.0
*/
- bool isTabInEnabled() const;
+ bool isTabInEnabled() const A_WARN_UNUSED;
/**
* Sets tab in enabled, or not. Tab in means that you can set focus
@@ -737,7 +737,7 @@ namespace gcn
* @see setTabOutEnabled
* @since 0.1.0
*/
- bool isTabOutEnabled() const;
+ bool isTabOutEnabled() const A_WARN_UNUSED;
/**
* Sets tab out enabled. Tab out means that you can lose
@@ -797,7 +797,7 @@ namespace gcn
* @see requestModalFocus, releaseModalFocus
* @since 0.8.0
*/
- virtual bool isModalFocused() const;
+ virtual bool isModalFocused() const A_WARN_UNUSED;
/**
* Checks if the widget or it's parent has modal mouse input focus.
@@ -807,7 +807,7 @@ namespace gcn
* @see requestModalMouseInputFocus, releaseModalMouseInputFocus
* @since 0.8.0
*/
- virtual bool isModalMouseInputFocused() const;
+ virtual bool isModalMouseInputFocused() const A_WARN_UNUSED;
/**
* Gets a widget from a certain position in the widget.
@@ -823,7 +823,7 @@ namespace gcn
* if no widget is found.
* @since 0.6.0
*/
- virtual Widget *getWidgetAt(int x, int y);
+ virtual Widget *getWidgetAt(int x, int y) A_WARN_UNUSED;
/**
* Gets the mouse listeners of the widget.
@@ -831,7 +831,8 @@ namespace gcn
* @return The mouse listeners of the widget.
* @since 0.6.0
*/
- virtual const std::list<MouseListener*>& _getMouseListeners();
+ virtual const std::list<MouseListener*>& _getMouseListeners()
+ A_WARN_UNUSED;
/**
* Gets the key listeners of the widget.
@@ -839,7 +840,8 @@ namespace gcn
* @return The key listeners of the widget.
* @since 0.6.0
*/
- virtual const std::list<KeyListener*>& _getKeyListeners();
+ virtual const std::list<KeyListener*>& _getKeyListeners()
+ A_WARN_UNUSED;
/**
* Gets the focus listeners of the widget.
@@ -847,7 +849,8 @@ namespace gcn
* @return The focus listeners of the widget.
* @since 0.7.0
*/
- virtual const std::list<FocusListener*>& _getFocusListeners();
+ virtual const std::list<FocusListener*>& _getFocusListeners()
+ A_WARN_UNUSED;
/**
* Gets the area of the widget occupied by the widget's children.
@@ -869,7 +872,7 @@ namespace gcn
* @see BasicContainer::drawChildren
* @since 0.1.0
*/
- virtual Rectangle getChildrenArea();
+ virtual Rectangle getChildrenArea() A_WARN_UNUSED;
/**
* Gets the internal focus handler used.
@@ -879,7 +882,7 @@ namespace gcn
* @see setInternalFocusHandler
* @since 0.1.0
*/
- virtual FocusHandler* _getInternalFocusHandler();
+ virtual FocusHandler* _getInternalFocusHandler() A_WARN_UNUSED;
/**
* Sets the internal focus handler. An internal focus handler is
@@ -966,7 +969,7 @@ namespace gcn
* @see setId, BasicContainer::findWidgetById
* @since 0.8.0
*/
- const std::string& getId();
+ const std::string& getId() A_WARN_UNUSED;
/**
* Shows a certain part of a widget in the widget's parent.