summaryrefslogtreecommitdiff
path: root/src/guichan
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-03 19:30:43 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-03 19:30:43 +0300
commit9c3ba8303da72248d978696fc9363a2b47528b29 (patch)
tree354473f72b40e8db53c007cf9f9b92cdb2072068 /src/guichan
parentfea0de5f467181252909f7c2456362a9c9401b0d (diff)
downloadmanaplus-9c3ba8303da72248d978696fc9363a2b47528b29.tar.gz
manaplus-9c3ba8303da72248d978696fc9363a2b47528b29.tar.bz2
manaplus-9c3ba8303da72248d978696fc9363a2b47528b29.tar.xz
manaplus-9c3ba8303da72248d978696fc9363a2b47528b29.zip
add batch draw to slider.
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