Repository: godotengine/godot
File: editor/scene/2d/tiles/tile_map_layer_editor.h (C/C++)

Code before:
class TileMapLayer;
class TileMapLayerEditor;
class TileSetSourceItemList;

class SwitchSeparator : public MarginContainer {
	GDCLASS(SwitchSeparator, MarginContainer);

	HSeparator *h_separator = nullptr;
	VSeparator *v_separator = nullptr;

public:
	void set_vertical(bool p_vertical);

	SwitchSeparator();
};

class TileMapLayerSubEditorPlugin : public Object {
	GDSOFTCLASS(TileMapLayerSubEditorPlugin, Object);

protected:
	ObjectID edited_tile_map_layer_id;
	TileMapLayer *_get_edited_layer() const;
	static void _add_to_output_if_tile_changed(HashMap<Vector2i, TileMapCell> &p_output, const TileMapLayer *p_layer, Vector2i p_coords, const TileMapCell &p_cell);

public:
	struct TabData {
		Vector<Control *> toolbar;
		Control *wide_toolbar;
		Control *panel = nullptr;
	};

	virtual Vector<TabData> get_tabs() const {
		return Vector<TabData>();
	}

	virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return false; }
	virtual void forward_canvas_draw_over_viewport(Control *p_overlay) {}
	virtual void tile_set_changed() {}
	virtual void edit(ObjectID p_tile_map_layer_id) {}
	virtual void draw_tile_coords_over_viewport(Control *p_overlay, const TileMapLayer *p_edited_layer, Ref<TileSet> p_tile_set, bool p_show_rectangle_size, const Vector2i &p_rectangle_origin);
	virtual void update_layout(EditorDock::DockLayout p_layout) {}
};

class TileMapLayerEditorTilesPlugin : public TileMapLayerSubEditorPlugin {
	GDCLASS(TileMapLayerEditorTilesPlugin, TileMapLayerSubEditorPlugin);

public:
	enum TileTransformType {
		TRANSFORM_ROTATE_LEFT,
		TRANSFORM_ROTATE_RIGHT,
		TRANSFORM_FLIP_H,

Review comment (suggestion):
If it's not passed around, LocalVector should be preferred.
```suggestion
		LocalVector<Control *> toolbar;
```

Code after:
class TileSetSourceItemList;
class GridContainer;

class SwitchSeparator : public MarginContainer {
	GDCLASS(SwitchSeparator, MarginContainer);

	HSeparator *h_separator = nullptr;
	VSeparator *v_separator = nullptr;

public:
	void set_vertical(bool p_vertical);

	SwitchSeparator();
};

class TileMapLayerSubEditorPlugin : public Object {
	GDSOFTCLASS(TileMapLayerSubEditorPlugin, Object);

protected:
	ObjectID edited_tile_map_layer_id;
	TileMapLayer *_get_edited_layer() const;
	static void _add_to_output_if_tile_changed(HashMap<Vector2i, TileMapCell> &p_output, const TileMapLayer *p_layer, Vector2i p_coords, const TileMapCell &p_cell);

public:
	struct TabData {
		Vector<Control *> toolbar;
		Control *wide_toolbar;
		Control *panel = nullptr;
	};

	virtual Vector<TabData> get_tabs() const {
		return Vector<TabData>();
	}

	virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return false; }
	virtual void forward_canvas_draw_over_viewport(Control *p_overlay) {}
	virtual void tile_set_changed() {}
	virtual void edit(ObjectID p_tile_map_layer_id) {}
	virtual void draw_tile_coords_over_viewport(Control *p_overlay, const TileMapLayer *p_edited_layer, Ref<TileSet> p_tile_set, bool p_show_rectangle_size, const Vector2i &p_rectangle_origin);
	virtual void update_layout(EditorDock::DockLayout p_layout) {}
};

class TileMapLayerEditorTilesPlugin : public TileMapLayerSubEditorPlugin {
	GDCLASS(TileMapLayerEditorTilesPlugin, TileMapLayerSubEditorPlugin);

public:
	enum TileTransformType {
		TRANSFORM_ROTATE_LEFT,
		TRANSFORM_ROTATE_RIGHT,
		TRANSFORM_FLIP_H,
		TRANSFORM_FLIP_V,