diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-11-03 19:30:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-11-03 19:30:43 +0300 |
commit | 9c3ba8303da72248d978696fc9363a2b47528b29 (patch) | |
tree | 354473f72b40e8db53c007cf9f9b92cdb2072068 /src/guichan/widgets/slider.cpp | |
parent | fea0de5f467181252909f7c2456362a9c9401b0d (diff) | |
download | plus-9c3ba8303da72248d978696fc9363a2b47528b29.tar.gz plus-9c3ba8303da72248d978696fc9363a2b47528b29.tar.bz2 plus-9c3ba8303da72248d978696fc9363a2b47528b29.tar.xz plus-9c3ba8303da72248d978696fc9363a2b47528b29.zip |
add batch draw to slider.
Diffstat (limited to 'src/guichan/widgets/slider.cpp')
-rw-r--r-- | src/guichan/widgets/slider.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/guichan/widgets/slider.cpp b/src/guichan/widgets/slider.cpp index 322f2ef76..9a328f2cc 100644 --- a/src/guichan/widgets/slider.cpp +++ b/src/guichan/widgets/slider.cpp @@ -120,47 +120,6 @@ namespace gcn mScaleEnd = scaleEnd; } - void Slider::mousePressed(MouseEvent& mouseEvent) - { - if (mouseEvent.getButton() == gcn::MouseEvent::LEFT - && mouseEvent.getX() >= 0 - && mouseEvent.getX() <= getWidth() - && mouseEvent.getY() >= 0 - && mouseEvent.getY() <= getHeight()) - { - if (getOrientation() == HORIZONTAL) - { - setValue(markerPositionToValue( - mouseEvent.getX() - getMarkerLength() / 2)); - } - else - { - setValue(markerPositionToValue(getHeight() - - mouseEvent.getY() - getMarkerLength() / 2)); - } - - distributeActionEvent(); - } - } - - void Slider::mouseDragged(MouseEvent& mouseEvent) - { - if (getOrientation() == HORIZONTAL) - { - setValue(markerPositionToValue(mouseEvent.getX() - - getMarkerLength() / 2)); - } - else - { - setValue(markerPositionToValue(getHeight() - - mouseEvent.getY() - getMarkerLength() / 2)); - } - - distributeActionEvent(); - - mouseEvent.consume(); - } - void Slider::setValue(double value) { if (value > getScaleEnd()) @@ -193,10 +152,6 @@ namespace gcn mMarkerLength = length; } - void Slider::keyPressed(KeyEvent& keyEvent A_UNUSED) - { - } - void Slider::setOrientation(Slider::Orientation orientation) { mOrientation = orientation; @@ -254,20 +209,4 @@ namespace gcn { return valueToMarkerPosition(getValue()); } - - void Slider::mouseWheelMovedUp(MouseEvent& mouseEvent) - { - setValue(getValue() + getStepLength()); - distributeActionEvent(); - - mouseEvent.consume(); - } - - void Slider::mouseWheelMovedDown(MouseEvent& mouseEvent) - { - setValue(getValue() - getStepLength()); - distributeActionEvent(); - - mouseEvent.consume(); - } } // namespace gcn |