summaryrefslogtreecommitdiff
path: root/src/managers/input/trackpad/gestures/CloseGesture.hpp
blob: a8e18fd257f4bca8d7eec5c0f639604dbb4b379e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include "ITrackpadGesture.hpp"

#include "../../../../desktop/DesktopTypes.hpp"

class CCloseTrackpadGesture : public ITrackpadGesture {
  public:
    CCloseTrackpadGesture()          = default;
    virtual ~CCloseTrackpadGesture() = default;

    virtual void begin(const ITrackpadGesture::STrackpadGestureBegin& e);
    virtual void update(const ITrackpadGesture::STrackpadGestureUpdate& e);
    virtual void end(const ITrackpadGesture::STrackpadGestureEnd& e);

  private:
    PHLWINDOWREF m_window;

    Vector2D     m_posFrom, m_posTo, m_sizeFrom, m_sizeTo;
    float        m_alphaFrom = 0.F, m_alphaTo = 0.F;

    float        m_lastDelta = 0.F;
};