cosmos 3.4.2 → 3.5.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.
- checksums.yaml +4 -4
- data/Manifest.txt +69 -11
- data/autohotkey/config/targets/INST/cmd_tlm/inst_tlm.txt +23 -0
- data/autohotkey/tools/TestRunnerAHK5 +17 -0
- data/autohotkey/tools/TestRunnerAHK6 +17 -0
- data/autohotkey/tools/cmd_extractor.ahk +6 -0
- data/autohotkey/tools/data_viewer.ahk +6 -0
- data/autohotkey/tools/limits_monitor.ahk +67 -14
- data/autohotkey/tools/replay.ahk +6 -0
- data/autohotkey/tools/test_runner5.ahk +8 -0
- data/autohotkey/tools/test_runner6.ahk +5 -0
- data/autohotkey/tools/tlm_extractor.ahk +25 -1
- data/autohotkey/tools/tlm_grapher.ahk +6 -0
- data/cosmos.gemspec +19 -19
- data/data/crc.txt +46 -46
- data/data/critical.wav +0 -0
- data/data/information.wav +0 -0
- data/data/input.wav +0 -0
- data/data/message.wav +0 -0
- data/data/question.wav +0 -0
- data/data/warning.wav +0 -0
- data/demo/Gemfile +5 -1
- data/demo/Launcher +5 -4
- data/demo/Launcher.bat +6 -56
- data/demo/config/data/crc.txt +73 -55
- data/demo/config/system/system.txt +1 -0
- data/demo/config/targets/EXAMPLE/cmd_tlm/example_tlm.txt +2 -0
- data/demo/procedures/example_test.rb +17 -16
- data/demo/tools/CmdExtractor +6 -5
- data/demo/tools/CmdExtractor.bat +6 -56
- data/demo/tools/CmdSender +6 -5
- data/demo/tools/CmdSender.bat +6 -56
- data/demo/tools/CmdTlmServer +6 -5
- data/demo/tools/CmdTlmServer.bat +6 -56
- data/demo/tools/DataViewer +6 -5
- data/demo/tools/DataViewer.bat +6 -56
- data/demo/tools/ExampleTarget +6 -5
- data/demo/tools/ExampleTarget.bat +6 -56
- data/demo/tools/HandbookCreator +6 -5
- data/demo/tools/HandbookCreator.bat +6 -58
- data/demo/tools/Launcher +6 -5
- data/demo/tools/Launcher.bat +6 -56
- data/demo/tools/LimitsMonitor +6 -5
- data/demo/tools/LimitsMonitor.bat +6 -56
- data/demo/tools/OpenGLBuilder +6 -5
- data/demo/tools/OpenGLBuilder.bat +6 -56
- data/demo/tools/PacketViewer +6 -5
- data/demo/tools/PacketViewer.bat +6 -56
- data/demo/tools/Replay +6 -5
- data/demo/tools/Replay.bat +6 -56
- data/demo/tools/ScpiTarget +6 -5
- data/demo/tools/ScpiTarget.bat +6 -56
- data/demo/tools/ScriptRunner +6 -5
- data/demo/tools/ScriptRunner.bat +6 -56
- data/demo/tools/TableManager +6 -5
- data/demo/tools/TableManager.bat +6 -56
- data/demo/tools/TestRunner +6 -5
- data/demo/tools/TestRunner.bat +6 -56
- data/demo/tools/TlmExtractor +6 -5
- data/demo/tools/TlmExtractor.bat +6 -56
- data/demo/tools/TlmGrapher +6 -5
- data/demo/tools/TlmGrapher.bat +6 -56
- data/demo/tools/TlmViewer +6 -5
- data/demo/tools/TlmViewer.bat +6 -56
- data/demo/tools/ToolLaunch.bat +63 -0
- data/demo/tools/mac/CmdExtractor.app/Contents/MacOS/CmdExtractor.rb +6 -5
- data/demo/tools/mac/CmdExtractor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/CmdSender.app/Contents/MacOS/CmdSender.rb +6 -5
- data/demo/tools/mac/CmdSender.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/CmdTlmServer.app/Contents/MacOS/CmdTlmServer.rb +6 -5
- data/demo/tools/mac/CmdTlmServer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/DataViewer.app/Contents/MacOS/DataViewer.rb +6 -5
- data/demo/tools/mac/DataViewer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/HandbookCreator.app/Contents/MacOS/HandbookCreator.rb +6 -5
- data/demo/tools/mac/HandbookCreator.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/Launcher.app/Contents/MacOS/Launcher.rb +6 -5
- data/demo/tools/mac/Launcher.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/LimitsMonitor.app/Contents/MacOS/LimitsMonitor.rb +6 -5
- data/demo/tools/mac/LimitsMonitor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/OpenGLBuilder.app/Contents/MacOS/OpenGLBuilder.rb +6 -5
- data/demo/tools/mac/OpenGLBuilder.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/PacketViewer.app/Contents/MacOS/PacketViewer.rb +6 -5
- data/demo/tools/mac/PacketViewer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/Replay.app/Contents/MacOS/Replay.rb +6 -5
- data/demo/tools/mac/Replay.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/ScriptRunner.app/Contents/MacOS/ScriptRunner.rb +6 -5
- data/demo/tools/mac/ScriptRunner.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/TableManager.app/Contents/MacOS/TableManager.rb +6 -5
- data/demo/tools/mac/TableManager.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/TestRunner.app/Contents/MacOS/TestRunner.rb +6 -5
- data/demo/tools/mac/TestRunner.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/TlmExtractor.app/Contents/MacOS/TlmExtractor.rb +6 -5
- data/demo/tools/mac/TlmExtractor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/TlmGrapher.app/Contents/MacOS/TlmGrapher.rb +6 -5
- data/demo/tools/mac/TlmGrapher.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/mac/TlmViewer.app/Contents/MacOS/TlmViewer.rb +6 -5
- data/demo/tools/mac/TlmViewer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/demo/tools/tool_launch.rb +38 -0
- data/install/Gemfile +5 -1
- data/install/Launcher +5 -3
- data/install/Launcher.bat +6 -56
- data/install/config/data/crc.txt +67 -49
- data/install/config/tools/launcher/launcher.txt +1 -0
- data/install/tools/CmdExtractor +6 -5
- data/install/tools/CmdExtractor.bat +6 -56
- data/install/tools/CmdSender +6 -5
- data/install/tools/CmdSender.bat +6 -56
- data/install/tools/CmdTlmServer +6 -5
- data/install/tools/CmdTlmServer.bat +6 -56
- data/install/tools/DataViewer +6 -5
- data/install/tools/DataViewer.bat +6 -56
- data/install/tools/HandbookCreator +6 -5
- data/install/tools/HandbookCreator.bat +6 -58
- data/install/tools/Launcher +6 -5
- data/install/tools/Launcher.bat +6 -56
- data/install/tools/LimitsMonitor +6 -5
- data/install/tools/LimitsMonitor.bat +6 -56
- data/install/tools/OpenGLBuilder +6 -5
- data/install/tools/OpenGLBuilder.bat +6 -56
- data/install/tools/PacketViewer +6 -5
- data/install/tools/PacketViewer.bat +6 -56
- data/install/tools/Replay +6 -5
- data/install/tools/Replay.bat +6 -56
- data/install/tools/ScriptRunner +6 -5
- data/install/tools/ScriptRunner.bat +6 -56
- data/install/tools/TableManager +6 -5
- data/install/tools/TableManager.bat +6 -56
- data/install/tools/TestRunner +6 -5
- data/install/tools/TestRunner.bat +6 -56
- data/install/tools/TlmExtractor +6 -5
- data/install/tools/TlmExtractor.bat +6 -56
- data/install/tools/TlmGrapher +6 -5
- data/install/tools/TlmGrapher.bat +6 -56
- data/install/tools/TlmViewer +6 -5
- data/install/tools/TlmViewer.bat +6 -56
- data/install/tools/ToolLaunch.bat +63 -0
- data/install/tools/mac/CmdExtractor.app/Contents/MacOS/CmdExtractor.rb +6 -5
- data/install/tools/mac/CmdExtractor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/CmdSender.app/Contents/MacOS/CmdSender.rb +6 -5
- data/install/tools/mac/CmdSender.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/CmdTlmServer.app/Contents/MacOS/CmdTlmServer.rb +6 -5
- data/install/tools/mac/CmdTlmServer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/DataViewer.app/Contents/MacOS/DataViewer.rb +6 -5
- data/install/tools/mac/DataViewer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/HandbookCreator.app/Contents/MacOS/HandbookCreator.rb +6 -5
- data/install/tools/mac/HandbookCreator.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/Launcher.app/Contents/MacOS/Launcher.rb +6 -5
- data/install/tools/mac/Launcher.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/LimitsMonitor.app/Contents/MacOS/LimitsMonitor.rb +6 -5
- data/install/tools/mac/LimitsMonitor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/OpenGLBuilder.app/Contents/MacOS/OpenGLBuilder.rb +6 -5
- data/install/tools/mac/OpenGLBuilder.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/PacketViewer.app/Contents/MacOS/PacketViewer.rb +6 -5
- data/install/tools/mac/PacketViewer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/Replay.app/Contents/MacOS/Replay.rb +6 -5
- data/install/tools/mac/Replay.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/ScriptRunner.app/Contents/MacOS/ScriptRunner.rb +6 -5
- data/install/tools/mac/ScriptRunner.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/TableManager.app/Contents/MacOS/TableManager.rb +6 -5
- data/install/tools/mac/TableManager.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/TestRunner.app/Contents/MacOS/TestRunner.rb +6 -5
- data/install/tools/mac/TestRunner.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/TlmExtractor.app/Contents/MacOS/TlmExtractor.rb +6 -5
- data/install/tools/mac/TlmExtractor.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/TlmGrapher.app/Contents/MacOS/TlmGrapher.rb +6 -5
- data/install/tools/mac/TlmGrapher.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/mac/TlmViewer.app/Contents/MacOS/TlmViewer.rb +6 -5
- data/install/tools/mac/TlmViewer.app/Contents/MacOS/tool_launch.rb +38 -0
- data/install/tools/tool_launch.rb +38 -0
- data/lib/cosmos/core_ext/string.rb +3 -2
- data/lib/cosmos/gui/dialogs/about_dialog.rb +3 -7
- data/lib/cosmos/gui/dialogs/find_replace_dialog.rb +200 -136
- data/lib/cosmos/gui/opengl/gl_viewer.rb +8 -8
- data/lib/cosmos/gui/qt.rb +56 -27
- data/lib/cosmos/gui/qt_tool.rb +3 -1
- data/lib/cosmos/gui/text/ruby_editor.rb +130 -110
- data/lib/cosmos/gui/utilities/script_module_gui.rb +150 -4
- data/lib/cosmos/io/json_drb.rb +1 -1
- data/lib/cosmos/io/win32_serial_driver.rb +2 -4
- data/lib/cosmos/packet_logs/ccsds_log_reader.rb +1 -0
- data/lib/cosmos/packet_logs/packet_log_reader.rb +13 -4
- data/lib/cosmos/packets/limits.rb +6 -3
- data/lib/cosmos/packets/telemetry.rb +34 -3
- data/lib/cosmos/processors/new_packet_log_processor.rb +1 -1
- data/lib/cosmos/script/commands.rb +20 -2
- data/lib/cosmos/script/extract.rb +11 -3
- data/lib/cosmos/script/limits.rb +6 -0
- data/lib/cosmos/script/scripting.rb +17 -9
- data/lib/cosmos/system/system.rb +73 -17
- data/lib/cosmos/system/target.rb +10 -5
- data/lib/cosmos/tools/cmd_extractor/cmd_extractor.rb +1 -0
- data/lib/cosmos/tools/cmd_tlm_server/api.rb +95 -0
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +8 -4
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +55 -0
- data/lib/cosmos/tools/data_viewer/data_viewer.rb +5 -12
- data/lib/cosmos/tools/data_viewer/data_viewer_component.rb +14 -48
- data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +1 -5
- data/lib/cosmos/tools/launcher/launcher.rb +4 -0
- data/lib/cosmos/tools/launcher/launcher_config.rb +50 -0
- data/lib/cosmos/tools/launcher/launcher_tool.rb +21 -9
- data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +607 -566
- data/lib/cosmos/tools/replay/replay.rb +51 -45
- data/lib/cosmos/tools/script_runner/script_runner.rb +13 -5
- data/lib/cosmos/tools/script_runner/script_runner_frame.rb +8 -109
- data/lib/cosmos/tools/test_runner/test.rb +65 -6
- data/lib/cosmos/tools/test_runner/test_runner.rb +4 -4
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +5 -0
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_logfile_thread.rb +3 -0
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +3 -2
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer_config.rb +9 -6
- data/lib/cosmos/tools/tlm_viewer/widgets/array_widget.rb +1 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/block_widget.rb +1 -5
- data/lib/cosmos/top_level.rb +86 -3
- data/lib/cosmos/version.rb +5 -5
- data/lib/cosmos/win32/win32_main.rb +7 -1
- data/spec/packet_logs/packet_log_reader_spec.rb +67 -7
- data/spec/packets/limits_spec.rb +19 -1
- data/spec/packets/telemetry_spec.rb +44 -1
- data/spec/script/commands_spec.rb +14 -0
- data/spec/script/scripting_spec.rb +5 -1
- data/spec/script/telemetry_spec.rb +38 -3
- data/spec/system/system_spec.rb +24 -4
- data/spec/tools/cmd_tlm_server/api_spec.rb +30 -0
- data/test/benchmarks/gsub_benchmark.rb +42 -4
- data/test/benchmarks/is_a_benchmark.rb +34 -0
- data/test/performance/config/data/crc.txt +161 -171
- data/test/performance/config/system/system_packets.txt +10 -10
- data/test/performance/config/system/system_threads.txt +30 -30
- data/test/performance/config/targets/COSMOS/cmd_tlm/cosmos_server_cmds.txt +7 -2
- data/test/performance/config/targets/PACKET/cmd_tlm/packet_cmds.txt +20 -0
- data/test/performance/config/targets/PACKET/cmd_tlm/packet_tlm.txt +98 -0
- data/test/performance/config/targets/{EXAMPLE → PACKET}/cmd_tlm_server.txt +2 -2
- data/test/performance/config/targets/PACKET/lib/packet_interface.rb +22 -0
- data/test/performance/config/targets/PACKET/lib/packet_limits_response.rb +24 -0
- data/test/performance/config/targets/PACKET/screens/status.txt +25 -0
- data/test/performance/config/targets/PACKET/target.txt +28 -0
- data/test/performance/config/targets/{EXAMPLE/cmd_tlm/example_cmds.txt → THREAD/cmd_tlm/thread_cmds.txt} +1 -1
- data/test/performance/config/targets/{EXAMPLE/cmd_tlm/example_tlm.txt → THREAD/cmd_tlm/thread_tlm.txt} +1 -1
- data/test/performance/config/targets/THREAD/cmd_tlm_server.txt +6 -0
- data/test/performance/config/targets/{EXAMPLE/lib/example_interface.rb → THREAD/lib/thread_interface.rb} +1 -1
- data/test/performance/config/targets/THREAD/screens/status.txt +25 -0
- data/test/performance/config/targets/{EXAMPLE → THREAD}/target.txt +0 -0
- data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_packets.txt +24 -30
- data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_threads.txt +31 -31
- data/test/performance/config/tools/launcher/launcher_packets.txt +16 -11
- data/test/performance/config/tools/launcher/launcher_threads.txt +41 -35
- data/test/performance/config/tools/tlm_grapher/tlm_grapher.txt +204 -0
- data/test/performance/config/tools/tlm_viewer/tlm_viewer.txt +10 -38
- data/test/performance/lib/packet_target.rb +126 -0
- data/test/performance/lib/{example_target.rb → thread_target.rb} +9 -9
- data/test/performance/tools/CmdTlmServerMemProf +1 -1
- data/test/performance/tools/{ExampleTarget → PacketTarget} +2 -2
- data/test/performance/tools/{ExampleTarget.bat → PacketTarget.bat} +0 -0
- data/test/performance/tools/ThreadTarget +14 -0
- data/test/performance/tools/ThreadTarget.bat +59 -0
- data/test/performance/tools/TlmGrapherMemProf +1 -1
- data/test/performance/tools/TlmViewerMemProf +19 -0
- data/{autohotkey/tools/Replay.bat → test/performance/tools/TlmViewerMemProf.bat} +1 -1
- metadata +107 -55
- data/test/performance/lib/example_background_task.rb +0 -57
- data/test/performance/lib/scpi_target.rb +0 -74
|
@@ -532,15 +532,15 @@ module Cosmos
|
|
|
532
532
|
w[0]*@transform[0][2] + w[1]*@transform[1][2] + w[2]*@transform[2][2] + @transform[3][2]
|
|
533
533
|
end
|
|
534
534
|
|
|
535
|
+
def calc_prime(v)
|
|
536
|
+
return [v[0]*@itransform[0][0] + v[1]*@itransform[1][0] + v[2]*@itransform[2][0] + @itransform[3][0],
|
|
537
|
+
v[0]*@itransform[0][1] + v[1]*@itransform[1][1] + v[2]*@itransform[2][1] + @itransform[3][1],
|
|
538
|
+
v[0]*@itransform[0][2] + v[1]*@itransform[1][2] + v[2]*@itransform[2][2] + @itransform[3][2]]
|
|
539
|
+
end
|
|
540
|
+
|
|
535
541
|
def worldVector(fx, fy, tx, ty)
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
wfm_prime = [wfm[0]*@itransform[0][0] + wfm[1]*@itransform[1][0] + wfm[2]*@itransform[2][0] + @itransform[3][0],
|
|
539
|
-
wfm[0]*@itransform[0][1] + wfm[1]*@itransform[1][1] + wfm[2]*@itransform[2][1] + @itransform[3][1],
|
|
540
|
-
wfm[0]*@itransform[0][2] + wfm[1]*@itransform[1][2] + wfm[2]*@itransform[2][2] + @itransform[3][2]]
|
|
541
|
-
wto_prime = [wto[0]*@itransform[0][0] + wto[1]*@itransform[1][0] + wto[2]*@itransform[2][0] + @itransform[3][0],
|
|
542
|
-
wto[0]*@itransform[0][1] + wto[1]*@itransform[1][1] + wto[2]*@itransform[2][1] + @itransform[3][1],
|
|
543
|
-
wto[0]*@itransform[0][2] + wto[1]*@itransform[1][2] + wto[2]*@itransform[2][2] + @itransform[3][2]]
|
|
542
|
+
wfm_prime = calc_prime(screenToTarget(fx, fy))
|
|
543
|
+
wto_prime = calc_prime(screenToTarget(tx, ty))
|
|
544
544
|
return [wto_prime[0] - wfm_prime[0], wto_prime[1] - wfm_prime[1], wto_prime[2] - wfm_prime[2]]
|
|
545
545
|
end
|
|
546
546
|
|
data/lib/cosmos/gui/qt.rb
CHANGED
|
@@ -175,6 +175,24 @@ module Cosmos
|
|
|
175
175
|
font
|
|
176
176
|
end
|
|
177
177
|
|
|
178
|
+
# Get the default small font for the platform (Windows, Mac, Linux)
|
|
179
|
+
def self.get_default_small_font
|
|
180
|
+
if Kernel.is_windows?
|
|
181
|
+
Cosmos.getFont("courier", 9)
|
|
182
|
+
else
|
|
183
|
+
Cosmos.getFont("courier", 12)
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Get the default font for the platform (Windows, Mac, Linux)
|
|
188
|
+
def self.get_default_font
|
|
189
|
+
if Kernel.is_windows?
|
|
190
|
+
Cosmos.getFont("Courier", 10)
|
|
191
|
+
else
|
|
192
|
+
Cosmos.getFont("Courier", 14)
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
178
196
|
def self.getFontMetrics(font)
|
|
179
197
|
font_metrics = FONT_METRICS[font]
|
|
180
198
|
unless font_metrics
|
|
@@ -217,28 +235,23 @@ module Cosmos
|
|
|
217
235
|
|
|
218
236
|
# Load the applications icon
|
|
219
237
|
def self.get_icon(name, fail_blank = true)
|
|
220
|
-
icon =
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
rescue
|
|
233
|
-
# Return a blank icon if we couldn't find an icon in either the user path or cosmos path
|
|
234
|
-
if fail_blank
|
|
235
|
-
icon = Qt::Icon.new
|
|
238
|
+
icon = Qt::Icon.new(Cosmos.data_path(name))
|
|
239
|
+
icon = nil if icon.isNull && !fail_blank
|
|
240
|
+
return icon
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Try to change to a configuration in a packet log reader
|
|
244
|
+
def self.check_log_configuration(packet_log_reader, log_filename)
|
|
245
|
+
config_change_success, change_error = packet_log_reader.open(log_filename)
|
|
246
|
+
unless config_change_success
|
|
247
|
+
Qt.execute_in_main_thread(true) do
|
|
248
|
+
if change_error
|
|
249
|
+
Qt::MessageBox.warning(Qt::Application.instance.activeWindow, 'Warning', "When opening: #{log_filename}\n\nAn error occurred when changing to saved configuration:\n#{packet_log_reader.configuration_name}\n\n#{change_error.formatted}\n\nUsing default configuration")
|
|
236
250
|
else
|
|
237
|
-
|
|
251
|
+
Qt::MessageBox.warning(Qt::Application.instance.activeWindow, 'Warning', "When opening: #{log_filename}\n\nThe following saved configuration was not found:\n#{packet_log_reader.configuration_name}\n\nUsing default configuration")
|
|
238
252
|
end
|
|
239
253
|
end
|
|
240
254
|
end
|
|
241
|
-
return icon
|
|
242
255
|
end
|
|
243
256
|
end
|
|
244
257
|
|
|
@@ -268,6 +281,16 @@ class Qt::CoreApplication
|
|
|
268
281
|
end
|
|
269
282
|
#### END TEMPORARY UNTIL INCLUDED IN QTBINDINGS ####
|
|
270
283
|
|
|
284
|
+
class Qt::Icon
|
|
285
|
+
def initialize(param = nil)
|
|
286
|
+
if param
|
|
287
|
+
super(param)
|
|
288
|
+
else
|
|
289
|
+
super()
|
|
290
|
+
end
|
|
291
|
+
end
|
|
292
|
+
end
|
|
293
|
+
|
|
271
294
|
class Qt::Dialog
|
|
272
295
|
def initialize(parent = Qt::Application.activeWindow,
|
|
273
296
|
flags = (Qt::WindowTitleHint | Qt::WindowSystemMenuHint))
|
|
@@ -437,7 +460,15 @@ class Qt::LineEdit
|
|
|
437
460
|
end
|
|
438
461
|
|
|
439
462
|
class Qt::PlainTextEdit
|
|
463
|
+
BLANK = ''.freeze
|
|
464
|
+
BREAK = '<br/>'.freeze
|
|
465
|
+
AMP = '&'.freeze
|
|
466
|
+
NBSP = ' '.freeze
|
|
467
|
+
GT = '>'.freeze
|
|
468
|
+
LT = '<'.freeze
|
|
440
469
|
@@color_cache = {}
|
|
470
|
+
@@mapping = {'&'=>AMP,"\n"=>BLANK,"\s"=>NBSP,'>'=>GT,'<'=>LT}
|
|
471
|
+
@@regex = Regexp.union(@@mapping.keys)
|
|
441
472
|
|
|
442
473
|
def add_formatted_text(text, color = nil)
|
|
443
474
|
if text =~ /[\x00-\x08\x0B-\x0C\x0E-\x1F\x7F-\xFF]/
|
|
@@ -446,16 +477,16 @@ class Qt::PlainTextEdit
|
|
|
446
477
|
text << "\n"
|
|
447
478
|
end
|
|
448
479
|
if text =~ /<G>/ or color == Cosmos::GREEN
|
|
449
|
-
text.gsub!(/<G>/,
|
|
480
|
+
text.gsub!(/<G>/, BLANK)
|
|
450
481
|
addText(text, Cosmos::GREEN)
|
|
451
482
|
elsif text =~ /<Y>/ or color == Cosmos::YELLOW
|
|
452
|
-
text.gsub!(/<Y>/,
|
|
483
|
+
text.gsub!(/<Y>/, BLANK)
|
|
453
484
|
addText(text, Cosmos::YELLOW)
|
|
454
485
|
elsif text =~ /<R>/ or color == Cosmos::RED
|
|
455
|
-
text.gsub!(/<R>/,
|
|
486
|
+
text.gsub!(/<R>/, BLANK)
|
|
456
487
|
addText(text, Cosmos::RED)
|
|
457
488
|
elsif text =~ /<B>/ or color == Cosmos::BLUE
|
|
458
|
-
text.gsub!(/<B>/,
|
|
489
|
+
text.gsub!(/<B>/, BLANK)
|
|
459
490
|
addText(text, Cosmos::BLUE)
|
|
460
491
|
else
|
|
461
492
|
addText(text) # default is Cosmos::BLACK
|
|
@@ -464,7 +495,7 @@ class Qt::PlainTextEdit
|
|
|
464
495
|
|
|
465
496
|
def addText(text, color = Cosmos::BLACK)
|
|
466
497
|
@current_text ||= ''
|
|
467
|
-
@current_text << escape_text(text.chomp, color) <<
|
|
498
|
+
@current_text << escape_text(text.chomp, color) << BREAK
|
|
468
499
|
end
|
|
469
500
|
|
|
470
501
|
def flush
|
|
@@ -522,14 +553,12 @@ class Qt::PlainTextEdit
|
|
|
522
553
|
end
|
|
523
554
|
|
|
524
555
|
private
|
|
525
|
-
|
|
526
556
|
def escape_text(text, color)
|
|
557
|
+
@@color_cache[color] ||= "#%02X%02X%02X" % [color.red, color.green, color.blue]
|
|
527
558
|
# You might think gsub! would use less memory but benchmarking proves gsub
|
|
528
559
|
# with a regular express argument is the fastest and uses the least memory.
|
|
529
560
|
# However, this is still an expensive operation due to how many times it is called.
|
|
530
|
-
|
|
531
|
-
@@color_cache[color] ||= "#%02X%02X%02X" % [color.red, color.green, color.blue]
|
|
532
|
-
"<font color=\"#{@@color_cache[color]}\">#{text}</font>"
|
|
561
|
+
"<font color=\"#{@@color_cache[color]}\">#{text.gsub(@@regex,@@mapping)}</font>"
|
|
533
562
|
end
|
|
534
563
|
end
|
|
535
564
|
|
data/lib/cosmos/gui/qt_tool.rb
CHANGED
|
@@ -365,12 +365,14 @@ module Cosmos
|
|
|
365
365
|
def self.restore_io(stdout = true, stderr = true)
|
|
366
366
|
$stdout = STDOUT if stdout
|
|
367
367
|
$stderr = STDERR if stderr
|
|
368
|
+
@@redirect_io_thread_sleeper.cancel
|
|
369
|
+
Qt::CoreApplication.processEvents()
|
|
368
370
|
Cosmos.kill_thread(self, @@redirect_io_thread)
|
|
369
371
|
@@redirect_io_thread = nil
|
|
370
372
|
end
|
|
371
373
|
|
|
372
374
|
def self.graceful_kill
|
|
373
|
-
|
|
375
|
+
# Just to remove warning
|
|
374
376
|
end
|
|
375
377
|
|
|
376
378
|
end # class QtTool
|
|
@@ -16,15 +16,19 @@ require 'cosmos/gui/text/completion_text_edit'
|
|
|
16
16
|
module Cosmos
|
|
17
17
|
|
|
18
18
|
class RubyEditor < CompletionTextEdit
|
|
19
|
+
# private slot used to connect to the blockCountChanged signal
|
|
19
20
|
slots 'line_count_changed()'
|
|
21
|
+
# private slot used to connect to the updateRequest signal
|
|
20
22
|
slots 'update_line_number_area(const QRect &, int)'
|
|
23
|
+
|
|
21
24
|
signals 'breakpoint_set(int)'
|
|
22
25
|
signals 'breakpoint_cleared(int)'
|
|
23
26
|
signals 'breakpoints_cleared()'
|
|
24
27
|
|
|
25
28
|
attr_accessor :enable_breakpoints
|
|
26
29
|
|
|
27
|
-
# This works but slows down the GUI significantly when
|
|
30
|
+
# This works but slows down the GUI significantly when
|
|
31
|
+
# pasting a large (10k line) block of code into the editor
|
|
28
32
|
class RubySyntax < Qt::SyntaxHighlighter
|
|
29
33
|
# Ruby keywords - http://www.ruby-doc.org/docs/keywords/1.9/
|
|
30
34
|
# Also include some common methods that are typically called by
|
|
@@ -85,6 +89,8 @@ module Cosmos
|
|
|
85
89
|
['\bclass\b\s*(\w+)', 1, STYLES['class']],
|
|
86
90
|
# Ruby symbol
|
|
87
91
|
[':\b\w+', 0, STYLES['symbol']],
|
|
92
|
+
# Ruby namespace operator
|
|
93
|
+
['\b\w+(::\b\w+)+', 0, STYLES['class']],
|
|
88
94
|
# Ruby global
|
|
89
95
|
['\\$\b\w+', 0, STYLES['string']],
|
|
90
96
|
# A single # or a # not followed by { to the end
|
|
@@ -141,12 +147,8 @@ module Cosmos
|
|
|
141
147
|
self
|
|
142
148
|
end
|
|
143
149
|
|
|
144
|
-
def sizeHint()
|
|
145
|
-
return Qt::Size(@codeEditor.lineNumberAreaWidth(), 0)
|
|
146
|
-
end
|
|
147
|
-
|
|
148
150
|
def paintEvent(event)
|
|
149
|
-
@codeEditor.
|
|
151
|
+
@codeEditor.line_number_area_paint_event(event)
|
|
150
152
|
end
|
|
151
153
|
end
|
|
152
154
|
|
|
@@ -154,13 +156,9 @@ module Cosmos
|
|
|
154
156
|
|
|
155
157
|
def initialize(parent)
|
|
156
158
|
super(parent)
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
else
|
|
161
|
-
setFont(Cosmos.getFont("Courier", 14))
|
|
162
|
-
@fontMetrics = Cosmos.getFontMetrics(Cosmos.getFont("Courier", 14))
|
|
163
|
-
end
|
|
159
|
+
font = Cosmos.get_default_font
|
|
160
|
+
setFont(font)
|
|
161
|
+
@fontMetrics = Cosmos.getFontMetrics(font)
|
|
164
162
|
|
|
165
163
|
# This is needed so text searching highlights correctly
|
|
166
164
|
setStyleSheet("selection-background-color: lightblue; selection-color: black;")
|
|
@@ -168,7 +166,8 @@ module Cosmos
|
|
|
168
166
|
@breakpoints = []
|
|
169
167
|
@enable_breakpoints = false
|
|
170
168
|
|
|
171
|
-
# RubySyntax works but slows down the GUI significantly when
|
|
169
|
+
# RubySyntax works but slows down the GUI significantly when
|
|
170
|
+
# pasting a large (10k line) block of code into the editor
|
|
172
171
|
@syntax = RubySyntax.new(document())
|
|
173
172
|
@lineNumberArea = LineNumberArea.new(self)
|
|
174
173
|
|
|
@@ -186,46 +185,16 @@ module Cosmos
|
|
|
186
185
|
|
|
187
186
|
def context_menu(point)
|
|
188
187
|
menu = createStandardContextMenu()
|
|
189
|
-
|
|
190
|
-
menu.addSeparator()
|
|
191
|
-
|
|
192
|
-
add_breakpoint = Qt::Action.new(tr("Add Breakpoint"), self)
|
|
193
|
-
add_breakpoint.statusTip = tr("Add a breakpoint at this line")
|
|
194
|
-
add_breakpoint.connect(SIGNAL('triggered()')) { breakpoint_click(point) }
|
|
195
|
-
menu.addAction(add_breakpoint)
|
|
196
|
-
|
|
197
|
-
clear_breakpoint = Qt::Action.new(tr("Clear Breakpoint"), self)
|
|
198
|
-
clear_breakpoint.statusTip = tr("Clear an existing breakpoint at this line")
|
|
199
|
-
clear_breakpoint.connect(SIGNAL('triggered()')) { breakpoint_click(point, false) }
|
|
200
|
-
menu.addAction(clear_breakpoint)
|
|
201
|
-
|
|
202
|
-
clear_all_breakpoints = Qt::Action.new(tr("Clear All Breakpoints"), self)
|
|
203
|
-
clear_all_breakpoints.statusTip = tr("Clear all existing breakpoints")
|
|
204
|
-
clear_all_breakpoints.connect(SIGNAL('triggered()')) do
|
|
205
|
-
clear_breakpoints()
|
|
206
|
-
emit breakpoints_cleared
|
|
207
|
-
end
|
|
208
|
-
menu.addAction(clear_all_breakpoints)
|
|
209
|
-
end
|
|
210
|
-
return menu
|
|
211
|
-
end
|
|
188
|
+
return menu unless @enable_breakpoints
|
|
212
189
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
emit breakpoint_set(line)
|
|
219
|
-
end
|
|
220
|
-
else
|
|
221
|
-
if line <= document.blockCount()
|
|
222
|
-
clear_breakpoint(line)
|
|
223
|
-
emit breakpoint_cleared(line)
|
|
224
|
-
end
|
|
225
|
-
end
|
|
190
|
+
menu.addSeparator()
|
|
191
|
+
menu.addAction(create_add_breakpoint_action(point))
|
|
192
|
+
menu.addAction(create_clear_breakpoint_action(point))
|
|
193
|
+
menu.addAction(create_clear_all_breakpoints_action())
|
|
194
|
+
menu
|
|
226
195
|
end
|
|
227
196
|
|
|
228
|
-
def
|
|
197
|
+
def add_breakpoint(line)
|
|
229
198
|
@breakpoints << line
|
|
230
199
|
@lineNumberArea.repaint
|
|
231
200
|
end
|
|
@@ -242,19 +211,18 @@ module Cosmos
|
|
|
242
211
|
|
|
243
212
|
def comment_or_uncomment_lines
|
|
244
213
|
cursor = textCursor
|
|
245
|
-
|
|
246
|
-
no_selection = true
|
|
247
|
-
no_selection = false if cursor.hasSelection
|
|
214
|
+
no_selection = cursor.hasSelection ? false : true
|
|
248
215
|
|
|
249
216
|
# Start the edit block so this can be all undone with a single undo step
|
|
250
217
|
cursor.beginEditBlock
|
|
251
218
|
selection_end = cursor.selectionEnd
|
|
252
219
|
# Initially place the cursor at the beginning of the selection
|
|
253
|
-
# If nothing is selected this will just put the cursor at the beginning
|
|
220
|
+
# If nothing is selected this will just put the cursor at the beginning
|
|
221
|
+
# of the current line
|
|
254
222
|
cursor.setPosition(textCursor.selectionStart)
|
|
255
223
|
cursor.movePosition(Qt::TextCursor::StartOfLine)
|
|
256
224
|
result = true
|
|
257
|
-
while (cursor.position < selection_end
|
|
225
|
+
while (cursor.position < selection_end && result == true) || (no_selection)
|
|
258
226
|
# Check for a special comment
|
|
259
227
|
if cursor.block.text =~ /^\S*#~/
|
|
260
228
|
cursor.deleteChar
|
|
@@ -269,63 +237,27 @@ module Cosmos
|
|
|
269
237
|
# Move the cursor to the beginning of the next line
|
|
270
238
|
cursor.movePosition(Qt::TextCursor::StartOfLine)
|
|
271
239
|
result = cursor.movePosition(Qt::TextCursor::Down)
|
|
272
|
-
# If nothing was selected then
|
|
240
|
+
# If nothing was selected then its a single line so break
|
|
273
241
|
break if no_selection
|
|
274
242
|
end
|
|
275
243
|
cursor.endEditBlock
|
|
276
244
|
end
|
|
277
245
|
|
|
278
|
-
def lineNumberAreaWidth
|
|
279
|
-
digits = 1
|
|
280
|
-
my_document = document()
|
|
281
|
-
max = [1, my_document.blockCount()].max
|
|
282
|
-
|
|
283
|
-
# Figure the line number power of ten to determine how much space we need
|
|
284
|
-
while (max >= 10)
|
|
285
|
-
max /= 10
|
|
286
|
-
digits += 1
|
|
287
|
-
end
|
|
288
|
-
# We'll always display space for 5 digits so the line number area
|
|
289
|
-
# isn't constantly expanding and contracting
|
|
290
|
-
digits = 5 if digits < 5
|
|
291
|
-
digits += 1 # always allow room for a breakpoint symbol
|
|
292
|
-
# Get the font width of the character 57 ('9')
|
|
293
|
-
# times the number of digits to display
|
|
294
|
-
return (3 + @fontMetrics.width(CHAR_57) * digits)
|
|
295
|
-
end
|
|
296
|
-
|
|
297
|
-
def line_count_changed
|
|
298
|
-
setViewportMargins(lineNumberAreaWidth(), 0, 0, 0)
|
|
299
|
-
update
|
|
300
|
-
end
|
|
301
|
-
|
|
302
|
-
def update_line_number_area(rect, dy)
|
|
303
|
-
if (dy)
|
|
304
|
-
@lineNumberArea.scroll(0, dy)
|
|
305
|
-
else
|
|
306
|
-
@lineNumberArea.update(0, rect.y(), @lineNumberArea.width(), rect.height())
|
|
307
|
-
end
|
|
308
|
-
my_viewport = viewport()
|
|
309
|
-
viewport_rect = my_viewport.rect()
|
|
310
|
-
line_count_changed() if (rect.contains(viewport_rect))
|
|
311
|
-
viewport_rect.dispose
|
|
312
|
-
end
|
|
313
|
-
|
|
314
246
|
def resizeEvent(e)
|
|
315
247
|
super(e)
|
|
316
248
|
cr = self.contentsRect()
|
|
317
249
|
rect = Qt::Rect.new(cr.left(),
|
|
318
250
|
cr.top(),
|
|
319
|
-
|
|
251
|
+
line_number_area_width(),
|
|
320
252
|
cr.height())
|
|
321
253
|
@lineNumberArea.setGeometry(rect)
|
|
322
254
|
cr.dispose
|
|
323
255
|
rect.dispose
|
|
324
256
|
end
|
|
325
257
|
|
|
326
|
-
def
|
|
258
|
+
def line_number_area_paint_event(event)
|
|
327
259
|
painter = Qt::Painter.new(@lineNumberArea)
|
|
328
|
-
#
|
|
260
|
+
# Check for weird bad initialization conditions
|
|
329
261
|
if painter.isActive and not painter.paintEngine.nil?
|
|
330
262
|
event_rect = event.rect()
|
|
331
263
|
painter.fillRect(event_rect, Qt::lightGray)
|
|
@@ -333,20 +265,7 @@ module Cosmos
|
|
|
333
265
|
block = firstVisibleBlock()
|
|
334
266
|
blockNumber = block.blockNumber()
|
|
335
267
|
|
|
336
|
-
|
|
337
|
-
rect = blockBoundingGeometry(block)
|
|
338
|
-
rect2 = rect.translated(offset)
|
|
339
|
-
top = rect2.top()
|
|
340
|
-
rect3 = blockBoundingRect(block)
|
|
341
|
-
bottom = top + rect3.height()
|
|
342
|
-
offset.dispose
|
|
343
|
-
offset = nil
|
|
344
|
-
rect.dispose
|
|
345
|
-
rect = nil
|
|
346
|
-
rect2.dispose
|
|
347
|
-
rect2 = nil
|
|
348
|
-
rect3.dispose
|
|
349
|
-
rect3 = nil
|
|
268
|
+
top, bottom = block_top_and_bottom(block)
|
|
350
269
|
|
|
351
270
|
width = @lineNumberArea.width()
|
|
352
271
|
height = @fontMetrics.height()
|
|
@@ -390,6 +309,107 @@ module Cosmos
|
|
|
390
309
|
painter.dispose
|
|
391
310
|
painter = nil
|
|
392
311
|
end
|
|
312
|
+
|
|
313
|
+
private
|
|
314
|
+
|
|
315
|
+
def line_count_changed
|
|
316
|
+
setViewportMargins(line_number_area_width(), 0, 0, 0)
|
|
317
|
+
update
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
def update_line_number_area(rect, dy)
|
|
321
|
+
if (dy)
|
|
322
|
+
@lineNumberArea.scroll(0, dy)
|
|
323
|
+
else
|
|
324
|
+
@lineNumberArea.update(0, rect.y(), @lineNumberArea.width(), rect.height())
|
|
325
|
+
end
|
|
326
|
+
my_viewport = viewport()
|
|
327
|
+
viewport_rect = my_viewport.rect()
|
|
328
|
+
line_count_changed() if (rect.contains(viewport_rect))
|
|
329
|
+
viewport_rect.dispose
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
def line_number_area_width
|
|
333
|
+
digits = 1
|
|
334
|
+
my_document = document()
|
|
335
|
+
max = [1, my_document.blockCount()].max
|
|
336
|
+
|
|
337
|
+
# Figure the line number power of ten to determine how much space we need
|
|
338
|
+
while (max >= 10)
|
|
339
|
+
max /= 10
|
|
340
|
+
digits += 1
|
|
341
|
+
end
|
|
342
|
+
# We'll always display space for 5 digits so the line number area
|
|
343
|
+
# isn't constantly expanding and contracting
|
|
344
|
+
digits = 5 if digits < 5
|
|
345
|
+
digits += 1 # always allow room for a breakpoint symbol
|
|
346
|
+
# Get the font width of the character 57 ('9')
|
|
347
|
+
# times the number of digits to display
|
|
348
|
+
return (3 + @fontMetrics.width(CHAR_57) * digits)
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
def line_at_point(point)
|
|
352
|
+
line = point.y / @fontMetrics.height() + 1 +
|
|
353
|
+
firstVisibleBlock().blockNumber()
|
|
354
|
+
yield line if line <= document.blockCount()
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
def create_add_breakpoint_action(point)
|
|
358
|
+
add_breakpoint = Qt::Action.new(tr("Add Breakpoint"), self)
|
|
359
|
+
add_breakpoint.statusTip = tr("Add a breakpoint at this line")
|
|
360
|
+
add_breakpoint.connect(SIGNAL('triggered()')) do
|
|
361
|
+
line_at_point(point) do |line|
|
|
362
|
+
add_breakpoint(line)
|
|
363
|
+
emit breakpoint_set(line)
|
|
364
|
+
end
|
|
365
|
+
end
|
|
366
|
+
add_breakpoint
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
def create_clear_breakpoint_action(point)
|
|
370
|
+
clear_breakpoint = Qt::Action.new(tr("Clear Breakpoint"), self)
|
|
371
|
+
clear_breakpoint.statusTip = tr("Clear an existing breakpoint at this line")
|
|
372
|
+
clear_breakpoint.connect(SIGNAL('triggered()')) do
|
|
373
|
+
line_at_point(point) do |line|
|
|
374
|
+
clear_breakpoint(line)
|
|
375
|
+
emit breakpoint_cleared(line)
|
|
376
|
+
end
|
|
377
|
+
end
|
|
378
|
+
clear_breakpoint
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
def create_clear_all_breakpoints_action
|
|
382
|
+
clear_all_breakpoints = Qt::Action.new(tr("Clear All Breakpoints"), self)
|
|
383
|
+
clear_all_breakpoints.statusTip = tr("Clear all existing breakpoints")
|
|
384
|
+
clear_all_breakpoints.connect(SIGNAL('triggered()')) do
|
|
385
|
+
clear_breakpoints
|
|
386
|
+
emit breakpoints_cleared
|
|
387
|
+
end
|
|
388
|
+
clear_all_breakpoints
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
# Get the top and bottom coordinates of the block in viewport coordinates
|
|
392
|
+
def block_top_and_bottom(block)
|
|
393
|
+
# bounding rect of the text block in content coordinates
|
|
394
|
+
rect = blockBoundingGeometry(block)
|
|
395
|
+
offset = contentOffset() # content origin in viewport coordinates
|
|
396
|
+
# translate the rect to get visual coordinates on the viewport
|
|
397
|
+
rect2 = rect.translated(offset)
|
|
398
|
+
top = rect2.top()
|
|
399
|
+
# bounding rect in block coordinates
|
|
400
|
+
rect3 = blockBoundingRect(block)
|
|
401
|
+
bottom = top + rect3.height()
|
|
402
|
+
# Now call the destructors and set to nil to allow garbage collection
|
|
403
|
+
offset.dispose
|
|
404
|
+
offset = nil
|
|
405
|
+
rect.dispose
|
|
406
|
+
rect = nil
|
|
407
|
+
rect2.dispose
|
|
408
|
+
rect2 = nil
|
|
409
|
+
rect3.dispose
|
|
410
|
+
rect3 = nil
|
|
411
|
+
return top, bottom
|
|
412
|
+
end
|
|
393
413
|
end
|
|
394
414
|
|
|
395
415
|
end # module Cosmos
|