Unravel Engine C++ Reference
Loading...
Searching...
No Matches
selection_action.h
Go to the documentation of this file.
1#pragma once
2
3#include "editing_action.h"
4#include <entt/meta/meta.hpp>
5#include <vector>
6
7namespace unravel
8{
9
10struct editing_manager;
11
12// Action for tracking selection changes
13struct selection_action_t : crtp_meta_type<selection_action_t, editing_action_t>
14{
16 std::vector<entt::meta_any> old_selection{};
17 std::vector<entt::meta_any> new_selection{};
18 bool is_select{false};
20 const std::vector<entt::meta_any>& old_sel,
21 const std::vector<entt::meta_any>& new_sel, bool is_select);
22
23 void do_action() override;
24 void undo_action() override;
25 auto is_mergeable(const editing_action_t& previous) const -> bool override;
26 void merge_with(const editing_action_t& previous) override;
27 auto is_valid() const -> bool override;
28 auto modifies_scene_content() const -> bool override { return false; }
29};
30
31} // namespace unravel
32
auto modifies_scene_content() const -> bool override
void merge_with(const editing_action_t &previous) override
auto is_valid() const -> bool override
std::vector< entt::meta_any > old_selection
selection_action_t(editing_manager *mgr, const std::vector< entt::meta_any > &old_sel, const std::vector< entt::meta_any > &new_sel, bool is_select)
auto is_mergeable(const editing_action_t &previous) const -> bool override
std::vector< entt::meta_any > new_selection