.
1 /*
2 Copyright (C) 2015 Johan Mattsson
3
4 This library is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 3 of the
7 License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13 */
14
15 using Cairo;
16 using Math;
17
18 namespace BirdFont {
19
20 public class HiddenTools : ToolCollection {
21
22 public Gee.ArrayList<Expander> expanders;
23
24 public HiddenTools () {
25 Expander hidden_expander = new Expander ();
26 expanders = new Gee.ArrayList<Expander> ();
27
28 Tool zoom_in = new Tool ("zoom_in", t_("Zoom in"));
29 zoom_in.select_action.connect ((self) => {
30 DrawingTools.zoom_tool.store_current_view ();
31 GlyphCanvas.current_display.zoom_in ();
32 });
33 hidden_expander.add_tool (zoom_in);
34
35 Tool zoom_out = new Tool ("zoom_out", t_("Zoom out"));
36 zoom_out.select_action.connect ((self) => {
37 DrawingTools.zoom_tool.store_current_view ();
38 GlyphCanvas.current_display.zoom_out ();
39 });
40 hidden_expander.add_tool (zoom_out);
41
42 expanders.add (hidden_expander);
43 }
44
45 public override Gee.ArrayList<Expander> get_expanders () {
46 return expanders;
47 }
48 }
49
50 }
51