summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-03 10:52:22 +0000
committerrubidium <rubidium@openttd.org>2009-01-03 10:52:22 +0000
commit1bc6b7a7a5ddacc8988f4d775ae4a623fc7d84db (patch)
treeeadf36f73c5f291ef509cb36ade71a2c196ac035 /src/window.cpp
parent2352b1ca68ea4b345fe30950a7826278a8638175 (diff)
downloadopenttd-1bc6b7a7a5ddacc8988f4d775ae4a623fc7d84db.tar.xz
(svn r14794) -Document: a few functions/variables (Alberth)
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp
index c0911561c..00b81c1d4 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -2236,6 +2236,13 @@ int PositionMainToolbar(Window *w)
return w->left;
}
+/**
+ * Set the number of items of the vertical scrollbar.
+ *
+ * Function also updates the position of the scrollbar if necessary.
+ * @param w Window containing the vertical scrollbar
+ * @param num New number of items
+ */
void SetVScrollCount(Window *w, int num)
{
w->vscroll.count = num;
@@ -2244,6 +2251,13 @@ void SetVScrollCount(Window *w, int num)
if (num < w->vscroll.pos) w->vscroll.pos = num;
}
+/**
+ * Set the number of items of the second vertical scrollbar.
+ *
+ * Function also updates the position of the scrollbar if necessary.
+ * @param w Window containing the second vertical scrollbar
+ * @param num New number of items
+ */
void SetVScroll2Count(Window *w, int num)
{
w->vscroll2.count = num;
@@ -2252,6 +2266,13 @@ void SetVScroll2Count(Window *w, int num)
if (num < w->vscroll2.pos) w->vscroll2.pos = num;
}
+/**
+ * Set the number of items of the horizontal scrollbar.
+ *
+ * Function also updates the position of the scrollbar if necessary.
+ * @param w Window containing the horizontal scrollbar
+ * @param num New number of items
+ */
void SetHScrollCount(Window *w, int num)
{
w->hscroll.count = num;