summaryrefslogtreecommitdiff
path: root/src/gui/table_model.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-13 22:56:33 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-13 22:56:33 +0100
commit59f441730d8dbd7574b2fe4c9a430be256449cab (patch)
treefe01d073652e9c0615828afc0d99ac6ee35b75fd /src/gui/table_model.h
parent7d5c6124e9c9cf447286eaa58afe17adf6c1a81d (diff)
downloadmana-59f441730d8dbd7574b2fe4c9a430be256449cab.tar.gz
mana-59f441730d8dbd7574b2fe4c9a430be256449cab.tar.bz2
mana-59f441730d8dbd7574b2fe4c9a430be256449cab.tar.xz
mana-59f441730d8dbd7574b2fe4c9a430be256449cab.zip
Code style reformatting
Got rid of "void" in functions that take no arguments and removed the newline after the return type of a method in many places.
Diffstat (limited to 'src/gui/table_model.h')
-rw-r--r--src/gui/table_model.h38
1 files changed, 21 insertions, 17 deletions
diff --git a/src/gui/table_model.h b/src/gui/table_model.h
index 4be4e60e..67f30f2e 100644
--- a/src/gui/table_model.h
+++ b/src/gui/table_model.h
@@ -22,17 +22,20 @@
#ifndef TMW_TABLE_MODEL_H_
#define TMW_TABLE_MODEL_H_
+#include "../guichanfwd.h"
+
#include <guichan/gui.hpp>
+
#include <set>
#include <vector>
-#include "../guichanfwd.h"
class TableModelListener
{
public:
/**
- * Must be invoked by the TableModel whenever a global change is about to occur or
- * has occurred (e.g., when a row or column is being removed or added).
+ * Must be invoked by the TableModel whenever a global change is about to
+ * occur or has occurred (e.g., when a row or column is being removed or
+ * added).
*
* This method is triggered twice, once before and once after the update.
*
@@ -47,22 +50,22 @@ public:
class TableModel
{
public:
- virtual ~TableModel(void) { }
+ virtual ~TableModel() { }
/**
* Determines the number of rows (lines) in the table
*/
- virtual int getRows(void) = 0;
+ virtual int getRows() = 0;
/**
* Determines the number of columns in each row
*/
- virtual int getColumns(void) = 0;
+ virtual int getColumns() = 0;
/**
* Determines the height for each row
*/
- virtual int getRowHeight(void) = 0;
+ virtual int getRowHeight() = 0;
/**
* Determines the width of each individual column
@@ -82,12 +85,12 @@ protected:
/**
* Tells all listeners that the table is about to see an update
*/
- virtual void signalBeforeUpdate(void);
+ virtual void signalBeforeUpdate();
/**
* Tells all listeners that the table has seen an update
*/
- virtual void signalAfterUpdate(void);
+ virtual void signalAfterUpdate();
private:
std::set<TableModelListener *> listeners;
@@ -98,16 +101,18 @@ class StaticTableModel : public TableModel
{
public:
StaticTableModel(int width, int height);
- virtual ~StaticTableModel(void);
+ virtual ~StaticTableModel();
/**
* Inserts a widget into the table model.
- * The model is resized to accomodate the widget's width and height, unless column width / row height have been fixed.
+ * The model is resized to accomodate the widget's width and height,
+ * unless column width / row height have been fixed.
*/
virtual void set(int row, int column, gcn::Widget *widget);
/**
- * Fixes the column width for a given column; this overrides dynamic width inference.
+ * Fixes the column width for a given column; this overrides dynamic width
+ * inference.
*
* Semantics are undefined for width 0.
*/
@@ -123,15 +128,14 @@ public:
/**
* Resizes the table model
*/
- virtual void resize(void);
+ virtual void resize();
- virtual int getRows(void);
- virtual int getColumns(void);
- virtual int getRowHeight(void);
+ virtual int getRows();
+ virtual int getColumns();
+ virtual int getRowHeight();
virtual int getColumnWidth(int index);
virtual gcn::Widget *getElementAt(int row, int column);
-
protected:
int mRows, mColumns;
int mHeight;