Ver Fonte

tools: everything is public

Daniele Bartolini há 3 meses atrás
pai
commit
f8510cdfba
35 ficheiros alterados com 414 adições e 414 exclusões
  1. 2 2
      tools/core/console_client.vala
  2. 24 24
      tools/core/database.vala
  3. 6 6
      tools/level_editor/data_compiler.vala
  4. 2 2
      tools/level_editor/deploy_dialog.vala
  5. 174 174
      tools/level_editor/level_editor.vala
  6. 13 13
      tools/level_editor/level_layers_tree_view.vala
  7. 24 24
      tools/level_editor/level_tree_view.vala
  8. 4 4
      tools/level_editor/preferences_dialog.vala
  9. 37 37
      tools/level_editor/project_browser.vala
  10. 8 8
      tools/level_editor/project_store.vala
  11. 16 16
      tools/level_editor/properties_view.vala
  12. 7 7
      tools/level_editor/resource_chooser.vala
  13. 1 1
      tools/level_editor/texture_settings_dialog.vala
  14. 5 5
      tools/level_editor/toolbar.vala
  15. 3 3
      tools/resource/font_resource.vala
  16. 2 2
      tools/resource/mesh.vala
  17. 2 2
      tools/resource/sprite_resource.vala
  18. 1 1
      tools/widgets/clamp.vala
  19. 10 10
      tools/widgets/console_view.vala
  20. 37 37
      tools/widgets/editor_view.vala
  21. 2 2
      tools/widgets/entry_search.vala
  22. 1 1
      tools/widgets/expander.vala
  23. 1 1
      tools/widgets/input_angle.vala
  24. 1 1
      tools/widgets/input_bool.vala
  25. 2 2
      tools/widgets/input_color3.vala
  26. 7 7
      tools/widgets/input_double.vala
  27. 2 2
      tools/widgets/input_enum.vala
  28. 1 1
      tools/widgets/input_file.vala
  29. 1 1
      tools/widgets/input_quaternion.vala
  30. 6 6
      tools/widgets/input_resource.vala
  31. 6 6
      tools/widgets/input_string.vala
  32. 1 1
      tools/widgets/input_vector2.vala
  33. 1 1
      tools/widgets/input_vector3.vala
  34. 1 1
      tools/widgets/input_vector4.vala
  35. 3 3
      tools/widgets/select_resource_dialog.vala

+ 2 - 2
tools/core/console_client.vala

@@ -8,7 +8,7 @@ namespace Crown
 /// Manages communication with engine executable.
 public class ConsoleClient : GLib.Object
 {
-	private SocketConnection _connection;
+	public SocketConnection _connection;
 
 	// Signals
 	public signal void connected(string address, int port);
@@ -85,7 +85,7 @@ public class ConsoleClient : GLib.Object
 		_connection.input_stream.read_bytes_async.begin(4, GLib.Priority.DEFAULT, null, on_read);
 	}
 
-	private void on_read(Object? obj, AsyncResult ar)
+	public void on_read(Object? obj, AsyncResult ar)
 	{
 		try {
 			InputStream input_stream = (InputStream)obj;

+ 24 - 24
tools/core/database.vala

@@ -445,10 +445,10 @@ public struct ObjectTypeInfo
 
 public class Database
 {
-	private static bool _debug = false;
-	private static bool _debug_getters = false;
+	public static bool _debug = false;
+	public static bool _debug_getters = false;
 
-	private enum Action
+	public enum Action
 	{
 		CREATE,
 		DESTROY,
@@ -465,10 +465,10 @@ public class Database
 
 	// Data
 	private PropertyDefinition[] _property_definitions;
-	private Gee.HashMap<StringId64?, ObjectTypeInfo?> _object_definitions;
-	private Gee.HashMap<Guid?, Gee.HashMap<string, Value?>> _data;
-	private UndoRedo? _undo_redo;
-	private UndoRedo? _undo_redo_restore;
+	public Gee.HashMap<StringId64?, ObjectTypeInfo?> _object_definitions;
+	public Gee.HashMap<Guid?, Gee.HashMap<string, Value?>> _data;
+	public UndoRedo? _undo_redo;
+	public UndoRedo? _undo_redo_restore;
 	public Project _project;
 	// The number of changes to the database since the last successful state
 	// synchronization (load(), save() etc.). If it is less than 0, the changes
@@ -629,12 +629,12 @@ public class Database
 	}
 
 	/// Encodes the object @a id into SJSON object.
-	private Hashtable encode(Guid id)
+	public Hashtable encode(Guid id)
 	{
 		return encode_object(id, get_data(id));
 	}
 
-	private static bool is_valid_value(Value? value)
+	public static bool is_valid_value(Value? value)
 	{
 		return value == null
 			|| value.holds(typeof(bool))
@@ -646,7 +646,7 @@ public class Database
 			;
 	}
 
-	private static bool is_valid_key(string key)
+	public static bool is_valid_key(string key)
 	{
 		return key.length > 0
 			&& !key.has_prefix(".")
@@ -654,7 +654,7 @@ public class Database
 			;
 	}
 
-	private static string value_to_string(Value? value)
+	public static string value_to_string(Value? value)
 	{
 		if (value == null)
 			return "null";
@@ -676,7 +676,7 @@ public class Database
 		return "<invalid>";
 	}
 
-	private void decode_object(Guid id, Guid owner_id, string db_key, Hashtable json)
+	public void decode_object(Guid id, Guid owner_id, string db_key, Hashtable json)
 	{
 		string old_db = db_key;
 		string k = db_key;
@@ -718,7 +718,7 @@ public class Database
 		}
 	}
 
-	private void decode_set(Guid owner_id, string key, Gee.ArrayList<Value?> json)
+	public void decode_set(Guid owner_id, string key, Gee.ArrayList<Value?> json)
 	{
 		// Set should be created even if it is empty.
 		create_empty_set(owner_id, key);
@@ -787,7 +787,7 @@ public class Database
 		}
 	}
 
-	private Value? decode_value(Value? value)
+	public Value? decode_value(Value? value)
 	{
 		if (value.holds(typeof(Gee.ArrayList))) {
 			Gee.ArrayList<Value?> al = (Gee.ArrayList<Value?>)value;
@@ -815,7 +815,7 @@ public class Database
 		}
 	}
 
-	private Hashtable encode_object_compat(Guid id, Gee.HashMap<string, Value?> db)
+	public Hashtable encode_object_compat(Guid id, Gee.HashMap<string, Value?> db)
 	{
 		Hashtable obj = new Hashtable();
 		if (id != GUID_ZERO)
@@ -849,7 +849,7 @@ public class Database
 		return obj;
 	}
 
-	private Hashtable encode_object(Guid id, Gee.HashMap<string, Value?> db)
+	public Hashtable encode_object(Guid id, Gee.HashMap<string, Value?> db)
 	{
 		string type = object_type(id);
 		PropertyDefinition[]? properties = object_definition(StringId64(type));
@@ -893,7 +893,7 @@ public class Database
 		return obj;
 	}
 
-	private Value? encode_value(Value? value)
+	public Value? encode_value(Value? value)
 	{
 		assert(is_valid_value(value) || value.holds(typeof(Gee.HashSet)));
 
@@ -927,14 +927,14 @@ public class Database
 		}
 	}
 
-	private Gee.HashMap<string, Value?> get_data(Guid id)
+	public Gee.HashMap<string, Value?> get_data(Guid id)
 	{
 		assert(has_object(id));
 
 		return _data[id];
 	}
 
-	private void create_internal(int dir, Guid id)
+	public void create_internal(int dir, Guid id)
 	{
 		assert(id != GUID_ZERO);
 
@@ -946,7 +946,7 @@ public class Database
 		_distance_from_last_sync += dir;
 	}
 
-	private void destroy_internal(int dir, Guid id)
+	public void destroy_internal(int dir, Guid id)
 	{
 		assert(id != GUID_ZERO);
 		assert(has_object(id));
@@ -983,7 +983,7 @@ public class Database
 		ob[key] = new Gee.HashSet<Guid?>(Guid.hash_func, Guid.equal_func);
 	}
 
-	private void add_to_set_internal(int dir, Guid id, string key, Guid item_id)
+	public void add_to_set_internal(int dir, Guid id, string key, Guid item_id)
 	{
 		assert(has_object(id));
 		assert(is_valid_key(key));
@@ -1006,7 +1006,7 @@ public class Database
 		_distance_from_last_sync += dir;
 	}
 
