summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-18 16:27:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-18 16:27:04 +0300
commit03c74387d37cefcc18e59db203d17d78cda40e8e (patch)
tree74e7291b97b67bb75984f5f5819944f058a9ace7 /src/gui/gui.cpp
parent3d7cb45edeb4f75bad321d54d84fe2d13b487db9 (diff)
downloadmv-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.gz
mv-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.bz2
mv-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.xz
mv-03c74387d37cefcc18e59db203d17d78cda40e8e.zip
Move mousebutton into separate file.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index c14f6d924..ab4ee5e19 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -116,12 +116,12 @@ Gui::Gui() :
mInput(nullptr),
mFocusHandler(new FocusHandler),
mKeyListeners(),
- mLastMousePressButton(0),
+ mLastMousePressButton(MouseButton::EMPTY),
mLastMousePressTimeStamp(0),
mLastMouseX(0),
mLastMouseY(0),
mClickCount(1),
- mLastMouseDragButton(0),
+ mLastMouseDragButton(MouseButton::EMPTY),
mWidgetWithMouseQueue(),
mConfigListener(new GuiConfigListener(this)),
mGuiFont(),
@@ -581,7 +581,7 @@ void Gui::handleMouseMoved(const MouseInput &mouseInput)
const int mouseX = mouseInput.getX();
const int mouseY = mouseInput.getY();
- const int button = mouseInput.getButton();
+ const MouseButton::Type button = mouseInput.getButton();
// Check if there is a need to send mouse exited events by
// traversing the "widget with mouse" queue.
@@ -724,7 +724,7 @@ void Gui::handleMousePressed(const MouseInput &mouseInput)
{
const int x = mouseInput.getX();
const int y = mouseInput.getY();
- const unsigned int button = mouseInput.getButton();
+ const MouseButton::Type button = mouseInput.getButton();
const int timeStamp = mouseInput.getTimeStamp();
Widget *sourceWidget = getMouseEventSource(x, y);
@@ -793,7 +793,7 @@ void Gui::updateFonts()
void Gui::distributeMouseEvent(Widget *const source,
const MouseEventType::Type type,
- const int button,
+ const MouseButton::Type button,
const int x, const int y,
const bool force,
const bool toSourceOnly)
@@ -936,7 +936,7 @@ MouseEvent *Gui::createMouseEvent(Window *const widget)
return new MouseEvent(widget,
MouseEventType::MOVED,
- 0,
+ MouseButton::EMPTY,
mouseX - x,
mouseY - y,
mClickCount);
@@ -1051,7 +1051,7 @@ void Gui::handleMouseReleased(const MouseInput &mouseInput)
}
else
{
- mLastMousePressButton = 0;
+ mLastMousePressButton = MouseButton::EMPTY;
mClickCount = 0;
}