@@ -44,47 +44,6 @@ impl PropertyHolder for MenuBarMessageHandler {
44
44
action: MenuEntry :: create_action( |_| PortfolioMessage :: OpenDocument . into( ) ) ,
45
45
..MenuEntry :: default ( )
46
46
} ,
47
- MenuEntry {
48
- label: "Open Recent" . into( ) ,
49
- shortcut: None ,
50
- action: MenuEntry :: no_action( ) ,
51
- icon: None ,
52
- children: MenuEntryGroups ( vec![
53
- vec![
54
- MenuEntry {
55
- label: "Reopen Last Closed" . into( ) ,
56
- // shortcut: [Key::KeyControl, Key::KeyShift, Key::KeyT],
57
- ..MenuEntry :: default ( )
58
- } ,
59
- MenuEntry {
60
- label: "Clear Recently Opened" . into( ) ,
61
- ..MenuEntry :: default ( )
62
- } ,
63
- ] ,
64
- vec![
65
- MenuEntry {
66
- label: "Some Recent File.gdd" . into( ) ,
67
- ..MenuEntry :: default ( )
68
- } ,
69
- MenuEntry {
70
- label: "Another Recent File.gdd" . into( ) ,
71
- ..MenuEntry :: default ( )
72
- } ,
73
- MenuEntry {
74
- label: "An Older File.gdd" . into( ) ,
75
- ..MenuEntry :: default ( )
76
- } ,
77
- MenuEntry {
78
- label: "Some Other Older File.gdd" . into( ) ,
79
- ..MenuEntry :: default ( )
80
- } ,
81
- MenuEntry {
82
- label: "Yet Another Older File.gdd" . into( ) ,
83
- ..MenuEntry :: default ( )
84
- } ,
85
- ] ,
86
- ] ) ,
87
- } ,
88
47
] ,
89
48
vec![
90
49
MenuEntry {
@@ -100,29 +59,12 @@ impl PropertyHolder for MenuBarMessageHandler {
100
59
..MenuEntry :: default ( )
101
60
} ,
102
61
] ,
103
- vec![
104
- MenuEntry {
105
- label: "Save" . into( ) ,
106
- shortcut: action_keys!( DocumentMessageDiscriminant :: SaveDocument ) ,
107
- action: MenuEntry :: create_action( |_| DocumentMessage :: SaveDocument . into( ) ) ,
108
- ..MenuEntry :: default ( )
109
- } ,
110
- MenuEntry {
111
- label: "Save As…" . into( ) ,
112
- // shortcut: [Key::KeyControl, Key::KeyShift, Key::KeyS],
113
- ..MenuEntry :: default ( )
114
- } ,
115
- MenuEntry {
116
- label: "Save All" . into( ) ,
117
- // shortcut: [Key::KeyControl, Key::KeyAlt, Key::KeyS],
118
- ..MenuEntry :: default ( )
119
- } ,
120
- MenuEntry {
121
- label: "Auto-Save" . into( ) ,
122
- icon: Some ( "CheckboxChecked" . into( ) ) ,
123
- ..MenuEntry :: default ( )
124
- } ,
125
- ] ,
62
+ vec![ MenuEntry {
63
+ label: "Save" . into( ) ,
64
+ shortcut: action_keys!( DocumentMessageDiscriminant :: SaveDocument ) ,
65
+ action: MenuEntry :: create_action( |_| DocumentMessage :: SaveDocument . into( ) ) ,
66
+ ..MenuEntry :: default ( )
67
+ } ] ,
126
68
vec![
127
69
MenuEntry {
128
70
label: "Import…" . into( ) ,
@@ -137,11 +79,6 @@ impl PropertyHolder for MenuBarMessageHandler {
137
79
..MenuEntry :: default ( )
138
80
} ,
139
81
] ,
140
- vec![ MenuEntry {
141
- label: "Quit" . into( ) ,
142
- // shortcut: [Key::KeyControl, Key::KeyQ],
143
- ..MenuEntry :: default ( )
144
- } ] ,
145
82
] ) ,
146
83
} ,
147
84
MenuColumn {
@@ -187,20 +124,49 @@ impl PropertyHolder for MenuBarMessageHandler {
187
124
} ,
188
125
MenuColumn {
189
126
label: "Layer" . into( ) ,
190
- children: MenuEntryGroups ( vec![ vec![
191
- MenuEntry {
192
- label: "Select All" . into( ) ,
193
- shortcut: action_keys!( DocumentMessageDiscriminant :: SelectAllLayers ) ,
194
- action: MenuEntry :: create_action( |_| DocumentMessage :: SelectAllLayers . into( ) ) ,
195
- ..MenuEntry :: default ( )
196
- } ,
197
- MenuEntry {
198
- label: "Deselect All" . into( ) ,
199
- shortcut: action_keys!( DocumentMessageDiscriminant :: DeselectAllLayers ) ,
200
- action: MenuEntry :: create_action( |_| DocumentMessage :: DeselectAllLayers . into( ) ) ,
127
+ children: MenuEntryGroups ( vec![
128
+ vec![
129
+ MenuEntry {
130
+ label: "Select All" . into( ) ,
131
+ shortcut: action_keys!( DocumentMessageDiscriminant :: SelectAllLayers ) ,
132
+ action: MenuEntry :: create_action( |_| DocumentMessage :: SelectAllLayers . into( ) ) ,
133
+ ..MenuEntry :: default ( )
134
+ } ,
135
+ MenuEntry {
136
+ label: "Deselect All" . into( ) ,
137
+ shortcut: action_keys!( DocumentMessageDiscriminant :: DeselectAllLayers ) ,
138
+ action: MenuEntry :: create_action( |_| DocumentMessage :: DeselectAllLayers . into( ) ) ,
139
+ ..MenuEntry :: default ( )
140
+ } ,
141
+ ] ,
142
+ vec![ MenuEntry {
143
+ label: "Delete Selected" . into( ) ,
144
+ icon: Some ( "Trash" . into( ) ) ,
145
+ shortcut: action_keys!( DocumentMessageDiscriminant :: DeleteSelectedLayers ) ,
146
+ action: MenuEntry :: create_action( |_| DocumentMessage :: DeleteSelectedLayers . into( ) ) ,
201
147
..MenuEntry :: default ( )
202
- } ,
203
- MenuEntry {
148
+ } ] ,
149
+ vec![
150
+ MenuEntry {
151
+ label: "Grab Selected" . into( ) ,
152
+ shortcut: action_keys!( TransformLayerMessageDiscriminant :: BeginGrab ) ,
153
+ action: MenuEntry :: create_action( |_| TransformLayerMessage :: BeginGrab . into( ) ) ,
154
+ ..MenuEntry :: default ( )
155
+ } ,
156
+ MenuEntry {
157
+ label: "Rotate Selected" . into( ) ,
158
+ shortcut: action_keys!( TransformLayerMessageDiscriminant :: BeginRotate ) ,
159
+ action: MenuEntry :: create_action( |_| TransformLayerMessage :: BeginRotate . into( ) ) ,
160
+ ..MenuEntry :: default ( )
161
+ } ,
162
+ MenuEntry {
163
+ label: "Scale Selected" . into( ) ,
164
+ shortcut: action_keys!( TransformLayerMessageDiscriminant :: BeginScale ) ,
165
+ action: MenuEntry :: create_action( |_| TransformLayerMessage :: BeginScale . into( ) ) ,
166
+ ..MenuEntry :: default ( )
167
+ } ,
168
+ ] ,
169
+ vec![ MenuEntry {
204
170
label: "Order" . into( ) ,
205
171
action: MenuEntry :: no_action( ) ,
206
172
children: MenuEntryGroups ( vec![ vec![
@@ -230,23 +196,46 @@ impl PropertyHolder for MenuBarMessageHandler {
230
196
} ,
231
197
] ] ) ,
232
198
..MenuEntry :: default ( )
233
- } ,
234
- ] ] ) ,
199
+ } ] ,
200
+ ] ) ,
235
201
} ,
236
202
MenuColumn {
237
203
label: "Document" . into( ) ,
238
204
children: MenuEntryGroups ( vec![ vec![ MenuEntry {
239
- label: "Menu entries coming soon" . into( ) ,
205
+ label: "Clear Artboards" . into( ) ,
206
+ action: MenuEntry :: create_action( |_| ArtboardMessage :: ClearArtboards . into( ) ) ,
240
207
..MenuEntry :: default ( )
241
208
} ] ] ) ,
242
209
} ,
243
210
MenuColumn {
244
211
label: "View" . into( ) ,
245
- children: MenuEntryGroups ( vec![ vec![ MenuEntry {
246
- label: "Show/Hide Node Graph (In Development)" . into( ) ,
247
- action: MenuEntry :: create_action( |_| WorkspaceMessage :: NodeGraphToggleVisibility . into( ) ) ,
248
- ..MenuEntry :: default ( )
249
- } ] ] ) ,
212
+ children: MenuEntryGroups ( vec![
213
+ vec![
214
+ MenuEntry {
215
+ label: "Zoom to Fit" . into( ) ,
216
+ shortcut: action_keys!( DocumentMessageDiscriminant :: ZoomCanvasToFitAll ) ,
217
+ action: MenuEntry :: create_action( |_| DocumentMessage :: ZoomCanvasToFitAll . into( ) ) ,
218
+ ..MenuEntry :: default ( )
219
+ } ,
220
+ MenuEntry {
221
+ label: "Zoom to 100%" . into( ) ,
222
+ shortcut: action_keys!( DocumentMessageDiscriminant :: ZoomCanvasTo100Percent ) ,
223
+ action: MenuEntry :: create_action( |_| DocumentMessage :: ZoomCanvasTo100Percent . into( ) ) ,
224
+ ..MenuEntry :: default ( )
225
+ } ,
226
+ MenuEntry {
227
+ label: "Zoom to 200%" . into( ) ,
228
+ shortcut: action_keys!( DocumentMessageDiscriminant :: ZoomCanvasTo200Percent ) ,
229
+ action: MenuEntry :: create_action( |_| DocumentMessage :: ZoomCanvasTo200Percent . into( ) ) ,
230
+ ..MenuEntry :: default ( )
231
+ } ,
232
+ ] ,
233
+ vec![ MenuEntry {
234
+ label: "Node Graph (In Development)" . into( ) ,
235
+ action: MenuEntry :: create_action( |_| WorkspaceMessage :: NodeGraphToggleVisibility . into( ) ) ,
236
+ ..MenuEntry :: default ( )
237
+ } ] ,
238
+ ] ) ,
250
239
} ,
251
240
MenuColumn {
252
241
label: "Help" . into( ) ,
0 commit comments