-	private void remove_from_set_internal(int dir, Guid id, string key, Guid item_id)
+	public void remove_from_set_internal(int dir, Guid id, string key, Guid item_id)
 	{
 		assert(has_object(id));
 		assert(is_valid_key(key));
@@ -1527,7 +1527,7 @@ public class Database
 
 	// Tries to read a restore point @a rp from the @a stack and returns
 	// 0 if successful.
-	private int try_read_restore_point(ref RestorePoint rp, Stack stack)
+	public int try_read_restore_point(ref RestorePoint rp, Stack stack)
 	{
 		if (stack.size() < sizeof(Action) + sizeof(RestorePointHeader))
 			return -1;
@@ -1609,7 +1609,7 @@ public class Database
 		return (int)rp.header.id;
 	}
 
-	private void undo_or_redo(Stack undo, Stack redo, uint32 restore_point_size)
+	public void undo_or_redo(Stack undo, Stack redo, uint32 restore_point_size)
 	{
 		assert(undo.size() >= restore_point_size);
 

+ 6 - 6
tools/level_editor/data_compiler.vala

@@ -7,12 +7,12 @@ namespace Crown
 {
 public class DataCompiler
 {
-	private RuntimeInstance _runtime;
-	private Guid _id;
-	private bool _success;
-	private SourceFunc _compile_callback;
-	private SourceFunc _refresh_list_callback;
-	private Gee.ArrayList<Value?> _refresh_list;
+	public RuntimeInstance _runtime;
+	public Guid _id;
+	public bool _success;
+	public SourceFunc _compile_callback;
+	public SourceFunc _refresh_list_callback;
+	public Gee.ArrayList<Value?> _refresh_list;
 	public uint _revision;
 
 	public signal void start();

+ 2 - 2
tools/level_editor/deploy_dialog.vala

@@ -95,7 +95,7 @@ public class DeployerPage : Gtk.Box
 		this.map.connect(on_map);
 	}
 
-	private void on_map()
+	public void on_map()
 	{
 		if (_check_config != null) {
 			if (_check_config() != 0)
@@ -534,7 +534,7 @@ public class DeployDialog : Gtk.Window
 		this.add(_notebook);
 	}
 
-	private bool on_key_pressed(uint keyval, uint keycode, Gdk.ModifierType state)
+	public bool on_key_pressed(uint keyval, uint keycode, Gdk.ModifierType state)
 	{
 		if (keyval == Gdk.Key.Escape)
 			this.close();

Diff do ficheiro suprimidas por serem muito extensas
+ 174 - 174
tools/level_editor/level_editor.vala


+ 13 - 13
tools/level_editor/level_layers_tree_view.vala

@@ -7,24 +7,24 @@ namespace Crown
 {
 public class LevelLayersTreeView : Gtk.Box
 {
-	private enum ItemFlags
+	public enum ItemFlags
 	{
 		VISIBLE = 1,
 		LOCKED  = 2
 	}
 
 	// Data
-	private Level _level;
-	private Database _db;
+	public Level _level;
+	public Database _db;
 
 	// Widgets
-	private EntrySearch _filter_entry;
-	private Gtk.ListStore _list_store;
-	private Gtk.TreeModelFilter _tree_filter;
-	private Gtk.TreeView _tree_view;
-	private Gtk.GestureMultiPress _tree_view_gesture_click;
-	private Gtk.TreeSelection _tree_selection;
-	private Gtk.ScrolledWindow _scrolled_window;
+	public EntrySearch _filter_entry;
+	public Gtk.ListStore _list_store;
+	public Gtk.TreeModelFilter _tree_filter;
+	public Gtk.TreeView _tree_view;
+	public Gtk.GestureMultiPress _tree_view_gesture_click;
+	public Gtk.TreeSelection _tree_selection;
+	public Gtk.ScrolledWindow _scrolled_window;
 
 	public LevelLayersTreeView(Database db, Level level)
 	{
@@ -79,12 +79,12 @@ public class LevelLayersTreeView : Gtk.Box
 		this.pack_start(_scrolled_window, true, true, 0);
 	}
 
-	private void on_button_pressed(int n_press, double x, double y)
+	public void on_button_pressed(int n_press, double x, double y)
 	{
 		return;
 	}
 
-	private bool filter_tree(Gtk.TreeModel model, Gtk.TreeIter iter)
+	public bool filter_tree(Gtk.TreeModel model, Gtk.TreeIter iter)
 	{
 		Value val;
 		model.get_value(iter, 2, out val);
@@ -99,7 +99,7 @@ public class LevelLayersTreeView : Gtk.Box
 		return false;
 	}
 
-	private void on_filter_entry_text_changed()
+	public void on_filter_entry_text_changed()
 	{
 		_tree_filter.refilter();
 	}

+ 24 - 24
tools/level_editor/level_tree_view.vala

@@ -7,7 +7,7 @@ namespace Crown
 {
 public class LevelTreeView : Gtk.Box
 {
-	private enum ItemType
+	public enum ItemType
 	{
 		FOLDER,
 		CAMERA,
@@ -16,7 +16,7 @@ public class LevelTreeView : Gtk.Box
 		UNIT
 	}
 
-	private enum Column
+	public enum Column
 	{
 		TYPE,
 		GUID,
@@ -54,24 +54,24 @@ public class LevelTreeView : Gtk.Box
 	}
 
 	// Data
-	private Level _level;
-	private Database _db;
+	public Level _level;
+	public Database _db;
 
 	// Widgets
-	private string _needle;
-	private EntrySearch _filter_entry;
-	private Gtk.TreeStore _tree_store;
-	private Gtk.TreeModelFilter _tree_filter;
-	private Gtk.TreeModelSort _tree_sort;
-	private Gtk.TreeView _tree_view;
-	private Gtk.TreeSelection _tree_selection;
-	private Gtk.ScrolledWindow _scrolled_window;
-	private Gtk.Box _sort_items_box;
-	private Gtk.Popover _sort_items_popover;
-	private Gtk.MenuButton _sort_items;
-	private Gtk.GestureMultiPress _gesture_click;
-	private Gtk.TreeRowReference _units_root;
-	private Gtk.TreeRowReference _sounds_root;
+	public string _needle;
+	public EntrySearch _filter_entry;
+	public Gtk.TreeStore _tree_store;
+	public Gtk.TreeModelFilter _tree_filter;
+	public Gtk.TreeModelSort _tree_sort;
+	public Gtk.TreeView _tree_view;
+	public Gtk.TreeSelection _tree_selection;
+	public Gtk.ScrolledWindow _scrolled_window;
+	public Gtk.Box _sort_items_box;
+	public Gtk.Popover _sort_items_popover;
+	public Gtk.MenuButton _sort_items;
+	public Gtk.GestureMultiPress _gesture_click;
+	public Gtk.TreeRowReference _units_root;
+	public Gtk.TreeRowReference _sounds_root;
 
 	public LevelTreeView(Database db, Level level)
 	{
@@ -184,7 +184,7 @@ public class LevelTreeView : Gtk.Box
 		this.pack_start(_scrolled_window, true, true, 0);
 	}
 
-	private void on_button_pressed(int n_press, double x, double y)
+	public void on_button_pressed(int n_press, double x, double y)
 	{
 		if (_gesture_click.get_current_button() == Gdk.BUTTON_SECONDARY) {
 			int bx;
@@ -261,7 +261,7 @@ public class LevelTreeView : Gtk.Box
 		}
 	}
 
-	private void on_tree_selection_changed()
+	public void on_tree_selection_changed()
 	{
 		_level.selection_changed.disconnect(on_level_selection_changed);
 
@@ -281,7 +281,7 @@ public class LevelTreeView : Gtk.Box
 		_level.selection_changed.connect(on_level_selection_changed);
 	}
 
-	private void on_level_selection_changed(Gee.ArrayList<Guid?> selection)
+	public void on_level_selection_changed(Gee.ArrayList<Guid?> selection)
 	{
 		_tree_selection.changed.disconnect(on_tree_selection_changed);
 		_tree_selection.unselect_all();
@@ -346,7 +346,7 @@ public class LevelTreeView : Gtk.Box
 		}
 	}
 
-	private ItemType item_type(Unit u)
+	public ItemType item_type(Unit u)
 	{
 		if (u.is_light())
 			return ItemType.LIGHT;
@@ -549,7 +549,7 @@ public class LevelTreeView : Gtk.Box
 		}
 	}
 
-	private void remove_item(Guid id, Gtk.TreeIter parent_iter)
+	public void remove_item(Guid id, Gtk.TreeIter parent_iter)
 	{
 		Gtk.TreeIter child;
 
@@ -569,7 +569,7 @@ public class LevelTreeView : Gtk.Box
 		}
 	}
 
-	private Gtk.RadioButton add_sort_item(Gtk.RadioButton? group, SortMode mode)
+	public Gtk.RadioButton add_sort_item(Gtk.RadioButton? group, SortMode mode)
 	{
 		var button = new Gtk.RadioButton.with_label_from_widget(group, mode.to_label());
 		button.toggled.connect(() => {

+ 4 - 4
tools/level_editor/preferences_dialog.vala

@@ -157,7 +157,7 @@ public class PreferencesDialog : Gtk.Window
 		this.add(_notebook);
 	}
 
-	private bool on_key_pressed(uint keyval, uint keycode, Gdk.ModifierType state)
+	public bool on_key_pressed(uint keyval, uint keycode, Gdk.ModifierType state)
 	{
 		if (keyval == Gdk.Key.Escape)
 			this.close();
@@ -165,7 +165,7 @@ public class PreferencesDialog : Gtk.Window
 		return Gdk.EVENT_PROPAGATE;
 	}
 
-	private void on_color_set()
+	public void on_color_set()
 	{
 		_editor.send_script(LevelEditorApi.set_color("grid", _grid_color_button.value));
 		_editor.send_script(LevelEditorApi.set_color("grid_disabled", _grid_disabled_color_button.value));
@@ -176,13 +176,13 @@ public class PreferencesDialog : Gtk.Window
 		_editor.send(DeviceApi.frame());
 	}
 
-	private void on_gizmo_size_value_changed()
+	public void on_gizmo_size_value_changed()
 	{
 		_editor.send_script("Gizmo.size = %f".printf(_gizmo_size_spin_button.value));
 		_editor.send(DeviceApi.frame());
 	}
 
-	private void on_level_autosave_value_changed()
+	public void on_level_autosave_value_changed()
 	{
 		var app = (LevelEditorApplication)GLib.Application.get_default();
 		app.set_autosave_timer((uint)_level_autosave_spin_button.value);

+ 37 - 37
tools/level_editor/project_browser.vala

@@ -10,7 +10,7 @@ public const Gtk.TargetEntry[] dnd_targets =
 	{ "RESOURCE_PATH", Gtk.TargetFlags.SAME_APP, 0 },
 };
 
-private string project_path(string type, string name)
+public string project_path(string type, string name)
 {
 	if (type == "<folder>")
 		return name;
@@ -19,7 +19,7 @@ private string project_path(string type, string name)
 }
 
 // Menu to open when clicking on project's files and folders.
-private GLib.Menu? project_entry_menu_create(string type, string name)
+public GLib.Menu? project_entry_menu_create(string type, string name)
 {
 	GLib.Menu menu = new GLib.Menu();
 	GLib.MenuItem mi;
@@ -116,7 +116,7 @@ private GLib.Menu? project_entry_menu_create(string type, string name)
 }
 
 // Menu to open when clicking on favorites' entries.
-private GLib.Menu? favorites_entry_menu_create(string type, string name)
+public GLib.Menu? favorites_entry_menu_create(string type, string name)
 {
 	GLib.Menu menu = new GLib.Menu();
 	GLib.MenuItem mi;
@@ -149,7 +149,7 @@ private GLib.Menu? favorites_entry_menu_create(string type, string name)
 	return menu;
 }
 
-private void set_thumbnail(Gtk.CellRenderer cell, string type, string name, int icon_size, ThumbnailCache thumbnail_cache)
+public void set_thumbnail(Gtk.CellRenderer cell, string type, string name, int icon_size, ThumbnailCache thumbnail_cache)
 {
 	// https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
 	if (type == "<folder>")
@@ -365,7 +365,7 @@ public class ProjectFolderView : Gtk.Box
 		_browse_mode = BrowseMode.REGULAR;
 	}
 
-	private void on_drag_data_get(Gdk.DragContext context, Gtk.SelectionData data, uint info, uint time_)
+	public void on_drag_data_get(Gdk.DragContext context, Gtk.SelectionData data, uint info, uint time_)
 	{
 		// https://valadoc.org/gtk+-3.0/Gtk.Widget.drag_data_get.html
 		Gtk.TreePath path;
@@ -380,19 +380,19 @@ public class ProjectFolderView : Gtk.Box
 		data.set(Gdk.Atom.intern_static_string("RESOURCE_PATH"), 8, resource_path.data);
 	}
 
-	private void on_drag_begin(Gdk.DragContext context)
+	public void on_drag_begin(Gdk.DragContext context)
 	{
 		// https://valadoc.org/gtk+-3.0/Gtk.Widget.drag_begin.html
 		Gtk.drag_set_icon_pixbuf(context, _empty_pixbuf, 0, 0);
 	}
 
-	private void on_drag_end(Gdk.DragContext context)
+	public void on_drag_end(Gdk.DragContext context)
 	{
 		// https://valadoc.org/gtk+-3.0/Gtk.Widget.drag_end.html
 		GLib.Application.get_default().activate_action("cancel-place", null);
 	}
 
-	private void on_drag_data_received(Gdk.DragContext context, int x, int y, Gtk.SelectionData selection_data, uint info, uint time_)
+	public void on_drag_data_received(Gdk.DragContext context, int x, int y, Gtk.SelectionData selection_data, uint info, uint time_)
 	{
 		if (_browse_mode == BrowseMode.SEARCH || !_showing_project_folder) {
 			Gtk.drag_finish(context, true, false, time_);
@@ -424,7 +424,7 @@ public class ProjectFolderView : Gtk.Box
 		Gtk.drag_finish(context, true, false, time_);
 	}
 
-	private bool on_button_pressed(uint button, int n_press, double x, double y)
+	public bool on_button_pressed(uint button, int n_press, double x, double y)
 	{
 		Gtk.TreePath? path = path_at_pos((int)x, (int)y);
 
@@ -486,7 +486,7 @@ public class ProjectFolderView : Gtk.Box
 		return Gdk.EVENT_PROPAGATE;
 	}
 
-	private void icon_view_pixbuf_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+	public void icon_view_pixbuf_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 	{
 		Value val;
 		string type;
@@ -499,7 +499,7 @@ public class ProjectFolderView : Gtk.Box
 		set_thumbnail(cell, type, name, 64, _thumbnail_cache);
 	}
 
-	private void icon_view_text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+	public void icon_view_text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 	{
 		Value type;
 		Value name;
@@ -512,7 +512,7 @@ public class ProjectFolderView : Gtk.Box
 			cell.set_property("text", GLib.Path.get_basename((string)name));
 	}
 
-	private void list_view_pixbuf_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+	public void list_view_pixbuf_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 	{
 		Value val;
 		string type;
@@ -525,7 +525,7 @@ public class ProjectFolderView : Gtk.Box
 		set_thumbnail(cell, type, name, 32, _thumbnail_cache);
 	}
 
-	private void list_view_basename_text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+	public void list_view_basename_text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 	{
 		Value name;
 		model.get_value(iter, ProjectStore.Column.NAME, out name);
@@ -536,7 +536,7 @@ public class ProjectFolderView : Gtk.Box
 			cell.set_property("text", GLib.Path.get_basename((string)name));
 	}
 
-	private void list_view_type_text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+	public void list_view_type_text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 	{
 		Value type;
 		model.get_value(iter, ProjectStore.Column.TYPE, out type);
@@ -544,7 +544,7 @@ public class ProjectFolderView : Gtk.Box
 		cell.set_property("text", prettify_type((string)type));
 	}
 
-	private void list_view_size_text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+	public void list_view_size_text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 	{
 		Value val;
 		model.get_value(iter, ProjectStore.Column.SIZE, out val);
@@ -556,7 +556,7 @@ public class ProjectFolderView : Gtk.Box
 			cell.set_property("text", "n/a");
 	}
 
-	private void list_view_mtime_text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+	public void list_view_mtime_text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 	{
 		Value type;
 		model.get_value(iter, ProjectStore.Column.MTIME, out type);
@@ -568,7 +568,7 @@ public class ProjectFolderView : Gtk.Box
 			cell.set_property("text", "n/a");
 	}
 
-	private void list_view_name_text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+	public void list_view_name_text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 	{
 		Value name;
 		model.get_value(iter, ProjectStore.Column.NAME, out name);
@@ -635,7 +635,7 @@ public class ProjectFolderView : Gtk.Box
 		}
 	}
 
-	private bool on_icon_view_query_tooltip(int x, int y, bool keyboard_tooltip, Gtk.Tooltip tooltip)
+	public bool on_icon_view_query_tooltip(int x, int y, bool keyboard_tooltip, Gtk.Tooltip tooltip)
 	{
 		int bx;
 		int by;
@@ -662,7 +662,7 @@ public class ProjectFolderView : Gtk.Box
 		return true;
 	}
 
-	private static string prettify_type(string type)
+	public static string prettify_type(string type)
 	{
 		if (type == "<folder>")
 			return "Folder";
@@ -670,7 +670,7 @@ public class ProjectFolderView : Gtk.Box
 			return type;
 	}
 
-	private static string prettify_size(uint64 size)
+	public static string prettify_size(uint64 size)
 	{
 		uint64 si_size;
 		string si_unit;
@@ -692,14 +692,14 @@ public class ProjectFolderView : Gtk.Box
 		return "%d %s".printf((int)si_size, si_unit);
 	}
 
-	private static string prettify_time(uint64 time)
+	public static string prettify_time(uint64 time)
 	{
 		int64 mtime_secs = (int64)(time / (1000*1000*1000));
 		GLib.DateTime date_time = new GLib.DateTime.from_unix_local(mtime_secs);
 		return date_time.format("%d %b %Y; %H:%M:%S");
 	}
 
-	private Gtk.TreePath? path_at_pos(int x, int y)
+	public Gtk.TreePath? path_at_pos(int x, int y)
 	{
 		Gtk.TreePath? path = null;
 		if (_stack.get_visible_child() == _icon_view_window) {
@@ -738,7 +738,7 @@ public class ProjectFolderView : Gtk.Box
 		}
 	}
 
-	private void resource_info_at_path(out uint64 size, out uint64 mtime, Gtk.TreePath? path)
+	public void resource_info_at_path(out uint64 size, out uint64 mtime, Gtk.TreePath? path)
 	{
 		if (path == null) {
 			size = 0;
@@ -767,7 +767,7 @@ public class ProjectFolderView : Gtk.Box
 		_browse_mode = mode;
 	}
 
-	private Gtk.TreePath path_and_model(out Gtk.TreeModel model, Gtk.TreePath? path)
+	public Gtk.TreePath path_and_model(out Gtk.TreeModel model, Gtk.TreePath? path)
 	{
 		model = _list_store;
 		return path;
@@ -1251,7 +1251,7 @@ public class ProjectBrowser : Gtk.Box
 		_filter_entry_tree.set_visible(!_show_folder_view);
 	}
 
-	private void on_drag_data_get(Gdk.DragContext context, Gtk.SelectionData data, uint info, uint time_)
+	public void on_drag_data_get(Gdk.DragContext context, Gtk.SelectionData data, uint info, uint time_)
 	{
 		// https://valadoc.org/gtk+-3.0/Gtk.Widget.drag_data_get.html
 		Gtk.TreeModel selected_model;
@@ -1271,13 +1271,13 @@ public class ProjectBrowser : Gtk.Box
 		data.set(Gdk.Atom.intern_static_string("RESOURCE_PATH"), 8, resource_path.data);
 	}
 
-	private void on_drag_begin(Gdk.DragContext context)
+	public void on_drag_begin(Gdk.DragContext context)
 	{
 		// https://valadoc.org/gtk+-3.0/Gtk.Widget.drag_begin.html
 		Gtk.drag_set_icon_pixbuf(context, _empty_pixbuf, 0, 0);
 	}
 
-	private void on_drag_end(Gdk.DragContext context)
+	public void on_drag_end(Gdk.DragContext context)
 	{
 		// https://valadoc.org/gtk+-3.0/Gtk.Widget.drag_end.html
 		GLib.Application.get_default().activate_action("cancel-place", null);
@@ -1353,7 +1353,7 @@ public class ProjectBrowser : Gtk.Box
 		_folder_view.select_resource(type, name);
 	}
 
-	private void on_open_directory(GLib.SimpleAction action, GLib.Variant? param)
+	public void on_open_directory(GLib.SimpleAction action, GLib.Variant? param)
 	{
 		string dir_name = param.get_string();
 
@@ -1376,7 +1376,7 @@ public class ProjectBrowser : Gtk.Box
 		}
 	}
 
-	private void on_favorite_resource(GLib.SimpleAction action, GLib.Variant? param)
+	public void on_favorite_resource(GLib.SimpleAction action, GLib.Variant? param)
 	{
 		string type = (string)param.get_child_value(0);
 		string name = (string)param.get_child_value(1);
@@ -1384,7 +1384,7 @@ public class ProjectBrowser : Gtk.Box
 		_project_store.add_to_favorites(type, name);
 	}
 
-	private void on_unfavorite_resource(GLib.SimpleAction action, GLib.Variant? param)
+	public void on_unfavorite_resource(GLib.SimpleAction action, GLib.Variant? param)
 	{
 		string type = (string)param.get_child_value(0);
 		string name = (string)param.get_child_value(1);
@@ -1392,7 +1392,7 @@ public class ProjectBrowser : Gtk.Box
 		_project_store.remove_from_favorites(type, name);
 	}
 
-	private void on_button_pressed(int n_press, double x, double y)
+	public void on_button_pressed(int n_press, double x, double y)
 	{
 		int bx;
 		int by;
@@ -1447,7 +1447,7 @@ public class ProjectBrowser : Gtk.Box
 		return;
 	}
 
-	private void update_folder_view()
+	public void update_folder_view()
 	{
 		_folder_list_store.clear();
 		_folder_view._list_store.clear();
@@ -1690,7 +1690,7 @@ public class ProjectBrowser : Gtk.Box
 		_tree_selection.select_path(sort_path);
 	}
 
-	private void pixbuf_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+	public void pixbuf_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 	{
 		Value val;
 		string type;
@@ -1703,7 +1703,7 @@ public class ProjectBrowser : Gtk.Box
 		set_thumbnail(cell, type, name, 16, _thumbnail_cache);
 	}
 
-	private void text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+	public void text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 	{
 		Value name;
 		Value type;
@@ -1724,7 +1724,7 @@ public class ProjectBrowser : Gtk.Box
 		}
 	}
 
-	private Gtk.RadioButton add_sort_item(Gtk.RadioButton? group, SortMode mode)
+	public Gtk.RadioButton add_sort_item(Gtk.RadioButton? group, SortMode mode)
 	{
 		var button = new Gtk.RadioButton.with_label_from_widget(group, mode.to_label());
 		button.toggled.connect(() => {
@@ -1736,7 +1736,7 @@ public class ProjectBrowser : Gtk.Box
 		return button;
 	}
 
-	private bool save_tree_state(Gtk.TreeModel model, Gtk.TreePath path, Gtk.TreeIter iter)
+	public bool save_tree_state(Gtk.TreeModel model, Gtk.TreePath path, Gtk.TreeIter iter)
 	{
 		Gtk.TreePath filter_path = _tree_filter.convert_child_path_to_path(path);
 		if (filter_path == null) {
@@ -1777,7 +1777,7 @@ public class ProjectBrowser : Gtk.Box
 		return false; // Continue iterating.
 	}
 
-	private bool restore_tree_state(Gtk.TreeModel model, Gtk.TreePath path, Gtk.TreeIter iter)
+	public bool restore_tree_state(Gtk.TreeModel model, Gtk.TreePath path, Gtk.TreeIter iter)
 	{
 		uint32 user_data;
 		Value val;

+ 8 - 8
tools/level_editor/project_store.vala

@@ -221,7 +221,7 @@ public class ProjectStore
 		}
 	}
 
-	private Gtk.TreeIter make_tree_internal(string folder, int start_index, Gtk.TreeRowReference parent)
+	public Gtk.TreeIter make_tree_internal(string folder, int start_index, Gtk.TreeRowReference parent)
 	{
 		// Folder can be:
 		// "", root folder
@@ -281,7 +281,7 @@ public class ProjectStore
 		}
 	}
 
-	private Gtk.TreeIter find_or_make_tree(string folder)
+	public Gtk.TreeIter find_or_make_tree(string folder)
 	{
 		if (_folders.has_key(folder)) {
 			Gtk.TreeIter iter;
@@ -292,7 +292,7 @@ public class ProjectStore
 		return make_tree_internal(folder, 0, _folders[ROOT_FOLDER]);
 	}
 
-	private void on_project_file_added(string type, string name, uint64 size, uint64 mtime)
+	public void on_project_file_added(string type, string name, uint64 size, uint64 mtime)
 	{
 		string parent_folder = ResourceId.parent_folder(name);
 
@@ -329,7 +329,7 @@ public class ProjectStore
 			);
 	}
 
-	private void on_project_file_changed(string type, string name, uint64 size, uint64 mtime)
+	public void on_project_file_changed(string type, string name, uint64 size, uint64 mtime)
 	{
 		string parent_folder = ResourceId.parent_folder(name);
 		Gtk.TreeIter child;
@@ -400,7 +400,7 @@ public class ProjectStore
 		}
 	}
 
-	private void on_project_file_removed(string type, string name)
+	public void on_project_file_removed(string type, string name)
 	{
 		string parent_folder = ResourceId.parent_folder(name);
 		Gtk.TreeIter child;
@@ -449,7 +449,7 @@ public class ProjectStore
 		}
 	}
 
-	private void on_project_tree_added(string name)
+	public void on_project_tree_added(string name)
 	{
 		Gtk.TreeIter iter;
 		_list_store.insert_with_values(out iter
@@ -470,7 +470,7 @@ public class ProjectStore
 		find_or_make_tree(name);
 	}
 
-	private void on_project_tree_removed(string name)
+	public void on_project_tree_removed(string name)
 	{
 		if (name == ROOT_FOLDER)
 			return;
@@ -516,7 +516,7 @@ public class ProjectStore
 		_folders.unset(name);
 	}
 
-	private void on_project_reset()
+	public void on_project_reset()
 	{
 		reset();
 	}

+ 16 - 16
tools/level_editor/properties_view.vala

@@ -8,10 +8,10 @@ namespace Crown
 public class UnitView : PropertyGrid
 {
 	// Widgets
-	private InputResource _prefab;
-	private Gtk.MenuButton _component_add;
-	private Gtk.Box _components;
-	private Gtk.Popover _add_popover;
+	public InputResource _prefab;
+	public Gtk.MenuButton _component_add;
+	public Gtk.Box _components;
+	public Gtk.Popover _add_popover;
 
 	public static GLib.Menu component_menu(string object_type)
 	{
@@ -73,20 +73,20 @@ public class UnitView : PropertyGrid
 
 public class PropertiesView : Gtk.Box
 {
-	private Database _db;
-	private Gee.HashMap<string, Expander> _expanders;
-	private Gee.HashMap<string, bool> _expander_states;
-	private Gee.HashMap<string, PropertyGrid> _objects;
-	private Gee.ArrayList<string> _entries;
-	private Gee.ArrayList<Guid?>? _selection;
+	public Database _db;
+	public Gee.HashMap<string, Expander> _expanders;
+	public Gee.HashMap<string, bool> _expander_states;
+	public Gee.HashMap<string, PropertyGrid> _objects;
+	public Gee.ArrayList<string> _entries;
+	public Gee.ArrayList<Guid?>? _selection;
 
 	// Widgets
-	private Gtk.Label _nothing_to_show;
-	private Gtk.Label _unknown_object_type;
-	private Gtk.Viewport _viewport;
-	private Gtk.ScrolledWindow _scrolled_window;
-	private PropertyGridSet _object_view;
-	private Gtk.Stack _stack;
+	public Gtk.Label _nothing_to_show;
+	public Gtk.Label _unknown_object_type;
+	public Gtk.Viewport _viewport;
+	public Gtk.ScrolledWindow _scrolled_window;
+	public PropertyGridSet _object_view;
+	public Gtk.Stack _stack;
 
 	[CCode (has_target = false)]
 	public delegate GLib.Menu ContextMenu(string object_type);

+ 7 - 7
tools/level_editor/resource_chooser.vala

@@ -6,7 +6,7 @@
 namespace Crown
 {
 // Returns true if the item should be filtered out
-private bool user_filter(string type, string name)
+public bool user_filter(string type, string name)
 {
 	return (type == OBJECT_TYPE_UNIT || type == OBJECT_TYPE_SOUND) && !name.has_prefix("core/");
 }
@@ -129,7 +129,7 @@ public class ResourceChooser : Gtk.Box
 		this.unmap.connect(on_unmap);
 	}
 
-	private void on_row_activated(Gtk.TreePath path, Gtk.TreeViewColumn column)
+	public void on_row_activated(Gtk.TreePath path, Gtk.TreeViewColumn column)
 	{
 		Gtk.TreePath filter_path = _tree_sort.convert_path_to_child_path(path);
 		Gtk.TreePath child_path = _tree_filter.convert_path_to_child_path(filter_path);
@@ -144,7 +144,7 @@ public class ResourceChooser : Gtk.Box
 		}
 	}
 
-	private void on_button_released(int n_press, double x, double y)
+	public void on_button_released(int n_press, double x, double y)
 	{
 		uint button = _tree_view_gesture_click.get_current_button();
 
@@ -171,12 +171,12 @@ public class ResourceChooser : Gtk.Box
 		}
 	}
 
-	private void on_unmap()
+	public void on_unmap()
 	{
 		_filter_entry.text = "";
 	}
 
-	private void on_filter_entry_text_changed()
+	public void on_filter_entry_text_changed()
 	{
 		_tree_selection.changed.disconnect(on_tree_selection_changed);
 		_tree_filter.refilter();
@@ -184,7 +184,7 @@ public class ResourceChooser : Gtk.Box
 		_tree_view.set_cursor(new Gtk.TreePath.first(), null, false);
 	}
 
-	private bool on_filter_entry_key_pressed(uint keyval, uint keycode, Gdk.ModifierType state)
+	public bool on_filter_entry_key_pressed(uint keyval, uint keycode, Gdk.ModifierType state)
 	{
 		Gtk.TreeModel model;
 		Gtk.TreeIter iter;
@@ -220,7 +220,7 @@ public class ResourceChooser : Gtk.Box
 		return Gdk.EVENT_PROPAGATE;
 	}
 
-	private void on_tree_selection_changed()
+	public void on_tree_selection_changed()
 	{
 		if (_editor_stack != null) {
 			Gtk.TreeModel model;

+ 1 - 1
tools/level_editor/texture_settings_dialog.vala

@@ -33,7 +33,7 @@ public class TextureSettingsDialog : Gtk.Window
 
 	public signal void texture_saved();
 
-	private void text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+	public void text_func(Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 	{
 		Value? platform;
 		model.get_value(iter, 0, out platform);

+ 5 - 5
tools/level_editor/toolbar.vala

@@ -21,7 +21,7 @@ public class Toolbar : Gtk.Box
 		add_snap_to_grid_buttons();
 	}
 
-	private void add_tool_buttons()
+	public void add_tool_buttons()
 	{
 		this.pack_start(make_toggle_button("app.tool", new GLib.Variant.int32(ToolType.PLACE), "tool-place"));
 		this.pack_start(make_toggle_button("app.tool", new GLib.Variant.int32(ToolType.MOVE), "tool-move"));
@@ -31,7 +31,7 @@ public class Toolbar : Gtk.Box
 		this.pack_start(last);
 	}
 
-	private void add_snap_buttons()
+	public void add_snap_buttons()
 	{
 		this.pack_start(make_toggle_button("app.snap", new GLib.Variant.int32(SnapMode.RELATIVE), "reference-local"));
 		var last = make_toggle_button("app.snap", new GLib.Variant.int32(SnapMode.ABSOLUTE), "reference-world");
@@ -39,7 +39,7 @@ public class Toolbar : Gtk.Box
 		this.pack_start(last);
 	}
 
-	private void add_reference_system_buttons()
+	public void add_reference_system_buttons()
 	{
 		this.pack_start(make_toggle_button("app.reference-system", new GLib.Variant.int32(ReferenceSystem.LOCAL), "axis-local"));
 		var last = make_toggle_button("app.reference-system", new GLib.Variant.int32(ReferenceSystem.WORLD), "axis-world");
@@ -47,14 +47,14 @@ public class Toolbar : Gtk.Box
 		this.pack_start(last);
 	}
 
-	private void add_snap_to_grid_buttons()
+	public void add_snap_to_grid_buttons()
 	{
 		var last = make_toggle_button("app.snap-to-grid", null, "snap-to-grid");
 		last.margin_bottom = last.margin_bottom + 8;
 		this.pack_start(last);
 	}
 
-	private Gtk.ToggleButton make_toggle_button(string action_name
+	public Gtk.ToggleButton make_toggle_button(string action_name
 		, GLib.Variant? action_target
 		, string icon_name
 		, Gtk.IconSize icon_size = Gtk.IconSize.LARGE_TOOLBAR

+ 3 - 3
tools/resource/font_resource.vala

@@ -44,7 +44,7 @@ public enum FontChars
 }
 
 // Copies @a src alpha to @a dst BRGA channels.
-private void copy_alpha_to_argb32(Cairo.ImageSurface dst, Cairo.ImageSurface src)
+public void copy_alpha_to_argb32(Cairo.ImageSurface dst, Cairo.ImageSurface src)
 {
 	unowned uchar[] dst_data = dst.get_data();
 	unowned uchar[] src_data = src.get_data();
@@ -308,13 +308,13 @@ public class FontImportDialog : Gtk.Window
 		generate_atlas();
 	}
 
-	private bool on_map_event(Gdk.EventAny ev)
+	public bool on_map_event(Gdk.EventAny ev)
 	{
 		_font_name.grab_focus();
 		return Gdk.EVENT_PROPAGATE;
 	}
 
-	private void on_destroy()
+	public void on_destroy()
 	{
 		font_atlas_free(_font_atlas);
 	}

+ 2 - 2
tools/resource/mesh.vala

@@ -16,7 +16,7 @@ public struct Mesh
 		_nodes = new Gee.ArrayList<string>();
 	}
 
-	private void decode_node(Hashtable node)
+	public void decode_node(Hashtable node)
 	{
 		foreach (var e in node.entries) {
 			if (e.key == "matrix_local") {
@@ -29,7 +29,7 @@ public struct Mesh
 		}
 	}
 
-	private void decode_nodes(Hashtable nodes)
+	public void decode_nodes(Hashtable nodes)
 	{
 		foreach (var e in nodes.entries) {
 			_nodes.add(e.key);

+ 2 - 2
tools/resource/sprite_resource.vala

@@ -587,7 +587,7 @@ public class SpriteImportDialog : Gtk.Window
 		}
 	}
 
-	private bool on_map_event(Gdk.EventAny ev)
+	public bool on_map_event(Gdk.EventAny ev)
 	{
 		_unit_name.grab_focus();
 		return Gdk.EVENT_PROPAGATE;
@@ -704,7 +704,7 @@ public class SpriteImportDialog : Gtk.Window
 		return obj;
 	}
 
-	private void on_import()
+	public void on_import()
 	{
 		_import_result(SpriteResource.do_import(this, _project, _destination_dir, _filenames));
 		close();

+ 1 - 1
tools/widgets/clamp.vala

@@ -8,7 +8,7 @@ namespace Crown
 // Drop-in replacement (sort-of) for HdyClamp from libhandy1.
 public class Clamp : Gtk.Container
 {
-	private Gtk.Widget _child;
+	public Gtk.Widget _child;
 
 	public Clamp()
 	{

+ 10 - 10
tools/widgets/console_view.vala

@@ -7,7 +7,7 @@ namespace Crown
 {
 public class CounterLabel : Gtk.Box
 {
-	private Gtk.Label _label;
+	public Gtk.Label _label;
 
 	public CounterLabel()
 	{
@@ -31,7 +31,7 @@ public class CounterLabel : Gtk.Box
 		_label.set_markup(str);
 	}
 
-	protected override void get_preferred_height(out int minimum_height, out int natural_height)
+	public override void get_preferred_height(out int minimum_height, out int natural_height)
 	{
 		// FIXME: Find a proper way to position/size labels inside Gtk.TextView.
 		// Make Gtk.Label think it only needs 16px vertical to show its text.
@@ -235,7 +235,7 @@ public class ConsoleView : Gtk.Box
 		};
 	}
 
-	private void on_entry_activated()
+	public void on_entry_activated()
 	{
 		string text = _entry.text;
 		text = text.strip();
@@ -267,7 +267,7 @@ public class ConsoleView : Gtk.Box
 		_entry.text = "";
 	}
 
-	private bool on_entry_key_pressed(uint keyval, uint keycode, Gdk.ModifierType state)
+	public bool on_entry_key_pressed(uint keyval, uint keycode, Gdk.ModifierType state)
 	{
 		if (keyval == Gdk.Key.Down) {
 			if (_distance > 1) {
@@ -292,12 +292,12 @@ public class ConsoleView : Gtk.Box
 		return Gdk.EVENT_PROPAGATE;
 	}
 
-	private void on_destroy()
+	public void on_destroy()
 	{
 		_console_view_valid = false;
 	}
 
-	private void on_button_pressed(int n_press, double x, double y)
+	public void on_button_pressed(int n_press, double x, double y)
 	{
 		uint button = _text_view_gesture_click.get_current_button();
 
@@ -357,7 +357,7 @@ public class ConsoleView : Gtk.Box
 		}
 	}
 
-	private void on_button_released(int n_press, double x, double y)
+	public void on_button_released(int n_press, double x, double y)
 	{
 		uint button = _text_view_gesture_click.get_current_button();
 
@@ -400,7 +400,7 @@ public class ConsoleView : Gtk.Box
 		}
 	}
 
-	private void on_motion_notify(double x, double y)
+	public void on_motion_notify(double x, double y)
 	{
 		bool hovering = false;
 
@@ -612,7 +612,7 @@ public class ConsoleView : Gtk.Box
 		_mutex.unlock();
 	}
 
-	private void scroll_to_bottom()
+	public void scroll_to_bottom()
 	{
 		// Line height is computed in an idle handler, wait a bit before scrolling to bottom.
 		// See: https://valadoc.org/gtk+-3.0/Gtk.TextView.scroll_to_iter.html
@@ -630,7 +630,7 @@ public class ConsoleView : Gtk.Box
 			});
 	}
 
-	private void update_style()
+	public void update_style()
 	{
 		Gtk.TextBuffer tb = _text_view.buffer;
 		Gtk.TextTag tag_warning = tb.tag_table.lookup("warning");

+ 37 - 37
tools/widgets/editor_view.vala

@@ -13,42 +13,42 @@ namespace Crown
 {
 public class EditorView : Gtk.EventBox
 {
-	private const Gtk.TargetEntry[] dnd_targets =
+	public const Gtk.TargetEntry[] dnd_targets =
 	{
 		{ "RESOURCE_PATH", Gtk.TargetFlags.SAME_APP, 0 },
 	};
 
 	// Data
-	private RuntimeInstance _runtime;
+	public RuntimeInstance _runtime;
 
-	private Gtk.Allocation _allocation;
-	private uint _resize_timer_id;
+	public Gtk.Allocation _allocation;
+	public uint _resize_timer_id;
 
-	private bool _mouse_left;
-	private bool _mouse_middle;
-	private bool _mouse_right;
+	public bool _mouse_left;
+	public bool _mouse_middle;
+	public bool _mouse_right;
 
-	private uint _window_id;
-	private uint _last_window_id;
+	public uint _window_id;
+	public uint _last_window_id;
 
-	private Gee.HashMap<uint, bool> _keys;
-	private bool _input_enabled;
-	private bool _drag_enter;
-	private uint _drag_last_time;
-	private int64 _motion_last_time;
-	private const int MOTION_EVENTS_RATE = 75;
+	public Gee.HashMap<uint, bool> _keys;
+	public bool _input_enabled;
+	public bool _drag_enter;
+	public uint _drag_last_time;
+	public int64 _motion_last_time;
+	public const int MOTION_EVENTS_RATE = 75;
 
-	private GLib.StringBuilder _buffer;
+	public GLib.StringBuilder _buffer;
 
-	private Gtk.EventControllerKey _controller_key;
-	private Gtk.GestureMultiPress _gesture_click;
-	private Gtk.EventControllerMotion _controller_motion;
-	private Gtk.EventControllerScroll _controller_scroll;
+	public Gtk.EventControllerKey _controller_key;
+	public Gtk.GestureMultiPress _gesture_click;
+	public Gtk.EventControllerMotion _controller_motion;
+	public Gtk.EventControllerScroll _controller_scroll;
 
 	// Signals
 	public signal void native_window_ready(uint window_id, int width, int height);
 
-	private string key_to_string(uint k)
+	public string key_to_string(uint k)
 	{
 		switch (k) {
 		case Gdk.Key.w:         return "w";
@@ -63,14 +63,14 @@ public class EditorView : Gtk.EventBox
 		}
 	}
 
-	private bool camera_modifier_pressed()
+	public bool camera_modifier_pressed()
 	{
 		return _keys[Gdk.Key.Alt_L]
 			|| _keys[Gdk.Key.Alt_R]
 			;
 	}
 
-	private void camera_modifier_reset()
+	public void camera_modifier_reset()
 	{
 		_keys[Gdk.Key.Alt_L] = false;
 		_keys[Gdk.Key.Alt_R] = false;
@@ -151,7 +151,7 @@ public class EditorView : Gtk.EventBox
 		this.drag_leave.connect(on_drag_leave);
 	}
 
-	private void on_drag_data_received(Gdk.DragContext context, int x, int y, Gtk.SelectionData data, uint info, uint time_)
+	public void on_drag_data_received(Gdk.DragContext context, int x, int y, Gtk.SelectionData data, uint info, uint time_)
 	{
 		// https://valadoc.org/gtk+-3.0/Gtk.Widget.drag_data_received.html
 		unowned uint8[] raw_data = data.get_data_with_length();
@@ -170,7 +170,7 @@ public class EditorView : Gtk.EventBox
 		}
 	}
 
-	private bool on_drag_motion(Gdk.DragContext context, int x, int y, uint _time)
+	public bool on_drag_motion(Gdk.DragContext context, int x, int y, uint _time)
 	{
 		// https://valadoc.org/gtk+-3.0/Gtk.Widget.drag_motion.html
 		Gdk.Atom target;
@@ -203,7 +203,7 @@ public class EditorView : Gtk.EventBox
 		return true;
 	}
 
-	private bool on_drag_drop(Gdk.DragContext context, int x, int y, uint time_)
+	public bool on_drag_drop(Gdk.DragContext context, int x, int y, uint time_)
 	{
 		// https://valadoc.org/gtk+-3.0/Gtk.Widget.drag_drop.html
 		int scale = this.get_scale_factor();
@@ -214,13 +214,13 @@ public class EditorView : Gtk.EventBox
 		return true;
 	}
 
-	private void on_drag_leave(Gdk.DragContext context, uint time_)
+	public void on_drag_leave(Gdk.DragContext context, uint time_)
 	{
 		// https://valadoc.org/gtk+-3.0/Gtk.Widget.drag_leave.html
 		_drag_enter = false;
 	}
 
-	private void on_button_released(int n_press, double x, double y)
+	public void on_button_released(int n_press, double x, double y)
 	{
 		uint button = _gesture_click.get_current_button();
 		int scale = this.get_scale_factor();
@@ -253,7 +253,7 @@ public class EditorView : Gtk.EventBox
 		}
 	}
 
-	private void on_button_pressed(int n_press, double x, double y)
+	public void on_button_pressed(int n_press, double x, double y)
 	{
 		uint button = _gesture_click.get_current_button();
 		int scale = this.get_scale_factor();
@@ -292,7 +292,7 @@ public class EditorView : Gtk.EventBox
 		}
 	}
 
-	private bool on_key_pressed(uint keyval, uint keycode, Gdk.ModifierType state)
+	public bool on_key_pressed(uint keyval, uint keycode, Gdk.ModifierType state)
 	{
 		if (keyval == Gdk.Key.Escape)
 			GLib.Application.get_default().activate_action("cancel-place", null);
@@ -321,7 +321,7 @@ public class EditorView : Gtk.EventBox
 		return Gdk.EVENT_PROPAGATE;
 	}
 
-	private void on_key_released(uint keyval, uint keycode, Gdk.ModifierType state)
+	public void on_key_released(uint keyval, uint keycode, Gdk.ModifierType state)
 	{
 		if (_keys.has_key(keyval)) {
 			if (_keys[keyval])
@@ -337,7 +337,7 @@ public class EditorView : Gtk.EventBox
 		}
 	}
 
-	private void on_motion(double x, double y)
+	public void on_motion(double x, double y)
 	{
 		int64 now = GLib.get_monotonic_time();
 
@@ -354,7 +354,7 @@ public class EditorView : Gtk.EventBox
 		}
 	}
 
-	private void on_scroll(double dx, double dy)
+	public void on_scroll(double dx, double dy)
 	{
 		if (camera_modifier_pressed()) {
 			_runtime.send_script(LevelEditorApi.mouse_wheel(dy));
@@ -366,7 +366,7 @@ public class EditorView : Gtk.EventBox
 		}
 	}
 
-	private bool on_event_box_focus_out_event(Gdk.EventFocus ev)
+	public bool on_event_box_focus_out_event(Gdk.EventFocus ev)
 	{
 		camera_modifier_reset();
 
@@ -378,7 +378,7 @@ public class EditorView : Gtk.EventBox
 		return Gdk.EVENT_PROPAGATE;
 	}
 
-	private void on_size_allocate(Gtk.Allocation ev)
+	public void on_size_allocate(Gtk.Allocation ev)
 	{
 		int scale = this.get_scale_factor();
 
@@ -407,7 +407,7 @@ public class EditorView : Gtk.EventBox
 		}
 	}
 
-	private void on_event_box_realized()
+	public void on_event_box_realized()
 	{
 		this.get_window().ensure_native();
 #if CROWN_PLATFORM_LINUX
@@ -418,7 +418,7 @@ public class EditorView : Gtk.EventBox
 #endif
 	}
 
-	private void on_enter(double x, double y)
+	public void on_enter(double x, double y)
 	{
 		this.grab_focus();
 	}

+ 2 - 2
tools/widgets/entry_search.vala

@@ -34,7 +34,7 @@ public class EntrySearch : Gtk.Box
 		_entry.set_placeholder_text(text);
 	}
 
-	private bool on_focus_in(Gdk.EventFocus ev)
+	public bool on_focus_in(Gdk.EventFocus ev)
 	{
 		var app = (LevelEditorApplication)GLib.Application.get_default();
 		app.entry_any_focus_in(_entry);
@@ -42,7 +42,7 @@ public class EntrySearch : Gtk.Box
 		return Gdk.EVENT_PROPAGATE;
 	}
 
-	private bool on_focus_out(Gdk.EventFocus ef)
+	public bool on_focus_out(Gdk.EventFocus ef)
 	{
 		var app = (LevelEditorApplication)GLib.Application.get_default();
 		app.entry_any_focus_out(_entry);

+ 1 - 1
tools/widgets/expander.vala

@@ -68,7 +68,7 @@ public class Expander : Gtk.Box
 		}
 	}
 
-	private void on_header_button_pressed(int n_press, double x, double y)
+	public void on_header_button_pressed(int n_press, double x, double y)
 	{
 		uint button = _gesture_click.get_current_button();
 

+ 1 - 1
tools/widgets/input_angle.vala

@@ -57,7 +57,7 @@ public class InputAngle : InputField, Gtk.Box
 		this.pack_start(_degrees, true);
 	}
 
-	private void on_value_changed(InputField p)
+	public void on_value_changed(InputField p)
 	{
 		double new_radians = MathUtils.rad((double)_degrees.value);
 

+ 1 - 1
tools/widgets/input_bool.vala

@@ -45,7 +45,7 @@ public class InputBool : InputField, Gtk.CheckButton
 		this.toggled.connect(on_value_changed);
 	}
 
-	private void on_value_changed()
+	public void on_value_changed()
 	{
 		if (base.get_inconsistent()) {
 			base.set_inconsistent(false);

+ 2 - 2
tools/widgets/input_color3.vala

@@ -7,7 +7,7 @@ namespace Crown
 {
 public class InputColor3 : Gtk.Box, InputField
 {
-	private Gtk.ColorButton _color_button;
+	public Gtk.ColorButton _color_button;
 
 	public void set_inconsistent(bool inconsistent)
 	{
@@ -52,7 +52,7 @@ public class InputColor3 : Gtk.Box, InputField
 		this.pack_start(_color_button);
 	}
 
-	private void on_color_set()
+	public void on_color_set()
 	{
 		value_changed(this);
 	}

+ 7 - 7
tools/widgets/input_double.vala

@@ -92,12 +92,12 @@ public class InputDouble : InputField, Gtk.Entry
 #endif
 	}
 
-	private void on_button_pressed(int n_press, double x, double y)
+	public void on_button_pressed(int n_press, double x, double y)
 	{
 		this.grab_focus();
 	}
 
-	private void on_button_released(int n_press, double x, double y)
+	public void on_button_released(int n_press, double x, double y)
 	{
 		uint button = _gesture_click.get_current_button();
 
@@ -115,7 +115,7 @@ public class InputDouble : InputField, Gtk.Entry
 		}
 	}
 
-	private void on_activate()
+	public void on_activate()
 	{
 		this.select_region(0, 0);
 		this.set_position(-1);
@@ -126,7 +126,7 @@ public class InputDouble : InputField, Gtk.Entry
 			this.text = print_max_decimals(_value, _preview_decimals);
 	}
 
-	private bool on_focus_in(Gdk.EventFocus ev)
+	public bool on_focus_in(Gdk.EventFocus ev)
 	{
 		var app = (LevelEditorApplication)GLib.Application.get_default();
 		app.entry_any_focus_in(this);
@@ -142,7 +142,7 @@ public class InputDouble : InputField, Gtk.Entry
 		return Gdk.EVENT_PROPAGATE;
 	}
 
-	private bool on_focus_out(Gdk.EventFocus ef)
+	public bool on_focus_out(Gdk.EventFocus ef)
 	{
 		var app = (LevelEditorApplication)GLib.Application.get_default();
 		app.entry_any_focus_out(this);
@@ -165,7 +165,7 @@ public class InputDouble : InputField, Gtk.Entry
 		return Gdk.EVENT_PROPAGATE;
 	}
 
-	private void set_value_safe(double val)
+	public void set_value_safe(double val)
 	{
 		double clamped = val.clamp(_min, _max);
 
@@ -182,7 +182,7 @@ public class InputDouble : InputField, Gtk.Entry
 	}
 
 	/// Returns @a str as double or @a deffault if conversion fails.
-	private double string_to_double(string str, double deffault)
+	public double string_to_double(string str, double deffault)
 	{
 		TinyExpr.Variable vars[] =
 		{

+ 2 - 2
tools/widgets/input_enum.vala

@@ -150,7 +150,7 @@ public class InputEnum : InputField, Gtk.ComboBox
 		return some_id;
 	}
 
-	private void on_changed()
+	public void on_changed()
 	{
 		if (this.get_active_id() == null)
 			return;
@@ -166,7 +166,7 @@ public class InputEnum : InputField, Gtk.ComboBox
 		value_changed(this);
 	}
 
-	private void insert_special_values()
+	public void insert_special_values()
 	{
 		assert(_store.iter_n_children(null) == 0u);
 

+ 1 - 1
tools/widgets/input_file.vala

@@ -61,7 +61,7 @@ public class InputFile : InputField, Gtk.Button
 		this.clicked.connect(on_selector_clicked);
 	}
 
-	private void on_selector_clicked()
+	public void on_selector_clicked()
 	{
 		string label = _action == Gtk.FileChooserAction.SELECT_FOLDER ? "Folder" : "File";
 		Gtk.FileChooserDialog dlg = new Gtk.FileChooserDialog("Select %s".printf(label)

+ 1 - 1
tools/widgets/input_quaternion.vala

@@ -81,7 +81,7 @@ public class InputQuaternion : InputField, Gtk.Box
 		this.pack_start(_z, true);
 	}
 
-	private void on_value_changed(InputField p)
+	public void on_value_changed(InputField p)
 	{
 		double x = MathUtils.rad((double)_x.value);
 		double y = MathUtils.rad((double)_y.value);

+ 6 - 6
tools/widgets/input_resource.vala

@@ -74,7 +74,7 @@ public class InputResource : InputField, Gtk.Box
 		db._project.file_removed.connect(on_file_removed);
 	}
 
-	private void on_selector_clicked()
+	public void on_selector_clicked()
 	{
 		if (_dialog == null) {
 			_dialog = ((LevelEditorApplication)GLib.Application.get_default()).new_select_resource_dialog(_type);
@@ -85,30 +85,30 @@ public class InputResource : InputField, Gtk.Box
 		_dialog.present();
 	}
 
-	private void on_select_resource_dialog_resource_selected(string type, string name)
+	public void on_select_resource_dialog_resource_selected(string type, string name)
 	{
 		_name.value = name;
 		_dialog.hide();
 	}
 
-	private void on_revealer_clicked()
+	public void on_revealer_clicked()
 	{
 		var tuple = new GLib.Variant.tuple({_type, _name.value});
 		GLib.Application.get_default().activate_action("reveal-resource", tuple);
 	}
 
-	private void on_name_value_changed()
+	public void on_name_value_changed()
 	{
 		value_changed(this);
 	}
 
-	private void on_file_added_or_changed(string type, string name, uint64 size, uint64 mtime)
+	public void on_file_added_or_changed(string type, string name, uint64 size, uint64 mtime)
 	{
 		if (type == _type && name == _name.value)
 			value_changed(this);
 	}
 
-	private void on_file_removed(string type, string name)
+	public void on_file_removed(string type, string name)
 	{
 		if (type == _type && name == _name.value)
 			value_changed(this);

+ 6 - 6
tools/widgets/input_string.vala

@@ -65,12 +65,12 @@ public class InputString : InputField, Gtk.Entry
 		this.focus_out_event.connect(on_focus_out);
 	}
 
-	private void on_button_pressed(int n_press, double x, double y)
+	public void on_button_pressed(int n_press, double x, double y)
 	{
 		this.grab_focus();
 	}
 
-	private void on_button_released(int n_press, double x, double y)
+	public void on_button_released(int n_press, double x, double y)
 	{
 		uint button = _gesture_click.get_current_button();
 
@@ -88,14 +88,14 @@ public class InputString : InputField, Gtk.Entry
 		}
 	}
 
-	private void on_activate()
+	public void on_activate()
 	{
 		this.select_region(0, 0);
 		this.set_position(-1);
 		set_value_safe(this.text);
 	}
 
-	private bool on_focus_in(Gdk.EventFocus ev)
+	public bool on_focus_in(Gdk.EventFocus ev)
 	{
 		var app = (LevelEditorApplication)GLib.Application.get_default();
 		app.entry_any_focus_in(this);
@@ -111,7 +111,7 @@ public class InputString : InputField, Gtk.Entry
 		return Gdk.EVENT_PROPAGATE;
 	}
 
-	private bool on_focus_out(Gdk.EventFocus ef)
+	public bool on_focus_out(Gdk.EventFocus ef)
 	{
 		var app = (LevelEditorApplication)GLib.Application.get_default();
 		app.entry_any_focus_out(this);
@@ -131,7 +131,7 @@ public class InputString : InputField, Gtk.Entry
 		return Gdk.EVENT_PROPAGATE;
 	}
 
-	protected virtual void set_value_safe(string text)
+	public virtual void set_value_safe(string text)
 	{
 		this.text = text;
 

+ 1 - 1
tools/widgets/input_vector2.vala

@@ -52,7 +52,7 @@ public class InputVector2 : Gtk.Box
 		this.pack_start(_y, true);
 	}
 
-	private void on_value_changed()
+	public void on_value_changed()
 	{
 		if (!_stop_emit)
 			value_changed();

+ 1 - 1
tools/widgets/input_vector3.vala

@@ -75,7 +75,7 @@ public class InputVector3 : InputField, Gtk.Box
 		this.pack_start(_z, true);
 	}
 
-	private void on_value_changed()
+	public void on_value_changed()
 	{
 		value_changed(this);
 	}

+ 1 - 1
tools/widgets/input_vector4.vala

@@ -82,7 +82,7 @@ public class InputVector4 : InputField, Gtk.Box
 		this.pack_start(_w, true);
 	}
 
-	private void on_value_changed()
+	public void on_value_changed()
 	{
 		if (!_stop_emit)
 			value_changed(this);

+ 3 - 3
tools/widgets/select_resource_dialog.vala

@@ -48,18 +48,18 @@ public class SelectResourceDialog : Gtk.Window
 		this.add(_chooser);
 	}
 
-	private bool on_close()
+	public bool on_close()
 	{
 		this.hide();
 		return Gdk.EVENT_STOP;
 	}
 
-	private bool on_resource_chooser_filter(string type, string name)
+	public bool on_resource_chooser_filter(string type, string name)
 	{
 		return _resource_type == type;
 	}
 
-	private void on_resource_chooser_resource_selected(string type, string name)
+	public void on_resource_chooser_resource_selected(string type, string name)
 	{
 		resource_selected(type, name);
 	}

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff