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


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

Header


Content

Posted by koraq on July 10, 2009 - 21:31:
Author: mordante
Date: Fri Jul 10 21:31:38 2009
New Revision: 36760

URL: http://svn.gna.org/viewcvs/wesnoth?rev=36760&view=rev
Log:
Add a page_grid() to the multi_page.

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

Modified: trunk/src/gui/widgets/multi_page.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/multi_page.cpp?rev=36760&r1=36759&r2=36760&view=diff
==============================================================================
--- trunk/src/gui/widgets/multi_page.cpp (original)
+++ trunk/src/gui/widgets/multi_page.cpp Fri Jul 10 21:31:38 2009
@@ -54,6 +54,18 @@
        generator_->select_item(page, select);
 }
 
+const tgrid& tmulti_page::page_grid(const unsigned page) const
+{
+       assert(generator_);
+       return generator_->get_item(page);
+}
+
+tgrid& tmulti_page::page_grid(const unsigned page)
+{
+       assert(generator_);
+       return generator_->get_item(page);
+}
+
 namespace {
 
 /**

Modified: trunk/src/gui/widgets/multi_page.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/multi_page.hpp?rev=36760&r1=36759&r2=36760&view=diff
==============================================================================
--- trunk/src/gui/widgets/multi_page.hpp (original)
+++ trunk/src/gui/widgets/multi_page.hpp Fri Jul 10 21:31:38 2009
@@ -78,6 +78,26 @@
         */
        void select_page(const unsigned page, const bool select = true);
 
+       /**
+        * Returns the grid for the page.
+        *
+        * @param page                The page to get the grid from, the 
caller
+        *                            has to make sure the page is a valid 
page.
+        *
+        * @returns                   The grid of the wanted page.
+        */
+       const tgrid& page_grid(const unsigned page) const;
+
+       /**
+        * Returns the grid for the page.
+        *
+        * @param page                The page to get the grid from, the 
caller
+        *                            has to make sure the page is a valid 
page.
+        *
+        * @returns                   The grid of the wanted page.
+        */
+       tgrid& page_grid(const unsigned page);
+
        /***** ***** ***** inherited ***** ****** *****/
 
        /** Inherited from tcontrol. */




Related Messages


Powered by MHonArc, Updated Fri Jul 10 21:40:34 2009