mail[Wesnoth-commits] r27357 - in /trunk/src/gui/widgets: helper.cpp helper.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on June 20, 2008 - 19:33:
Author: mordante
Date: Fri Jun 20 19:33:42 2008
New Revision: 27357

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27357&view=rev
Log:
Comment cleanups.

Modified:
    trunk/src/gui/widgets/helper.cpp
    trunk/src/gui/widgets/helper.hpp

Modified: trunk/src/gui/widgets/helper.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/helper.cpp?rev=27357&r1=27356&r2=27357&view=diff
==============================================================================
--- trunk/src/gui/widgets/helper.cpp (original)
+++ trunk/src/gui/widgets/helper.cpp Fri Jun 20 19:33:42 2008
@@ -65,6 +65,7 @@
 { 
        return ::create_rect(origin.x, origin.y, size.x, size.y); 
 }
+
 tpoint& tpoint::operator+=(const tpoint& point)
 { 
        x += point.x; 
@@ -77,7 +78,6 @@
        stream << point.x << ',' << point.y;
        return stream;
 }
-
 
 int decode_font_style(const std::string& style)
 {

Modified: trunk/src/gui/widgets/helper.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/helper.hpp?rev=27357&r1=27356&r2=27357&view=diff
==============================================================================
--- trunk/src/gui/widgets/helper.hpp (original)
+++ trunk/src/gui/widgets/helper.hpp Fri Jun 20 19:33:42 2008
@@ -24,9 +24,15 @@
 
 namespace gui2 {
 
-// init needs a cfg object later to init the subsystem
+/**
+ * Initializes the gui subsystems.
+ *
+ * This function needs to be called before other parts of the gui engine are
+ * used.
+ */
 bool init();
 
+/** Holds a 2D point. */
 struct tpoint
 {
        tpoint(const int x_, const int y_) : 
@@ -34,7 +40,10 @@
                y(y_) 
                {}
 
+       /** x coodinate. */
        int x;
+
+       /** y coodinate. */
        int y;
 
        bool operator==(const tpoint& point) const { return x == point.x && y 
== point.y; }
@@ -52,15 +61,39 @@
 
 };
 
-
 std::ostream &operator<<(std::ostream &stream, const tpoint& point);
 
+/**
+ * Creates a rectangle.
+ *
+ * @param origin                  The top left corner.
+ * @param size                    The width (x) and height (y).
+ *
+ * @returns                       SDL_Rect with the proper rectangle.
+ */
 SDL_Rect create_rect(const tpoint& origin, const tpoint& size);
 
+/**
+ * Converts a colour string to a colour.
+ *
+ * @param colour                  A colour string see
+ *                                http://www.wesnoth.org/wiki/GUIVariable for
+ *                                more info.
+ *
+ * @returns                       The colour.
+ */
 Uint32 decode_colour(const std::string& colour);
 
+/**
+ * Converts a font style string to a font style.
+ *
+ * @param colour                  A font style string see
+ *                                http://www.wesnoth.org/wiki/GUIVariable for
+ *                                more info.
+ *
+ * @returns                       The font style.
+ */
 int decode_font_style(const std::string& style);
-
 
 /**
  * Copies a portion of a surface.
@@ -76,7 +109,6 @@
  * @returns                       A copy of the wanted part of the 
background.
  */
 surface save_background(const surface& background, const SDL_Rect& rect);
-
 
 /**
  * Copies one surface unto another one.




Related Messages


Powered by MHonArc, Updated Fri Jun 20 20:01:41 2008