From 84048262bd2f58f4b7b5cf870a89dc01865d3b39 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 6 Jan 2020 05:43:18 -0800 Subject: [PATCH] Descope KB defines The 3d viewer is the last component to not use the action framework, so we descope the common defines to its canvas. Once the 3d viewer is converted, we can remove these entirely. --- 3d-viewer/3d_canvas/eda_3d_canvas.h | 8 ++++++++ include/common.h | 20 -------------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/3d-viewer/3d_canvas/eda_3d_canvas.h b/3d-viewer/3d_canvas/eda_3d_canvas.h index 843c9cda10..21eea0b7db 100644 --- a/3d-viewer/3d_canvas/eda_3d_canvas.h +++ b/3d-viewer/3d_canvas/eda_3d_canvas.h @@ -45,6 +45,14 @@ #include #include +// Flag for special keys +// TODO Remove these when Action-ifying 3d viewer +#define GR_KB_RIGHTSHIFT ( 0x01000000U ) +#define GR_KB_LEFTSHIFT ( 0x02000000U ) +#define GR_KB_CTRL ( 0x04000000U ) +#define GR_KB_ALT ( 0x08000000U ) +#define GR_KB_SHIFT ( GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT ) + /** * Implement a canvas based on a wxGLCanvas diff --git a/include/common.h b/include/common.h index fd8049c6c5..4baecdfed2 100644 --- a/include/common.h +++ b/include/common.h @@ -63,24 +63,6 @@ class REPORTER; */ typedef uint32_t timestamp_t; - -// Flag for special keys -// This type could be extended to 64 bits to add room for more flags. -// For compatibility with old code, keep flag bits out of the least -// significant nibble (0xF). -typedef uint32_t EDA_KEY; -#define EDA_KEY_C UINT32_C - -#define GR_KB_RIGHTSHIFT ( EDA_KEY_C( 0x01000000 ) ) -#define GR_KB_LEFTSHIFT ( EDA_KEY_C( 0x02000000 ) ) -#define GR_KB_CTRL ( EDA_KEY_C( 0x04000000 ) ) -#define GR_KB_ALT ( EDA_KEY_C( 0x08000000 ) ) -#define GR_KB_SHIFT ( GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT ) -#define GR_KB_SHIFTCTRL ( GR_KB_SHIFT | GR_KB_CTRL ) -#define MOUSE_MIDDLE ( EDA_KEY_C( 0x10000000 ) ) -#define GR_KEY_INVALID ( EDA_KEY_C( 0x80000000 ) ) -#define GR_KEY_NONE ( EDA_KEY_C( 0 ) ) - /// default name for nameless projects #define NAMELESS_PROJECT wxT( "noname" ) @@ -96,8 +78,6 @@ enum pseudokeys { EDA_ZOOM_CENTER_FROM_MOUSE }; -#define ESC 27 - /// Frequent text rotations, used with {Set,Get}TextAngle(), /// in 0.1 degrees for now, hoping to migrate to degrees eventually. #define TEXT_ANGLE_HORIZ 0