Commit Graph

111 Commits

Author SHA1 Message Date
Maciej Suminski f03181e94d Fixed a hot key conflict. 2014-07-24 13:09:16 +02:00
Maciej Suminski c4086d931b Fixed Mac OS build. 2014-07-20 20:58:33 +02:00
Maciej Suminski e1d390f8a0 Alternative way to handle mouse buttons (GAL). 2014-07-15 17:34:53 +02:00
Maciej Suminski 40361deb56 Cursor position is frozen when a context menu is displayed (GAL). 2014-07-09 16:50:31 +02:00
Maciej Suminski a3eb60e068 Added event queue to handle events at the end of the event processing cycle. 2014-07-09 16:25:50 +02:00
Maciej Suminski 7f13fd0ffd Added AF_NOTIFY flag for TOOL_ACTIONs. 2014-07-09 15:10:32 +02:00
Maciej Suminski 82ff9ceca7 Introduced SELECTION_CONDITIONS to determine which menu entries should be visible in the SELECTION_TOOL context menu, depending on the selection. 2014-07-09 15:10:32 +02:00
Maciej Suminski bba31a43eb wxWidgets 2.8 compatibility fix. 2014-07-09 14:23:13 +02:00
Maciej Suminski 098449d7dc Routines for handling clipboard with TOOL_MANAGER. 2014-07-09 14:01:07 +02:00
Maciej Suminski 06361eb2c1 Added AF_ACTIVATE flag for TOOL_ACTIONs.
Reworked the way of processing events in TOOL_MANAGER class.
Added GetCommandStr() for TOOL_EVENT class.
2014-07-09 13:50:27 +02:00
Maciej Suminski 3ce4e4d356 Improved way of translating wxEvent commands to TOOL_ACTIONs. 2014-07-09 13:50:27 +02:00
Maciej Suminski 6859bf8301 Introduced a new type of action: TA_ACTIVATE to distinguish events activating tools from common tool actions. 2014-07-09 13:50:27 +02:00
Maciej Suminski d63dd3fa70 Implemented stacking for TOOL_STATEs. 2014-07-09 13:50:27 +02:00
Maciej Suminski 3587f47cca Minor fixes to the Tool Framework. 2014-07-09 13:50:27 +02:00
Maciej Suminski 946ffb2ad9 Restored std::map in TOOL_MANAGER. 2014-07-09 13:50:27 +02:00
Maciej Suminski e4ec886a6c Added an alternative way to reach tools in the Tool Framework. 2014-07-09 11:59:24 +02:00
Maciej Suminski 2d44b7e3c2 Reduced number of switched events, allowing to use VIEW_CONTROLS, even if there is no extra event dispatcher. 2014-07-09 11:22:43 +02:00
Maciej Suminski d3b2e50200 Alternative approach to handling events and commands by TOOL_DISPATCHER.
Event handlers are (dis)connected depending on the active view.
TOOL_DISPATCHER inherits from wxEvtHandler, so now it receives events directly instead of being fed by external handlers.
2014-07-09 11:22:42 +02:00
Maciej Suminski 7c812664f3 TOOL_ACTIONs are automagically registered by TOOL_MANAGER upon its construction. 2014-07-09 11:22:42 +02:00
Maciej Suminski c416f5a1e5 Removed a redundant pointer to EDA_EDIT_FRAME. 2014-07-09 11:22:42 +02:00
Maciej Suminski bc766093a3 Setting proper tool for submenus of CONTEXT_MENU class. 2014-05-31 16:04:10 +02:00
Maciej Suminski 68ada9e169 Fix for context menu hanging up in GAL. 2014-05-22 17:59:36 +02:00
Maciej Suminski 58becbeb59 Workaround for Mac OS, fixes focus after a mouse click. 2014-05-15 17:08:15 +02:00
Maciej Suminski b59770e8ca TOOL_MANAGER is no longer static. Reworked autoregistration of TOOL_ACTIONs. 2014-05-14 16:29:53 +02:00
Maciej Suminski f3e771ac1f Minor reorganization of handling custom events with CONTEXT_MENU. 2014-05-13 11:22:51 +02:00
Maciej Suminski bc372564cf Fixed custom event handlers for CONTEXT_MENU.
Moved menuCopy to CONTEXT_MENU copy constructor.
2014-05-13 11:22:51 +02:00
Maciej Suminski 7155e3a9db Recursive copy constructor for CONTEXT_MENU. 2014-05-13 11:22:51 +02:00
Maciej Suminski 5abb625ef5 Fixing memory leaks. 2014-05-13 11:22:51 +02:00
Maciej Suminski d08f8ed62d More compatibility fixes. 2014-05-13 11:22:51 +02:00
Maciej Suminski f092fac22e Resolved HOME hot key conflict between menu entry (Zoom Page) and event assigned to the hot key in the ACTION_MANAGER.
Conflicts:
	pcbnew/menubar_pcbframe.cpp
