2010-01-17 20:25:10 +00:00
|
|
|
/**
|
2010-12-14 15:56:30 +00:00
|
|
|
* @file pcbnew/hotkeys.h
|
2012-05-13 15:31:58 +00:00
|
|
|
* Pcbnew hotkeys
|
2010-01-17 20:25:10 +00:00
|
|
|
*/
|
|
|
|
#ifndef _PCBNEW_KOTKEYS_H
|
|
|
|
#define _PCBNEW_HOTKEYS_H
|
2007-08-30 14:57:35 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <hotkeys_basic.h>
|
2007-08-30 14:57:35 +00:00
|
|
|
|
2010-02-14 18:14:33 +00:00
|
|
|
// List of hot keys id.
|
|
|
|
// see also enum common_hotkey_id_commnand in hotkeys_basic.h
|
|
|
|
// for shared hotkeys id
|
2007-08-30 14:57:35 +00:00
|
|
|
enum hotkey_id_commnand {
|
2010-02-14 18:14:33 +00:00
|
|
|
HK_DELETE = HK_COMMON_END,
|
2007-08-30 14:57:35 +00:00
|
|
|
HK_BACK_SPACE,
|
2010-08-12 19:41:13 +00:00
|
|
|
HK_ROTATE_ITEM,
|
2012-05-30 17:38:52 +00:00
|
|
|
HK_FLIP_ITEM,
|
2012-07-04 19:50:47 +00:00
|
|
|
HK_COPY_ITEM,
|
2010-08-12 19:41:13 +00:00
|
|
|
HK_MOVE_ITEM,
|
2010-08-17 10:41:44 +00:00
|
|
|
HK_DRAG_ITEM,
|
2009-12-02 09:59:49 +00:00
|
|
|
HK_GET_AND_MOVE_FOOTPRINT,
|
2007-08-30 14:57:35 +00:00
|
|
|
HK_LOCK_UNLOCK_FOOTPRINT,
|
2009-12-03 12:28:04 +00:00
|
|
|
HK_ADD_NEW_TRACK,
|
2008-01-12 20:31:56 +00:00
|
|
|
HK_ADD_VIA,
|
2009-12-02 09:59:49 +00:00
|
|
|
HK_ADD_MICROVIA,
|
2010-06-16 15:01:45 +00:00
|
|
|
HK_SWITCH_TRACK_POSTURE,
|
2011-08-30 09:42:42 +00:00
|
|
|
HK_DRAG_TRACK_KEEP_SLOPE,
|
2009-12-02 09:59:49 +00:00
|
|
|
HK_END_TRACK,
|
2007-08-30 14:57:35 +00:00
|
|
|
HK_SAVE_BOARD, HK_LOAD_BOARD,
|
2012-09-12 11:11:30 +00:00
|
|
|
HK_SAVE_MODULE,
|
2007-09-10 04:51:01 +00:00
|
|
|
HK_SWITCH_UNITS,
|
2009-06-19 20:13:22 +00:00
|
|
|
HK_SWITCH_TRACK_DISPLAY_MODE,
|
2007-08-30 14:57:35 +00:00
|
|
|
HK_FIND_ITEM,
|
2010-08-10 18:34:26 +00:00
|
|
|
HK_EDIT_ITEM,
|
2011-09-07 09:27:02 +00:00
|
|
|
HK_PLACE_ITEM,
|
2011-09-09 11:02:03 +00:00
|
|
|
HK_SWITCH_TRACK_WIDTH_TO_NEXT,
|
|
|
|
HK_SWITCH_TRACK_WIDTH_TO_PREVIOUS,
|
|
|
|
HK_SWITCH_GRID_TO_FASTGRID1,
|
|
|
|
HK_SWITCH_GRID_TO_FASTGRID2,
|
|
|
|
HK_SWITCH_GRID_TO_NEXT,
|
|
|
|
HK_SWITCH_GRID_TO_PREVIOUS,
|
2007-08-30 14:57:35 +00:00
|
|
|
HK_SWITCH_LAYER_TO_COPPER,
|
|
|
|
HK_SWITCH_LAYER_TO_COMPONENT,
|
|
|
|
HK_SWITCH_LAYER_TO_NEXT,
|
|
|
|
HK_SWITCH_LAYER_TO_PREVIOUS,
|
|
|
|
HK_SWITCH_LAYER_TO_INNER1,
|
|
|
|
HK_SWITCH_LAYER_TO_INNER2,
|
|
|
|
HK_SWITCH_LAYER_TO_INNER3,
|
|
|
|
HK_SWITCH_LAYER_TO_INNER4,
|
|
|
|
HK_SWITCH_LAYER_TO_INNER5,
|
2007-09-06 11:52:26 +00:00
|
|
|
HK_SWITCH_LAYER_TO_INNER6,
|
2009-06-19 20:13:22 +00:00
|
|
|
HK_SWITCH_LAYER_TO_INNER7,
|
|
|
|
HK_SWITCH_LAYER_TO_INNER8,
|
|
|
|
HK_SWITCH_LAYER_TO_INNER9,
|
|
|
|
HK_SWITCH_LAYER_TO_INNER10,
|
|
|
|
HK_SWITCH_LAYER_TO_INNER11,
|
|
|
|
HK_SWITCH_LAYER_TO_INNER12,
|
|
|
|
HK_SWITCH_LAYER_TO_INNER13,
|
|
|
|
HK_SWITCH_LAYER_TO_INNER14,
|
|
|
|
HK_ADD_MODULE,
|
2011-09-07 09:27:02 +00:00
|
|
|
HK_SLIDE_TRACK,
|
2012-12-01 20:03:33 +00:00
|
|
|
HK_MACRO_ID_BEGIN,
|
|
|
|
HK_RECORD_MACROS_0, // keep these id ordered from 0 to 9
|
|
|
|
HK_RECORD_MACROS_1, // because this order is used in code
|
|
|
|
HK_RECORD_MACROS_2,
|
|
|
|
HK_RECORD_MACROS_3,
|
|
|
|
HK_RECORD_MACROS_4,
|
|
|
|
HK_RECORD_MACROS_5,
|
|
|
|
HK_RECORD_MACROS_6,
|
|
|
|
HK_RECORD_MACROS_7,
|
|
|
|
HK_RECORD_MACROS_8,
|
|
|
|
HK_RECORD_MACROS_9,
|
2011-09-07 09:27:02 +00:00
|
|
|
HK_CALL_MACROS_0,
|
|
|
|
HK_CALL_MACROS_1,
|
|
|
|
HK_CALL_MACROS_2,
|
|
|
|
HK_CALL_MACROS_3,
|
|
|
|
HK_CALL_MACROS_4,
|
|
|
|
HK_CALL_MACROS_5,
|
|
|
|
HK_CALL_MACROS_6,
|
|
|
|
HK_CALL_MACROS_7,
|
|
|
|
HK_CALL_MACROS_8,
|
2012-02-19 17:33:06 +00:00
|
|
|
HK_CALL_MACROS_9,
|
2012-12-01 20:03:33 +00:00
|
|
|
HK_MACRO_ID_END,
|
2012-02-19 17:33:06 +00:00
|
|
|
HK_SWITCH_HIGHCONTRAST_MODE,
|
Introduction of Graphics Abstraction Layer based rendering for pcbnew.
New classes:
- VIEW - represents view that is seen by user, takes care of layer ordering & visibility and how it is displayed (which location, how much zoomed, etc.)
- VIEW_ITEM - Base class for every item that can be displayed on VIEW (the biggest change is that now it may be necessary to override ViewBBox & ViewGetLayers method for derived classes).
- EDA_DRAW_PANEL_GAL - Inherits after EDA_DRAW_PANEL, displays VIEW output, right now it is not editable (in opposite to usual EDA_DRAW_PANEL).
- GAL/OPENGL_GAL/CAIRO_GAL - Base Graphics Abstraction Layer class + two different flavours (Cairo is not fully supported yet), that offers methods to draw primitives using different libraries.
- WX_VIEW_CONTROLS - Controller for VIEW, handles user events, allows zooming, panning, etc.
- PAINTER/PCB_PAINTER - Classes that uses GAL interface to draw items (as you may have already guessed - PCB_PAINTER is a class for drawing PCB specific object, PAINTER is an abstract class). Its methods are invoked by VIEW, when an item has to be drawn. To display a new type of item - you need to implement draw(ITEM_TYPE*) method that draws it using GAL methods.
- STROKE_FONT - Implements stroke font drawing using GAL methods.
Most important changes to Kicad original code:
* EDA_ITEM now inherits from VIEW_ITEM, which is a base class for all drawable objects.
* EDA_DRAW_FRAME contains both usual EDA_DRAW_PANEL and new EDA_DRAW_PANEL_GAL, that can be switched anytime.
* There are some new layers for displaying multilayer pads, vias & pads holes (these are not shown yet on the right sidebar in pcbnew)
* Display order of layers is different than in previous versions (if you are curious - you may check m_galLayerOrder@pcbnew/basepcbframe.cpp). Preserving usual order would result in not very natural display, such as showing silkscreen texts on the bottom.
* Introduced new hotkey (Alt+F12) and new menu option (View->Switch canvas) for switching canvas during runtime.
* Some of classes (mostly derived from BOARD_ITEM) now includes ViewBBox & ViewGetLayers methods.
* Removed tools/class_painter.h, as now it is extended and included in source code.
Build changes:
* GAL-based rendering option is turned on by a new compilation CMake option KICAD_GAL.
* When compiling with CMake option KICAD_GAL=ON, GLEW and Cairo libraries are required.
* GAL-related code is compiled into a static library (common/libgal).
* Build with KICAD_GAL=OFF should not need any new libraries and should come out as a standard version of Kicad
Currently most of items in pcbnew can be displayed using OpenGL (to be done are DIMENSIONS and MARKERS).
More details about GAL can be found in: http://www.ohwr.org/attachments/1884/view-spec.pdf
2013-04-02 06:54:03 +00:00
|
|
|
#ifdef KICAD_GAL
|
|
|
|
HK_SWITCH_CANVAS,
|
|
|
|
#endif
|
2007-08-30 14:57:35 +00:00
|
|
|
};
|
|
|
|
|
2011-09-29 16:49:40 +00:00
|
|
|
// Full list of hotkey descriptors for board editor and footprint editor
|
|
|
|
extern struct EDA_HOTKEY_CONFIG g_Pcbnew_Editor_Hokeys_Descr[];
|
2009-12-02 09:59:49 +00:00
|
|
|
|
2007-09-06 11:52:26 +00:00
|
|
|
// List of hotkey descriptors for the board editor only
|
2011-09-29 16:49:40 +00:00
|
|
|
extern struct EDA_HOTKEY_CONFIG g_Board_Editor_Hokeys_Descr[];
|
2009-12-02 09:59:49 +00:00
|
|
|
|
2007-09-06 11:52:26 +00:00
|
|
|
// List of hotkey descriptors for the footprint editor only
|
2011-09-29 16:49:40 +00:00
|
|
|
extern struct EDA_HOTKEY_CONFIG g_Module_Editor_Hokeys_Descr[];
|
2010-11-24 15:10:33 +00:00
|
|
|
|
2012-02-09 20:33:38 +00:00
|
|
|
// List of hotkey descriptors for the footprint editor only
|
|
|
|
extern struct EDA_HOTKEY_CONFIG g_Module_Viewer_Hokeys_Descr[];
|
|
|
|
|
2010-11-24 15:10:33 +00:00
|
|
|
// List of common hotkey descriptors
|
|
|
|
// used in hotkeys_board_editor.cpp and hotkeys_module_editor.cpp
|
2011-09-29 16:49:40 +00:00
|
|
|
extern EDA_HOTKEY* common_Hotkey_List[];
|
|
|
|
|
2010-11-24 15:10:33 +00:00
|
|
|
// List of hotkey descriptors for pcbnew
|
|
|
|
// used in hotkeys_board_editor.cpp
|
2011-09-29 16:49:40 +00:00
|
|
|
extern EDA_HOTKEY* board_edit_Hotkey_List[];
|
|
|
|
|
2010-11-24 15:10:33 +00:00
|
|
|
// List of hotkey descriptors for the module editor
|
|
|
|
// used in hotkeys_module_editor.cpp
|
2011-09-29 16:49:40 +00:00
|
|
|
extern EDA_HOTKEY* module_edit_Hotkey_List[];
|
2010-11-24 15:10:33 +00:00
|
|
|
|
2007-08-30 14:57:35 +00:00
|
|
|
|
2010-01-17 20:25:10 +00:00
|
|
|
#endif /* _PCBNEW_HOTKEYS_H_ */
|