Commit Graph

10 Commits

Author SHA1 Message Date
Jon Evans 4c83b0a94d Move TOOL_ACTIONs to their corresponding tools; create COMMON_TOOLS
Some grid/zoom tools are left in PCBNEW_CONTROL because they currently
depend on Pcbnew-specific class members.  Once refactoring is done to
make it possible to use all zoom and grid controls outside of pcbnew,
these last tools can be moved to common to match their ACTIONs.
2017-02-22 10:32:48 +01:00
Jon Evans 167f45ca2b Refactor COMMON_ACTIONS into a base and derived class
New virtual class ACTIONS is added as a member to EDA_DRAW_FRAME so
that the TOOL_DISPATCHER can have access to the appropriate derived
version of TranslateLegacyId()
2017-02-22 10:32:48 +01:00
John Beard a8eea6155a Move bitmaps.h out of base_struct.h
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h

Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.

This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.

The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.

Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
2017-02-21 09:50:15 -05:00
Maciej Suminski 1102eb0d0d Store menu titles in CONTEXT_MENU
Previously a title had to be provided when a submenu was added,
but this led to storing the same title in many places.
2017-01-23 14:52:11 +01:00
Maciej Suminski f0a7c1715e Fixed warning 'cast pointer from integer of a different size' 2017-01-23 11:40:59 +01:00
Maciej Suminski 682da70a86 Fixed the issue of creating and event handling in context menus (GAL).
When creating a copy of CONTEXT_MENU, always a CONTEXT_MENU instance was
constructed, whereas an inherited type should be used. Solved with
CONTEXT_MENU::create() that has to be overridden in inheriting classes.

Event & update handlers are now virtual functions, instead of setting
the handlers with Set{Event,Update}Handler().
2017-01-23 11:40:59 +01:00
jean-pierre charras e710b8b370 Fix incorrect parameter type when appending zoom and grid menuitems 2017-01-19 20:26:57 +01:00
Michael Steinberg fde12ebd25 Replace boost::function and boost::bind with their std:: counterparts 2016-06-29 12:23:11 +02:00
jean-pierre charras 37b0868376 Pcbnew: fix minor issues about fast grid switching, and next/previous grid selection from hotkeys. (GAL mode still has an issue) 2015-05-12 11:05:36 +02:00
Maciej Suminski 81ea3ce408 Missing files. 2015-04-30 11:08:18 +02:00