summaryrefslogtreecommitdiff
path: root/src/gui/table.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/table.h')
-rw-r--r--src/gui/table.h37
1 files changed, 21 insertions, 16 deletions
diff --git a/src/gui/table.h b/src/gui/table.h
index 912eb284..841f6ef2 100644
--- a/src/gui/table.h
+++ b/src/gui/table.h
@@ -46,17 +46,19 @@ class GuiTable : public gcn::Widget,
public gcn::KeyListener,
public TableModelListener
{
- friend class GuiTableActionListener; // so that the action listener can call distributeActionEvent
+ // so that the action listener can call distributeActionEvent
+ friend class GuiTableActionListener;
+
public:
GuiTable(TableModel * initial_model = NULL, gcn::Color background = 0xffffff,
bool opacity = true);
- virtual ~GuiTable(void);
+ virtual ~GuiTable();
/**
* Retrieves the active table model
*/
- TableModel *getModel(void) const;
+ TableModel *getModel() const;
/**
* Sets the table model
@@ -72,9 +74,9 @@ public:
void setSelected(int row, int column);
- int getSelectedRow(void);
+ int getSelectedRow();
- int getSelectedColumn(void);
+ int getSelectedColumn();
void setSelectedRow(int selected);
@@ -136,25 +138,25 @@ public:
virtual void mouseWheelMovedUp(gcn::MouseEvent& mouseEvent);
virtual void mouseWheelMovedDown(gcn::MouseEvent& mouseEvent);
-
+
virtual void mouseDragged(gcn::MouseEvent& mouseEvent);
// Constraints inherited from TableModelListener
virtual void modelUpdated(bool);
protected:
+ /** Frees all action listeners on inner widgets. */
+ virtual void uninstallActionListeners();
+ /** Installs all action listeners on inner widgets. */
+ virtual void installActionListeners();
- virtual void uninstallActionListeners(void); // frees all action listeners on inner widgets
- virtual void installActionListeners(void); // installs all action listeners on inner widgets
-
- virtual int getRowHeight(void);
+ virtual int getRowHeight();
virtual int getColumnWidth(int i);
-
-private:
+private:
int getRowForY(int y); // -1 on error
int getColumnForX(int x); // -1 on error
- void recomputeDimensions(void);
+ void recomputeDimensions();
bool mLinewiseMode;
bool mWrappingEnabled;
bool mOpaque;
@@ -171,11 +173,14 @@ private:
int mSelectedRow;
int mSelectedColumn;
- int mPopFramesNr; // Number of frames to skip upwards when drawing the selected widget
+ /** Number of frames to skip upwards when drawing the selected widget. */
+ int mPopFramesNr;
- gcn::Widget *mTopWidget; // If someone moves a fresh widget to the top, we must display it
+ /** If someone moves a fresh widget to the top, we must display it. */
+ gcn::Widget *mTopWidget;
- std::vector<GuiTableActionListener *> action_listeners; // Vector for compactness; used as a list in practice.
+ /** Vector for compactness; used as a list in practice. */
+ std::vector<GuiTableActionListener *> action_listeners;
};