.
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 ThemeTools : ToolCollection {
21 public static Gee.ArrayList<Expander> expanders;
22 public static ColorPicker color_picker;
23
24 public ThemeTools () {
25 expanders = new Gee.ArrayList<Expander> ();
26
27 Expander font_name = new Expander ();
28 font_name.add_tool (new FontName ());
29
30 Expander color_tools = new Expander (t_("Color"));
31 color_picker = new ColorPicker ();
32
33 color_picker.fill_color_updated.connect (() => {
34 Color c = color_picker.get_fill_color ();
35 ThemeTab.get_instance ().color_updated (c);
36 });
37
38 color_tools.add_tool (color_picker);
39
40 expanders.add (font_name);
41 expanders.add (color_tools);
42 }
43
44 public override Gee.ArrayList<string> get_displays () {
45 Gee.ArrayList<string> d = new Gee.ArrayList<string> ();
46 return d;
47 }
48
49 public override Gee.ArrayList<Expander> get_expanders () {
50 return expanders;
51 }
52 }
53
54 }
55