Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
This replaces a hack where the parameter was used to identify a custom
UI ID with a proper solution. This moves the cut/copy/paste actions to
the new system, but more like help/quit/close should also be moved over
in the future.
This allows them to work in places like search boxes in standard file
dialogs. If wxWidgets doesn't find the standard IDs in our menus
then it won't enable them.
Our menu bar code is interestingly complex. But we were throwing away newly made menu items to the void in the cases of constructed on the fly submenus
It appears that both strategies in the last commit worked, leaving us
with squared scaling. The dialog pixel architecture seems safer than
our icon scaling stuff, so this version attempts to use only it.
Also works around a bug where wxELLIPSIZE_MIDDLE doesn't work on Mac.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
Fixes https://gitlab.com/kicad/code/kicad/issues/8375
For some reason once a player is opened from the Kicad Manager window
all the items under the help menu get grayed out. This prevents that
from happening.
Saying "Import/Export" on the labels when the submenu has "Import"
or "Export" in it is redundant.
Note that we can't just update the action text with the new name,
because that is used in the hotkey list and would become too confusing
without the "Import"/"Export" text.
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.
Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz
The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.
Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.
Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
The accelerator strings really shouldn't be part of the translation,
and some translations have cause the accelerator keys to be incorrectly
handled. It is simpler to make it separate and just join them to the
translated string.
Make all accelerator modifiers use lowercased Ctrl instead of CTRL
to be the same as the other modifiers.
Fixes https://gitlab.com/kicad/code/kicad/issues/5992
Windows specific, because other OS do not accept user bitmaps in ckeckable menuitems
the bug was due to the same bitmap was set for each state for these menuitems.
Fixes#5622https://gitlab.com/kicad/code/kicad/issues/5622
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.
There is still some debugging output in test code that really needs to
be moved into a unit test.
Add debugging output section to the coding policy regarding debugging
output.
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.
when a wxTextCtrl has the focus but is read only, and cannot use a CHAR event.
It fixes an issue in Kicad manager (menus with accelerator not working) when
the wxTextCtrl window showing messages has the focus.
The immediate action option clears (or not) the position of the events.
We use this to determine if the command should start at the given
position or merely activate the tool. This was being checked in the
menu options, which only activated for tool commands in the context
menu. Moving to the process event, we catch hotkeys as well.
This also restores the previous logic in eeschema that used a static
variable for storing wires rather than the private class variable.
Starting the draw event now picks up from the existing wires when
activated in immediate mode.
Fixes#3891 | https://gitlab.com/kicad/code/kicad/issues/3891
* Make the events generated by the selection of context menu items
have the position where the menu was opened
* Ensure that TC_COMMAND type events have their position set to
be the cursor position where the event originated