Ian McInerney
72a1c71e07
Implement a framework to handle wxUpdateUIEvents for tool actions
This allows for the tool framework to keep track of a universal
set of conditions for the UI state (enabled/checked/shown) for
controls of actions. It removes the need for the main menubar
menus to be CONDITIONAL_MENUs and be rebuilt on each open,
and instead makes the updates of the check and enabling of
items handled in the native wxWidgets way.
This commit switchs the 3d viewer and kicad project manager window
over to this system.
5 years ago
Johannes Pfister
8e8979e317
Fixed a memory leak in CONDITIONAL_MENU
CONDITIONAL_MENU::ENTRY now owns the wxItem object.
5 years ago
Ian McInerney
8493daf9ff
Unify menu item creation for closing a window
* Push a function into CONDITIONAL_MENU that adds the item
* Modify the tooltip for close and exit items to have the
program name
Fixes: lp:1835454
* https://bugs.launchpad.net/kicad/+bug/1835454
6 years ago
Jeff Young
cc82e59003
Push the Quit/Close menu logic down into common.
6 years ago
Jeff Young
19aba615c2
Remove selection condition from conditional menu separators.
We don't allow duplicate separators anyway so all they really do
is complicate the code.
6 years ago
Jeff Young
5610261dce
Immediate-action hotkeys (and context menu actions) for eeschema.
6 years ago
Jeff Young
45a9544726
Instantate a default menu from no selection when menu is first built.
This might resolve some of the GTK menu anomalies.
6 years ago
jean-pierre charras
aee1fe45f4
Fix a few issues related to Bitmaps in menus.
- fix missing icons.
- remove duplicate (and incorrect) code to set these icons in wxMenuItems
6 years ago
Jeff Young
13aa503614
Hack for wxWidgets failure to open menu on MSW.
6 years ago
Jeff Young
69afa27a5f
Implement ACTION_TOOLBAR and update some of the menus to ACTION_MENU.
This gives us better separation of MVC in line with the design of
the modern toolset. It also reduces a whole bunch of duplicated
data.
7 years ago
Jeff Young
f9e4ee1fc9
CONTEXT_MENU -> ACTION_MENU. (Now used for menu-bar menus too.)
7 years ago
Jeff Young
ef5c69167a
Start moving some LibEdit and SchEdit menubar menus to actions.
Also includes a bunch of bug fixes that got intermingled.
Fixes: lp:1828826
* https://bugs.launchpad.net/kicad/+bug/1828826
Fixes: lp:1828826
* https://bugs.launchpad.net/kicad/+bug/1828826
Fixes: lp:1828793
* https://bugs.launchpad.net/kicad/+bug/1828793
7 years ago
Tomasz Włostowski
9932ff32ae
refactoring: wrapped boost::optional in OPT<> class for the purpose of easier transition to C++17 in the future
8 years ago
Jon Evans
fd4e2b042c
Refactor SELECTION, SELECTION_CONDITIONS, and context menus to common
SELECTION now holds EDA_ITEMs not BOARD_ITEMs so various places had to
change to casting the selected items to BOARD_ITEMs.
Fixed compilation warnings on clang (Tom)
9 years ago
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.
9 years ago
Simon Richter
96ec9db5d6
Add missing C++ stdlib headers
The GCC standard library headers often include other headers, which makes
some code compile that forgets to include several headers.
10 years ago
Tomasz Wlostowski
9c2bcb2f3c
Fixed crash on right click on zone with GAL mode.
10 years ago
Maciej Suminski
d6bc33bd42
Removed a few more memory leaks and fixed crash on exit.
10 years ago
Maciej Suminski
83171482b3
Fixed a memleak (CONDITIONAL_MENU).
10 years ago
Maciej Suminski
81ea3ce408
Missing files.
11 years ago