aro 0.2.8 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+
5
+ cubicus.rb
6
+
7
+ aro dom cubicus menu.
8
+
9
+ by i2097i
10
+
11
+ =end
12
+
13
+ require_relative "./menu"
14
+
15
+ class Aro::Dom::Cubicus < Aro::Dom::Menu
16
+
17
+ EXEC_METHODS = [
18
+ # ...
19
+ ]
20
+
21
+ def generate_open_system!
22
+ return unless is_menu_named?(:open_system) &&
23
+ menu_items.empty?
24
+
25
+ [:create_glyph].each{|k|
26
+ i = generate_new_item(k, for_type: :system)
27
+
28
+ i.aro_file.write!(
29
+ Aro::Dom::Store.build_exec_oss_om_params!(
30
+ k,
31
+ Aro::Dom::Glyph,
32
+ "#{k}!",
33
+ [i.uuid],
34
+ {}
35
+ )
36
+ )
37
+ }
38
+ end
39
+ end
@@ -27,7 +27,10 @@ class Aro::Dom::DataBase < ActiveRecord::Base
27
27
  menu = Aro::Dom::Menu.find_by(uuid: @@data_base_directory.uuid)
28
28
  if menu.nil?
29
29
  # find or create the new menu
30
- menu = Aro::Dom::Menu.create(uuid: @@data_base_directory.uuid)
30
+ menu_const = Aro::Dom::Menu
31
+ menu_const = Aro::Dom::Cubicus if menu_sym == :open_system
32
+
33
+ menu = menu_const.create(uuid: @@data_base_directory.uuid)
31
34
  Aro::Dom::Locale.add_i18n_key(
32
35
  menu_sym.to_s,
33
36
  new_i18n_display_key: menu.uuid
@@ -112,10 +115,17 @@ class Aro::Dom::DataBase < ActiveRecord::Base
112
115
  case @@data_base_directory.unix_path.to_sym
113
116
  when :ma_ain
114
117
  menu.generate_ma_ain!
115
- when :settings
116
- menu.generate_settings!
118
+ when :configuration
119
+ menu.generate_configuration!
117
120
  when :library
118
121
  generate_items!(menu, Aro::Dom::Library)
122
+ when :open_system
123
+ unless menu.kind_of?(Aro::Dom::Cubicus)
124
+ raise "expected Aro::Dom::Cubicus open_system menu type! #{menu.inspect}"
125
+ end
126
+ menu.generate_open_system!
127
+ when :cor
128
+ generate_items!(menu, Aro::Cor)
119
129
  when :git
120
130
  generate_items!(menu, Aro::Dom::Git)
121
131
  when :ssh
@@ -16,7 +16,7 @@ class Aro::Dom::DataBase::File < ActiveRecord::Base
16
16
  belongs_to :data_base_directory, class_name: "Aro::Dom::DataBase::Directory"
17
17
 
18
18
  def write!(updates)
19
- Aro::Dom::Store.edit(self, updates)
19
+ Aro::Dom::Store.save_file!(self, updates)
20
20
  end
21
21
 
22
22
  def aro_file_path
@@ -0,0 +1,77 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+
5
+ glyph.rb
6
+
7
+ aro dom glyph menu item.
8
+
9
+ by i2097i
10
+
11
+ =end
12
+
13
+ require_relative "./menu_item"
14
+
15
+ class Aro::Dom::Glyph < Aro::Dom::MenuItem
16
+ # belongs_to :menu
17
+
18
+ EXEC_METHODS = [
19
+ :create_glyph!
20
+ ]
21
+
22
+ def self.create_glyph!(menu_item_uuid, action_data = {})
23
+ create_glyph_menu_item = Aro::Dom::MenuItem.find_by(uuid: menu_item_uuid)
24
+
25
+ raise "invalid menu_item_uuid! #{menu_item_uuid}" if create_glyph_menu_item.nil?
26
+
27
+ Aro::P.say("#{self.name} is the base essence within open_system")
28
+
29
+ options = [
30
+ {name: :back, value: :back},
31
+ {name: :objecticus, value: :objecticus},
32
+ {name: :perspecticus, value: :perspecticus}
33
+ ]
34
+
35
+ selected_option = Aro::P.default_select(
36
+ I18n.t("open_system.create_glyph_select"),
37
+ options
38
+ )
39
+
40
+ return false if selected_option.kind_of?(Symbol) &&
41
+ selected_option == :back
42
+
43
+ selected_const = selected_option == :perspecticus ? Aro::Dom::Perspecticus : Aro::Dom::Objecticus
44
+
45
+ new_name = Aro::Dom::Designer.get_new_value_from_user(
46
+ "enter name for new #{selected_option}:"
47
+ )
48
+
49
+ i = create_glyph_menu_item.menu.generate_new_item(
50
+ new_name,
51
+ for_type: :system,
52
+ open_system_class: selected_const.name
53
+ )
54
+
55
+ i.aro_file.write!(
56
+ Aro::Dom::Store.build_exec_oss_om_params!(
57
+ new_name,
58
+ selected_const,
59
+ "open!",
60
+ [i.uuid],
61
+ {}
62
+ )
63
+ )
64
+
65
+ Aro::P.say("new #{self.name} '#{i.localized_name}' created successfully!")
66
+
67
+ Aro::Dom::Ma_ain.navigate_to!(create_glyph_menu_item.menu)
68
+ end
69
+
70
+ def cubicus
71
+ self.menu
72
+ end
73
+
74
+ def open_system_action_data
75
+ self.store.safe_get_key("action_data") || {}
76
+ end
77
+ end
@@ -13,6 +13,15 @@
13
13
  class Aro::Dom::Menu < ActiveRecord::Base
14
14
  include Aro::Dom::Uuid
15
15
 
16
+ self.inheritance_column = :open_system_class
17
+
18
+ OPEN_SYSTEM_CLASSES = [
19
+ "Aro::Dom::Cubicus",
20
+ "Aro::Dom::Glyph",
21
+ "Aro::Dom::Objecticus",
22
+ "Aro::Dom::Perspecticus",
23
+ ]
24
+
16
25
  has_many :menu_items, class_name: "Aro::Dom::MenuItem"
17
26
 
18
27
  def localized_name
@@ -27,9 +36,17 @@ class Aro::Dom::Menu < ActiveRecord::Base
27
36
  @directory ||= Aro::Dom::DataBase::Directory.find_by(uuid: uuid)
28
37
  end
29
38
 
30
- def generate_new_item(localized_name, for_type: :user)
31
- new_menu_item = new_menu_item&.to_s
39
+ def generate_new_item(localized_name, for_type: :user, open_system_class: nil)
40
+ localized_name = localized_name&.to_s
32
41
  new_menu_item = menu_items.create(type_flag: for_type)
42
+ if !open_system_class.nil? &&
43
+ Aro::Dom::Menu::OPEN_SYSTEM_CLASSES.include?(open_system_class&.to_s)
44
+ new_menu_item.update(open_system_class: open_system_class)
45
+
46
+ # load from constant
47
+ new_menu_item = new_menu_item.open_system_class.constantize.find_by(uuid: new_menu_item.uuid)
48
+
49
+ end
33
50
  Aro::Dom::DataBase.sync_menu_item!(new_menu_item, localized_name)
34
51
  new_menu_item
35
52
  end
@@ -45,21 +62,33 @@ class Aro::Dom::Menu < ActiveRecord::Base
45
62
  return unless is_menu_named?(:ma_ain) &&
46
63
  menu_items.empty?
47
64
 
48
- [:library, :settings, :quit].each{|k|
65
+ [:library, :open_system, :configuration, :quit].each{|k|
49
66
  i = generate_new_item(k, for_type: :system)
50
67
 
51
- i.aro_file.write!(
52
- Aro::Dom::Store.build_exec_oss_om_params!(
53
- k,
54
- Aro::Dom::Ma_ain,
55
- "exec_#{k}!"
68
+ if k == :open_system
69
+ i.aro_file.write!(
70
+ Aro::Dom::Store.build_exec_oss_om_params!(
71
+ k,
72
+ Aro::Dom::Oss_OpenSystem,
73
+ "start!",
74
+ [i.uuid],
75
+ {}
76
+ )
56
77
  )
57
- )
78
+ else
79
+ i.aro_file.write!(
80
+ Aro::Dom::Store.build_exec_oss_om_params!(
81
+ k,
82
+ Aro::Dom::Ma_ain,
83
+ "exec_#{k}!"
84
+ )
85
+ )
86
+ end
58
87
  }
59
88
  end
60
89
 
61
- def generate_settings!
62
- return unless is_menu_named?(:settings) &&
90
+ def generate_configuration!
91
+ return unless is_menu_named?(:configuration) &&
63
92
  menu_items.empty?
64
93
 
65
94
  [:cor, :git, :ssh].each{|k|
@@ -2,7 +2,7 @@
2
2
 
3
3
  =begin
4
4
 
5
- menu.rb
5
+ menu_item.rb
6
6
 
7
7
  aro dom menu item.
8
8
 
@@ -14,6 +14,8 @@ class Aro::Dom::MenuItem < ActiveRecord::Base
14
14
  include Aro::Dom::TarGoForRootSec
15
15
  include Aro::Dom::Uuid
16
16
 
17
+ self.inheritance_column = :open_system_class
18
+
17
19
  belongs_to :menu, class_name: "Aro::Dom::Menu"
18
20
 
19
21
  enum :type_flag, [
@@ -21,10 +23,6 @@ class Aro::Dom::MenuItem < ActiveRecord::Base
21
23
  :user
22
24
  ]
23
25
 
24
- def as_tty
25
- {name: localized_name, value: uuid}
26
- end
27
-
28
26
  def localized_name
29
27
  I18n.t(full_i18n_path)
30
28
  end
@@ -105,7 +103,7 @@ class Aro::Dom::MenuItem < ActiveRecord::Base
105
103
  Aro::Dom::Ma_ain.sane_backtrace!
106
104
  puts __method__
107
105
  puts inspect
108
- puts :todo_implement_invalid_action_handling
106
+ puts "todo_implement_invalid_action_handling"
109
107
  end
110
108
  end
111
109
  end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+
5
+ objecticus.rb
6
+
7
+ aro dom objecticus menu item.
8
+
9
+ by i2097i
10
+
11
+ =end
12
+
13
+
14
+ class Aro::Dom::Objecticus < Aro::Dom::Glyph
15
+ # belongs_to :menu
16
+
17
+ EXEC_METHODS = [
18
+ :open!
19
+ ]
20
+
21
+ def self.open!(objecticus_uuid, action_data = {})
22
+ objecticus_menu_item = Aro::Dom::Objecticus.find_by(uuid: objecticus_uuid)
23
+ raise "invalid objecticus_uuid #{objecticus_uuid}" if objecticus_menu_item.nil?
24
+
25
+ Aro::Dom::Oss_OpenSystem.open_projector!(objecticus_menu_item)
26
+ end
27
+
28
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+
5
+ perspecticus.rb
6
+
7
+ aro dom perspecticus menu item.
8
+
9
+ by i2097i
10
+
11
+ =end
12
+
13
+
14
+ class Aro::Dom::Perspecticus < Aro::Dom::Glyph
15
+ # belongs_to :menu
16
+
17
+ EXEC_METHODS = [
18
+ :open!
19
+ ]
20
+
21
+ def self.open!(perspecticus_uuid, action_data = {})
22
+ perspecticus_menu_item = Aro::Dom::Perspecticus.find_by(uuid: perspecticus_uuid)
23
+ raise "invalid perspecticus_uuid #{perspecticus_uuid}" if perspecticus_menu_item.nil?
24
+
25
+ Aro::Dom::Oss_OpenSystem.open_projector!(perspecticus_menu_item)
26
+ end
27
+
28
+ end
@@ -0,0 +1,201 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+
5
+ projector.rb
6
+
7
+ aro dom projector.
8
+
9
+ by i2097i
10
+
11
+ =end
12
+
13
+ # this is a set of classes that run in-memory with data from:
14
+ # the ma_ain open_system menu item's action_data (open_system_space)
15
+ # the glyph's (is kind_of menu item) action_data (glyph_action_data)
16
+ #
17
+ #
18
+ module Aro
19
+ module Dom
20
+ class Projector
21
+
22
+ DIRECTIONS = {
23
+ north: 0,
24
+ south: 1,
25
+ east: 2,
26
+ west: 3
27
+ }
28
+
29
+ DEFAULT_GLYPH = {
30
+ "direction": 0,
31
+ "position": {"x": 0, "y": 0, "z": 0},
32
+ "oss_om_type": :json_store
33
+ }
34
+
35
+ DEFAULT_SPACE = {
36
+ "perspecticus": [],
37
+ "objecticus": [],
38
+ "camera_position": {"x": 1, "y": 1, "z": 1},
39
+ "camera_rotation": {"x": 1, "y": 1, "z": 1},
40
+ }
41
+
42
+ attr_accessor :is_projecting
43
+ attr_accessor :glyph_uuid
44
+ attr_accessor :open_system_space
45
+ attr_accessor :glyph_action_data
46
+
47
+ # a projector generates and manages open_system space
48
+ # a projector projects a glyph onto a display
49
+ # a projector receives user input on behalf of the glyph
50
+ # a projector modifies the attributes of a glyph in accordance with user input
51
+
52
+ def self.valid_open_system_space_data?(data = {})
53
+ default_space_keys = Aro::Dom::Projector::DEFAULT_SPACE.keys.map{|k| k.to_s}
54
+ !data.nil? &&
55
+ !data.empty? &&
56
+ data.kind_of?(Hash) &&
57
+ (default_space_keys & data.keys).count == default_space_keys.count
58
+ end
59
+
60
+ def self.valid_open_system_glyph_data?(data = {})
61
+ default_glyph_keys = Aro::Dom::Projector::DEFAULT_GLYPH.keys.map{|k| k.to_s}
62
+ !data.nil? &&
63
+ !data.empty? &&
64
+ data.kind_of?(Hash) &&
65
+ (default_glyph_keys & data.keys).count == default_glyph_keys.count
66
+ end
67
+
68
+ def initialize(projected_from_glyph)
69
+ self.glyph_action_data = {} # initialize
70
+ self.open_system_space = {} # initialize
71
+ self.is_projecting = false
72
+ self.glyph_uuid = projected_from_glyph.uuid
73
+ reload!
74
+ end
75
+
76
+ def reload!
77
+ unless self.class.valid_open_system_glyph_data?(
78
+ glyph.open_system_action_data
79
+ )
80
+ glyph.aro_file.write!(
81
+ {
82
+ "action_data": Aro::Dom::Projector::DEFAULT_GLYPH.dup.deep_stringify_keys
83
+ }
84
+ )
85
+
86
+ glyph.store.clear_cache!
87
+ end
88
+
89
+ self.glyph_action_data = glyph.open_system_action_data.merge({uuid: glyph.uuid})
90
+
91
+ open_system_data = Aro::Dom::Oss_OpenSystem.instance.runtime_data["open_system_action_data"]
92
+
93
+ # load projector with open_system_space
94
+ if open_system_data.nil? ||
95
+ !open_system_data.kind_of?(Hash) ||
96
+ !self.class.valid_open_system_space_data?(open_system_data)
97
+
98
+ # set up default open_system_space
99
+ self.open_system_space = Aro::Dom::Projector::DEFAULT_SPACE.dup.deep_stringify_keys
100
+ else
101
+ self.open_system_space = open_system_data
102
+ end
103
+ self.open_system_space["perspecticus"] = []
104
+ self.open_system_space["objecticus"] = []
105
+ glyph.cubicus.menu_items.each{|menu_item|
106
+ # get open_system_action_data
107
+ item_data = menu_item.open_system_action_data
108
+ unless self.class.valid_open_system_glyph_data?(item_data)
109
+ # add new item to open space
110
+
111
+ menu_item.aro_file.write!({
112
+ "action_data": Aro::Dom::Projector::DEFAULT_GLYPH.dup.deep_stringify_keys
113
+ })
114
+ end
115
+
116
+ # only store the menu_item uuid references in open_system_space cubicus data
117
+ self.open_system_space[
118
+ menu_item.kind_of?(Aro::Dom::Objecticus) ? "objecticus" : "perspecticus"
119
+ ] << menu_item.open_system_action_data.merge(
120
+ {uuid: menu_item.uuid, localized_name: menu_item.localized_name}
121
+ );
122
+ }
123
+
124
+ # this writes the cubicus open_system space action_data
125
+ Aro::Dom::Oss_OpenSystem.instance.update_runtime_open_system(self.open_system_space)
126
+
127
+ end
128
+
129
+ def project!
130
+ if FDot::DISPLAY_MODES[:terminal] == FDot::Based::Interface.instance.display_mode
131
+ Aro::P.say(self.class.name)
132
+ Aro::P.say("open_system_space cannot be run in FDot::DISPLAY_MODES[:terminal] display mode!")
133
+ Aro::P.say("this must be done in the FDot::DISPLAY_MODES[:websockets] display mode.")
134
+ return
135
+ end
136
+ Aro::V.say(__method__)
137
+ self.is_projecting = true
138
+ FDot::Based::Cubicus.project_open_system(
139
+ {
140
+ open_system_space: self.open_system_space,
141
+ projected_from_data: self.glyph_action_data
142
+ },
143
+ Proc.new{|projector_input|
144
+ raise "invalid position! #{projector_input["position"]}" unless projector_input["position"].kind_of?(Hash) &&
145
+ ["x", "y", "z"].all?{|k|
146
+ projector_input["position"].keys.include?(k) &&
147
+ !projector_input["position"][k].nil?
148
+ }
149
+ if projector_input["uuid"].nil?
150
+ Aro::Dom::Oss_OpenSystem.instance.current_projector.open_system_space["camera_position"] = projector_input["position"]
151
+ Aro::Dom::Oss_OpenSystem.instance.current_projector.open_system_space["camera_rotation"] = projector_input["rotation"]
152
+ Aro::Dom::Oss_OpenSystem.instance.update_runtime_open_system(
153
+ Aro::Dom::Oss_OpenSystem.instance.current_projector.open_system_space
154
+ )
155
+ else
156
+ raise "invalid projector_input!" unless projector_input["uuid"] == Aro::Dom::Oss_OpenSystem.instance.current_projector.glyph_uuid
157
+ d = Aro::Dom::Oss_OpenSystem.instance.current_projector.glyph.open_system_action_data
158
+ d["position"] = projector_input["position"]
159
+ Aro::Dom::Oss_OpenSystem.instance.current_projector.glyph.aro_file.write!({"action_data": d})
160
+ end
161
+ Aro::Dom::Oss_OpenSystem.instance.current_projector.reload!
162
+ Aro::Dom::Oss_OpenSystem.instance.current_projector.project!
163
+ }
164
+ )
165
+
166
+ self.is_projecting = false
167
+ end
168
+
169
+ def glyph
170
+ @glyph ||= Aro::Dom::Glyph.find_by(uuid: self.glyph_uuid)
171
+ end
172
+
173
+ def direction_name
174
+ Aro::Dom::Projector::DIRECTIONS.select{|k, v| v == self.glyph_action_data["direction"]}.first[0]
175
+ end
176
+
177
+ # FDot::Based::Cubicus delegate
178
+ def current_display
179
+ (TTY::Font.new(:standard).write(
180
+ glyph.localized_name,
181
+ letter_spacing: 1
182
+ ).split("\n") + [
183
+ "the glyph is facing #{direction_name}.",
184
+ "the glyph's position is #{self.glyph_action_data["position"]}.",
185
+ ]).join("\n")
186
+ end
187
+
188
+ # FDot::Based::Cubicus delegate
189
+ def current_controls
190
+ [] # empty controls asserts keyboard movement in cubicus
191
+ end
192
+
193
+ # FDot::Based::Cubicus delegate
194
+ def respond_to_control(keyboard_event)
195
+ Aro::P.say("received #{keyboard_event} in #{__method__}")
196
+ end
197
+
198
+ end
199
+
200
+ end
201
+ end
@@ -17,11 +17,16 @@ module Aro
17
17
  EXEC_CLASSES = [
18
18
  "Aro::Cor",
19
19
  "Aro::Dom::Oss_OpenMenu",
20
+ "Aro::Dom::Oss_OpenSystem",
20
21
  "Aro::Dom::Ma_ain",
21
22
  "Aro::Dom::Library",
22
23
  "Aro::Dom::Book",
23
24
  "Aro::Dom::Git",
24
- "Aro::Dom::Ssh"
25
+ "Aro::Dom::Ssh",
26
+ "Aro::Dom::Cubicus",
27
+ "Aro::Dom::Glyph",
28
+ "Aro::Dom::Perspecticus",
29
+ "Aro::Dom::Objecticus"
25
30
  ]
26
31
 
27
32
  EXEC_METHODS = [
@@ -162,6 +167,8 @@ module Aro
162
167
  "# ignore entire '.oss_om/' directory!",
163
168
  "#{Aro::Dom::Ma_ain::ARO_DIRECTORY.to_s}/*",
164
169
  "#",
170
+ "# ignore .env file",
171
+ "*.env",
165
172
  "#"
166
173
  ].join("\n"))
167
174
  f.write("\n")
@@ -204,8 +211,8 @@ module Aro
204
211
 
205
212
  unless allow_exec_unsecure_oss_om_entries || Aro::Dom::Ma_ain.is_encrypted?
206
213
  Aro::P.say(__method__)
207
- Aro::P.say("redirecting to settings until Aro::Dom::Ma_ain.is_encrypted!")
208
- Aro::Dom::Ma_ain.exec_settings!
214
+ Aro::P.say("redirecting to configuration until Aro::Dom::Ma_ain.is_encrypted!")
215
+ Aro::Dom::Ma_ain.exec_configuration!
209
216
  return
210
217
  end
211
218
 
@@ -0,0 +1,131 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+
5
+ oss_open_system.rb
6
+
7
+ aro dom oss_open_system.
8
+
9
+ by i2097i
10
+
11
+ =end
12
+
13
+ module Aro
14
+ module Dom
15
+ class Oss_OpenSystem
16
+ include Singleton
17
+
18
+ attr_accessor :menu_item_uuid
19
+ attr_accessor :runtime_data
20
+ attr_accessor :access_validated
21
+ attr_accessor :f_dot_mutex
22
+ attr_accessor :current_projector
23
+
24
+ EXEC_METHODS = [
25
+ :start!
26
+ ]
27
+
28
+ DEFAULT_RUNTIME = {
29
+ f_dot_action_data: nil,
30
+ open_system_action_data: nil
31
+ }
32
+
33
+ def initialize
34
+ self.menu_item_uuid = nil
35
+ self.runtime_data = Aro::Dom::Oss_OpenSystem::DEFAULT_RUNTIME.dup.stringify_keys
36
+ self.f_dot_mutex = Mutex.new
37
+ self.current_projector = nil
38
+ end
39
+
40
+ def self.start!(menu_item_uuid = nil, action_data = {})
41
+ self.instance.access_validated = false
42
+ self.instance.menu_item_uuid = menu_item_uuid
43
+ menu_item = self.instance.get_menu_item
44
+
45
+ raise "invalid menu_item! #{self.instance.menu_item_uuid}" if menu_item.nil?
46
+
47
+ self.instance.runtime_data = action_data.dup
48
+
49
+ puts TTY::Font.new(:standard).write(
50
+ :open_system.to_s,
51
+ letter_spacing: 1
52
+ )
53
+
54
+ raise "invalid action data for #{menu_item.inspect}!" if action_data.nil? ||
55
+ !action_data.kind_of?(Hash)
56
+
57
+ run_f_dot_authentication!
58
+
59
+ Aro::P.say("#{self.name} f_dot access validated: #{self.instance.access_validated}")
60
+ return unless self.instance.access_validated
61
+
62
+ Aro::Dom::Ma_ain.open!(:open_system)
63
+ end
64
+
65
+ def write_runtime!
66
+ get_menu_item.aro_file.write!({
67
+ action_data: self.runtime_data
68
+ })
69
+ end
70
+
71
+ def self.run_f_dot_authentication!
72
+ write_state_callback = Proc.new{|incoming_data, validated = false|
73
+ Aro::Dom::Oss_OpenSystem.instance.f_dot_mutex.synchronize do
74
+ Aro::Dom::Oss_OpenSystem.instance.access_validated = true if validated
75
+ Aro::Dom::Oss_OpenSystem.instance.update_runtime_f_dot(incoming_data)
76
+ end
77
+ }
78
+
79
+ FDot::Based::Processor.initialize_with_data(
80
+ Aro::Mancy.root_dir,
81
+ write_state_callback,
82
+ self.instance.runtime_data["f_dot_action_data"],
83
+ true # one_move_mode
84
+ )
85
+ end
86
+
87
+ def update_runtime_open_system(action_data)
88
+ if action_data.nil? ||
89
+ !action_data.kind_of?(Hash)
90
+
91
+ raise "invalid action data for #{action_data.inspect} in #{__method__}!"
92
+ end
93
+
94
+ self.runtime_data["open_system_action_data"] = action_data
95
+
96
+ self.write_runtime!
97
+ end
98
+
99
+ def update_runtime_f_dot(action_data)
100
+ if action_data.nil? ||
101
+ !action_data.kind_of?(Hash)
102
+
103
+ raise "invalid action data for #{action_data.inspect} in #{__method__}!"
104
+ end
105
+
106
+ self.runtime_data["f_dot_action_data"] = action_data
107
+
108
+ self.write_runtime!
109
+ end
110
+
111
+ def get_menu_item
112
+ Aro::Dom::MenuItem.find_by(uuid: self.menu_item_uuid)
113
+ end
114
+
115
+ def self.open_projector!(glyph)
116
+ raise "invalid cubicus for glyph!: #{glyph}" if glyph.cubicus.nil? ||
117
+ !glyph.cubicus.kind_of?(Aro::Dom::Cubicus)
118
+
119
+ begin
120
+ self.instance.current_projector = Aro::Dom::Projector.new(glyph)
121
+ self.instance.current_projector.project!
122
+ rescue StandardError => e
123
+ Aro::P.say(Thread.main.backtrace)
124
+ Aro::P.say("open_system projection error! #{e}")
125
+ raise e
126
+ end
127
+ end
128
+
129
+ end
130
+ end
131
+ end