summaryrefslogtreecommitdiff
path: root/src/gui/table_model.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/table_model.cpp')
-rw-r--r--src/gui/table_model.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/gui/table_model.cpp b/src/gui/table_model.cpp
index 7bc29b47..4fa13bae 100644
--- a/src/gui/table_model.cpp
+++ b/src/gui/table_model.cpp
@@ -19,10 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "table_model.h"
-
#include <guichan/widget.hpp>
-#include <cstdlib>
+
+#include "table_model.h"
#include "../utils/dtor.h"
@@ -49,7 +48,6 @@ void TableModel::signalAfterUpdate()
}
-
#define WIDGET_AT(row, column) (((row) * mColumns) + (column))
#define DYN_SIZE(h) ((h) >= 0) // determines whether this size is tagged for auto-detection
@@ -143,3 +141,21 @@ int StaticTableModel::getColumns()
{
return mColumns;
}
+
+int StaticTableModel::getWidth(void)
+{
+ int width = 0;
+
+ for (unsigned int i = 0; i < mWidths.size(); i++)
+ {
+ width += mWidths[i];
+ }
+
+ return width;
+}
+
+int StaticTableModel::getHeight(void)
+{
+ return (mColumns * mHeight);
+}
+