KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pl_actions.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2019-2023 CERN
5 * Copyright (C) 2019-2023 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#include <tool/tool_action.h>
26#include <bitmaps.h>
27#include <eda_item.h>
29
30#include "tools/pl_actions.h"
31
32// Actions, being statically-defined, require specialized I18N handling. We continue to
33// use the _() macro so that string harvesting by the I18N framework doesn't have to be
34// specialized, but we don't translate on initialization and instead do it in the getters.
35
36#undef _
37#define _(s) s
38
39
40// PL_DRAWING_TOOLS
41//
43 .Name( "plEditor.InteractiveDrawing.drawLine" )
44 .Scope( AS_GLOBAL )
45 .FriendlyName( _( "Draw Lines" ) )
47 .Flags( AF_ACTIVATE )
48 .Parameter( DS_DATA_ITEM::DS_SEGMENT ) );
49
51 .Name( "plEditor.InteractiveDrawing.drawRectangle" )
52 .Scope( AS_GLOBAL )
53 .FriendlyName( _( "Draw Rectangles" ) )
55 .Flags( AF_ACTIVATE )
56 .Parameter( DS_DATA_ITEM::DS_RECT ) );
57
59 .Name( "plEditor.InteractiveDrawing.placeText" )
60 .Scope( AS_GLOBAL )
61 .FriendlyName( _( "Draw Text" ) )
62 .Icon( BITMAPS::text )
63 .Flags( AF_ACTIVATE )
64 .Parameter( DS_DATA_ITEM::DS_TEXT ) );
65
67 .Name( "plEditor.InteractiveDrawing.placeImage" )
68 .Scope( AS_GLOBAL )
69 .FriendlyName( _( "Place Bitmaps" ) )
70 .Icon( BITMAPS::image )
71 .Flags( AF_ACTIVATE )
72 .Parameter( DS_DATA_ITEM::DS_BITMAP ) );
73
74
75// PL_EDIT_TOOL
76//
78 .Name( "plEditor.InteractiveMove.move" )
79 .Scope( AS_GLOBAL )
80 .DefaultHotkey( 'M' )
81 .LegacyHotkeyName( "Move Item" )
82 .FriendlyName( _( "Move" ) )
83 .Icon( BITMAPS::move )
84 .Flags( AF_ACTIVATE ) );
85
87 .Name( "plEditor.InteractiveEdit.appendWorksheet" )
88 .Scope( AS_GLOBAL )
89 .FriendlyName( _( "Append Existing Drawing Sheet..." ) )
90 .Tooltip( _( "Append an existing drawing sheet file to the current file" ) )
91 .Icon( BITMAPS::import )
92 .Flags( AF_ACTIVATE ) );
93
94
95// PL_EDITOR_CONTROL
96//
98 .Name( "plEditor.EditorControl.ShowInspector" )
99 .Scope( AS_GLOBAL )
100 .FriendlyName( _( "Show Design Inspector" ) )
101 .Icon( BITMAPS::spreadsheet ) );
102
104 .Name( "plEditor.EditorControl.PreviewSettings" )
105 .Scope( AS_GLOBAL )
106 .FriendlyName( _( "Page Preview Settings..." ) )
107 .Tooltip( _( "Edit preview data for page size and title block" ) )
108 .Icon( BITMAPS::sheetset ) );
109
111 .Name( "plEditor.EditorControl.LayoutNormalMode" )
112 .Scope( AS_GLOBAL )
113 .FriendlyName( _( "Show Title Block in Preview Mode" ) )
114 .Tooltip( _( "Text placeholders will be replaced with preview data" ) )
116
118 .Name( "plEditor.EditorControl.LayoutEditMode" )
119 .Scope( AS_GLOBAL )
120 .FriendlyName( _( "Show Title Block in Edit Mode" ) )
121 .Tooltip( _( "Text placeholders are shown as ${keyword} tokens" ) )
123
124
125// PL_SELECTION_TOOL
126//
128 .Name( "plEditor.InteractiveSelection" )
129 .Scope( AS_GLOBAL )
130 .Flags( AF_ACTIVATE ) );
131
133 .Name( "plEditor.InteractiveSelection.SelectionMenu" )
134 .Scope( AS_GLOBAL ) );
135
137 .Name( "plEditor.InteractiveSelection.AddItemToSel" )
138 .Scope( AS_GLOBAL ) );
139
141 .Name( "plEditor.InteractiveSelection.AddItemsToSel" )
142 .Scope( AS_GLOBAL ) );
143
145 .Name( "plEditor.InteractiveSelection.RemoveItemFromSel" )
146 .Scope( AS_GLOBAL ) );
147
149 .Name( "plEditor.InteractiveSelection.RemoveItemsFromSel" )
150 .Scope( AS_GLOBAL ) );
151
153 .Name( "plEditor.InteractiveSelection.ClearSelection" )
154 .Scope( AS_GLOBAL ) );
155
156
@ pagelayout_normal_view_mode
@ add_rectangle
@ pagelayout_special_view_mode
@ add_graphical_segments
static TOOL_ACTION clearSelection
Clear the current selection.
Definition: pl_actions.h:43
static TOOL_ACTION placeImage
Definition: pl_actions.h:59
static TOOL_ACTION selectionActivate
Activation of the selection tool.
Definition: pl_actions.h:40
static TOOL_ACTION selectionMenu
Run a selection menu to select from a list of items.
Definition: pl_actions.h:54
static TOOL_ACTION drawRectangle
Definition: pl_actions.h:60
static TOOL_ACTION showInspector
Definition: pl_actions.h:72
static TOOL_ACTION previewSettings
Definition: pl_actions.h:73
static TOOL_ACTION removeItemFromSel
Definition: pl_actions.h:47
static TOOL_ACTION layoutNormalMode
Definition: pl_actions.h:67
static TOOL_ACTION addItemsToSel
Select a list of items (specified as the event parameter)
Definition: pl_actions.h:50
static TOOL_ACTION removeItemsFromSel
Definition: pl_actions.h:51
static TOOL_ACTION addItemToSel
Select an item (specified as the event parameter).
Definition: pl_actions.h:46
static TOOL_ACTION placeText
Definition: pl_actions.h:58
static TOOL_ACTION layoutEditMode
Definition: pl_actions.h:68
static TOOL_ACTION appendImportedDrawingSheet
Definition: pl_actions.h:62
static TOOL_ACTION move
Definition: pl_actions.h:65
static TOOL_ACTION drawLine
Definition: pl_actions.h:61
Build up the properties of a TOOL_ACTION in an incremental manner that is static-construction safe.
Definition: tool_action.h:102
Represent a single user action.
Definition: tool_action.h:269
#define _(s)
Definition: pl_actions.cpp:37
@ AS_GLOBAL
Global action (toolbar/main menu event, global shortcut)
Definition: tool_action.h:48
@ AF_ACTIVATE
Action activates a tool.
Definition: tool_action.h:55