summaryrefslogtreecommitdiff
path: root/src/guichan
diff options
context:
space:
mode:
Diffstat (limited to 'src/guichan')
-rw-r--r--src/guichan/include/guichan/widgets/slider.hpp15
-rw-r--r--src/guichan/widgets/slider.cpp61
2 files changed, 0 insertions, 76 deletions
diff --git a/src/guichan/include/guichan/widgets/slider.hpp b/src/guichan/include/guichan/widgets/slider.hpp
index c4229a514..c925df45f 100644
--- a/src/guichan/include/guichan/widgets/slider.hpp
+++ b/src/guichan/include/guichan/widgets/slider.hpp
@@ -207,21 +207,6 @@ namespace gcn
*/
double getStepLength() const;
- // Inherited from MouseListener.
-
- virtual void mousePressed(MouseEvent& mouseEvent) override;
-
- virtual void mouseDragged(MouseEvent& mouseEvent) override;
-
- virtual void mouseWheelMovedUp(MouseEvent& mouseEvent) override;
-
- virtual void mouseWheelMovedDown(MouseEvent& mouseEvent) override;
-
-
- // Inherited from KeyListener
-
- virtual void keyPressed(KeyEvent& keyEvent) override;
-
protected:
/**
* Converts a marker position to a value in the scale.
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