summaryrefslogtreecommitdiff
path: root/src/gui/widgets/scrollarea.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-06 00:39:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-06 23:06:15 +0300
commit6b291b6515825f4ce0e09df5dec7ea1b619b63a7 (patch)
treef26a35a21cde34f45538a191b2196bf7c81d2693 /src/gui/widgets/scrollarea.h
parent833e498f54c1d33be94c09214315b368cccaec06 (diff)
downloadmanaverse-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.tar.gz
manaverse-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.tar.bz2
manaverse-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.tar.xz
manaverse-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.zip
improve a bit different code.
Diffstat (limited to 'src/gui/widgets/scrollarea.h')
-rw-r--r--src/gui/widgets/scrollarea.h90
1 files changed, 46 insertions, 44 deletions
diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h
index 70abac6ef..4653359e8 100644
--- a/src/gui/widgets/scrollarea.h
+++ b/src/gui/widgets/scrollarea.h
@@ -470,6 +470,19 @@ class ScrollArea final : public BasicContainer,
static ImageRect hBackground;
static Image *buttons[4][2];
+ ImageCollection *mVertexes;
+ ImageCollection *mVertexes2;
+
+ /**
+ * Holds the horizontal scroll bar policy.
+ */
+ ScrollPolicy mHPolicy;
+
+ /**
+ * Holds the vertical scroll bar policy.
+ */
+ ScrollPolicy mVPolicy;
+
/**
* Holds the vertical scroll amount.
*/
@@ -486,64 +499,73 @@ class ScrollArea final : public BasicContainer,
int mScrollbarWidth;
/**
- * Holds the horizontal scroll bar policy.
+ * Holds the up button scroll amount.
*/
- ScrollPolicy mHPolicy;
+ int mUpButtonScrollAmount;
/**
- * Holds the vertical scroll bar policy.
+ * Holds the down button scroll amount.
*/
- ScrollPolicy mVPolicy;
+ int mDownButtonScrollAmount;
/**
- * True if the vertical scroll bar is visible, false otherwise.
+ * Holds the left button scroll amount.
*/
- bool mVBarVisible;
+ int mLeftButtonScrollAmount;
/**
- * True if the horizontal scroll bar is visible, false otherwise.
+ * Holds the right button scroll amount.
*/
- bool mHBarVisible;
+ int mRightButtonScrollAmount;
/**
- * True if the up button is pressed, false otherwise.
+ * Holds the horizontal markers drag offset.
*/
- bool mUpButtonPressed;
+ int mHorizontalMarkerDragOffset;
/**
- * True if the down button is pressed, false otherwise.
+ * Holds the vertical markers drag offset.
*/
- bool mDownButtonPressed;
+ int mVerticalMarkerDragOffset;
+
+ int mX;
+ int mY;
+ int mClickX;
+ int mClickY;
+ int mXOffset;
+ int mYOffset;
+ int mDrawWidth;
+ int mDrawHeight;
/**
- * True if the left button is pressed, false otherwise.
+ * True if the vertical scroll bar is visible, false otherwise.
*/
- bool mLeftButtonPressed;
+ bool mVBarVisible;
/**
- * True if the right button is pressed, false otherwise.
+ * True if the horizontal scroll bar is visible, false otherwise.
*/
- bool mRightButtonPressed;
+ bool mHBarVisible;
/**
- * Holds the up button scroll amount.
+ * True if the up button is pressed, false otherwise.
*/
- int mUpButtonScrollAmount;
+ bool mUpButtonPressed;
/**
- * Holds the down button scroll amount.
+ * True if the down button is pressed, false otherwise.
*/
- int mDownButtonScrollAmount;
+ bool mDownButtonPressed;
/**
- * Holds the left button scroll amount.
+ * True if the left button is pressed, false otherwise.
*/
- int mLeftButtonScrollAmount;
+ bool mLeftButtonPressed;
/**
- * Holds the right button scroll amount.
+ * True if the right button is pressed, false otherwise.
*/
- int mRightButtonScrollAmount;
+ bool mRightButtonPressed;
/**
* True if the vertical marked is dragged.
@@ -556,31 +578,11 @@ class ScrollArea final : public BasicContainer,
bool mIsHorizontalMarkerDragged;
/**
- * Holds the horizontal markers drag offset.
- */
- int mHorizontalMarkerDragOffset;
-
- /**
- * Holds the vertical markers drag offset.
- */
- int mVerticalMarkerDragOffset;
-
- /**
* True if the scroll area should be opaque (that is
* display its background), false otherwise.
*/
bool mOpaque;
- int mX;
- int mY;
- int mClickX;
- int mClickY;
- ImageCollection *mVertexes;
- ImageCollection *mVertexes2;
- int mXOffset;
- int mYOffset;
- int mDrawWidth;
- int mDrawHeight;
bool mHasMouse;
bool mRedraw;
};