KiCad PCB EDA Suite
Loading...
Searching...
No Matches
touchpad.h
Go to the documentation of this file.
1
/*
2
* This program source code file is part of KiCad, a free EDA CAD application.
3
*
4
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5
*
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License as published by the
8
* Free Software Foundation, either version 3 of the License, or (at your option)
9
* any later version.
10
*
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
* for more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* with this program. If not, see <https://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef KIPLATFORM_TOUCHPAD_H_
21
#define KIPLATFORM_TOUCHPAD_H_
22
23
#include <functional>
24
#include <memory>
25
26
#include <wx/gdicmn.h>
27
28
class
wxWindow;
29
30
namespace
KIPLATFORM
31
{
32
namespace
UI
33
{
37
struct
TOUCHPAD_GESTURE
38
{
39
double
panX
;
40
double
panY
;
41
double
zoomFactor
;
42
wxPoint
zoomAnchor
;
43
};
44
45
49
class
TOUCHPAD_GESTURE_HANDLER
50
{
51
public
:
52
virtual
~TOUCHPAD_GESTURE_HANDLER
() =
default
;
53
};
54
55
56
using
TOUCHPAD_GESTURE_CALLBACK
= std::function<void(
const
TOUCHPAD_GESTURE
& )>;
57
61
bool
IsNativeTouchpadGestureAvailable
();
62
70
std::unique_ptr<TOUCHPAD_GESTURE_HANDLER>
CreateTouchpadGestureHandler
(
71
wxWindow* aInputWindow,
TOUCHPAD_GESTURE_CALLBACK
aCallback );
72
}
73
}
74
75
#endif
// KIPLATFORM_TOUCHPAD_H_
KIPLATFORM::UI::TOUCHPAD_GESTURE_HANDLER
Owns a platform touchpad input registration for the lifetime of an input window.
Definition
touchpad.h:50
KIPLATFORM::UI::TOUCHPAD_GESTURE_HANDLER::~TOUCHPAD_GESTURE_HANDLER
virtual ~TOUCHPAD_GESTURE_HANDLER()=default
KIPLATFORM::UI
Definition
class_draw_panel_gal.h:48
KIPLATFORM::UI::IsNativeTouchpadGestureAvailable
bool IsNativeTouchpadGestureAvailable()
Check whether this port provides the native touchpad gesture APIs.
Definition
wxgtk/touchpad.cpp:23
KIPLATFORM::UI::CreateTouchpadGestureHandler
std::unique_ptr< TOUCHPAD_GESTURE_HANDLER > CreateTouchpadGestureHandler(wxWindow *aInputWindow, TOUCHPAD_GESTURE_CALLBACK aCallback)
Register a window for native touchpad pan and pinch gestures when the port supports it.
Definition
wxgtk/touchpad.cpp:30
KIPLATFORM::UI::TOUCHPAD_GESTURE_CALLBACK
std::function< void(const TOUCHPAD_GESTURE &)> TOUCHPAD_GESTURE_CALLBACK
Definition
touchpad.h:56
KIPLATFORM
Definition
class_draw_panel_gal.h:46
KIPLATFORM::UI::TOUCHPAD_GESTURE
A pan and zoom update produced by a native touchpad gesture recognizer.
Definition
touchpad.h:38
KIPLATFORM::UI::TOUCHPAD_GESTURE::zoomFactor
double zoomFactor
Definition
touchpad.h:41
KIPLATFORM::UI::TOUCHPAD_GESTURE::panY
double panY
Definition
touchpad.h:40
KIPLATFORM::UI::TOUCHPAD_GESTURE::panX
double panX
Definition
touchpad.h:39
KIPLATFORM::UI::TOUCHPAD_GESTURE::zoomAnchor
wxPoint zoomAnchor
Definition
touchpad.h:42
src
libs
kiplatform
include
kiplatform
touchpad.h
Generated on Thu Sep 17 2026 00:06:17 for KiCad PCB EDA Suite by
1.13.2