2014-05-13 11:22:51 +02:00
Maciej Suminski a86387eec6 Better way of adding CONTEXT_MENU entries. 2014-05-13 11:22:50 +02:00
Maciej Suminski 7e43e8e4dd wxWidgets 2.8 compatibility fixes. 2014-04-15 16:36:23 +02:00
Maciej Suminski e4a4578b40 Key events are handled by wxEVT_CHAR instead of wxEVT_KEY_[UP|DOWN]. Fixed issue of chars that require modifiers (e.g. ? is Shift+/ on US keyboard layout). 2014-04-09 17:33:22 +02:00
Maciej Suminski 1c35e7d6f6 Hot keys specific to a tool have priority over global hot keys (TOOL_ACTION scope: AS_GLOBAL/AS_CONTEXT is finally handled properly). 2014-04-09 17:05:05 +02:00
Maciej Suminski d5d4ae3305 Renamed [class_]drawpanel_gal.[cpp|h] to [class_]draw_panel_gal.[cpp|h] to follow current naming scheme. 2014-04-04 11:56:04 +02:00
Maciej Suminski 0e35ad6329 Fixed cancelling dialogs in DRAWING_TOOL. 2014-04-03 09:48:06 +02:00
Maciej Suminski 9b67ee04e6 If tool was previously active and it is called again, it is brought to the top of the active tool stack.
It fixes issue of dragging of items that have EDIT_POINTs, when dragging was activated by hovering over an item and using hot key.
2014-04-01 14:35:09 +02:00
Maciej Suminski 3b05177a3a PCB_EDIT_FRAME::SetHighContrastLayer() went public.
Refactored code that handled zooming events.
Added PCB_RENDER_SETTINGS::Get/SetSketchMode().
PCBNEW_CONTROL reacts to hot keys changing display modes (sketch via/tracks, high contrast).
2014-03-24 17:20:23 +01:00
Maciej Suminski 1f38879fef FIxed too late deletion of TOOLs. 2014-03-21 17:55:46 +01:00
Maciej Suminski 5eb4ecbf1c TOOL_EVENTs autoregister themselves in ACTION_MANAGER.
ROUTER_TOOL events have temporarily changed their hotkeys assignment.
2014-03-21 10:40:50 +01:00
Maciej Suminski b34f6bcd0b Cursor coordinates are updated in GAL canvases. 2014-03-19 14:26:02 +01:00
Maciej Suminski 8d8c72856d Added TOOL_MANAGER & ACTION_MANAGER::RunAction( const TOOL_ACTION aAction ).
Selection clearing is invoked using TOOL_ACTION object rather than its name.
2014-02-28 15:46:05 +01:00
Maciej Suminski f01b2502c8 Added TOOL_ACTION for PNS router activation.
Most of the GAL tools are activated by corresponding buttons on the right toolbar.
Removed menu entry for PNS router (as it is activated as the usual "Add track" tool).
2014-02-17 18:21:00 +01:00
Maciej Suminski 5299e41ac4 Added TOOL_INTERACTIVE::Activate().
Removed an unnecessary header from class_board_item.h.
2014-02-06 14:45:33 +01:00
Maciej Suminski 37dc675b7a Merged the lp:~cern-kicad/kicad/selection_tool branch. 2014-02-06 12:48:18 +01:00
Maciej Suminski 9e4e5ddd03 Modifiers (Shift/Ctrl/Alt) are set also while moving the mouse cursor. 2014-02-06 10:43:19 +01:00
Maciej Suminski 221b68d0b8 Snapping settings are valid while autopanning. 2014-02-04 09:44:16 +01:00
Maciej Suminski d2e865146b Added a new tool event: TA_UNDO_REDO, sent after undo/redo operation is issued. 2014-01-30 11:18:58 +01:00
Maciej Suminski 8626e906cb Removed TOOL_STATE.idle field, as it was redundant. 2014-01-07 14:11:53 +01:00
Maciej Suminski 292a50f8c0 Fixed cursor force position option. 2013-12-20 16:07:58 +01:00