ratatui_ruby 0.5.0 β†’ 0.6.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.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/.builds/ruby-3.2.yml +1 -1
  3. data/.builds/ruby-3.3.yml +1 -1
  4. data/.builds/ruby-3.4.yml +1 -1
  5. data/.builds/ruby-4.0.0.yml +1 -1
  6. data/AGENTS.md +6 -0
  7. data/CHANGELOG.md +44 -7
  8. data/README.md +11 -4
  9. data/REUSE.toml +2 -7
  10. data/doc/application_architecture.md +84 -10
  11. data/doc/application_testing.md +75 -29
  12. data/doc/contributors/design/ruby_frontend.md +39 -3
  13. data/doc/contributors/design/rust_backend.md +1 -0
  14. data/doc/contributors/developing_examples.md +129 -44
  15. data/doc/contributors/examples_audit/p1_high.md +21 -0
  16. data/doc/contributors/examples_audit/p2_moderate.md +81 -0
  17. data/doc/contributors/examples_audit.md +41 -0
  18. data/doc/event_handling.md +11 -3
  19. data/doc/images/app_all_events.png +0 -0
  20. data/doc/images/app_color_picker.png +0 -0
  21. data/doc/images/app_login_form.png +0 -0
  22. data/doc/images/app_stateful_interaction.png +0 -0
  23. data/doc/images/verify_quickstart_dsl.png +0 -0
  24. data/doc/images/verify_quickstart_layout.png +0 -0
  25. data/doc/images/verify_quickstart_lifecycle.png +0 -0
  26. data/doc/images/verify_readme_usage.png +0 -0
  27. data/doc/images/widget_barchart_demo.png +0 -0
  28. data/doc/images/widget_block_demo.png +0 -0
  29. data/doc/images/widget_canvas_demo.png +0 -0
  30. data/doc/images/widget_cell_demo.png +0 -0
  31. data/doc/images/widget_center_demo.png +0 -0
  32. data/doc/images/widget_chart_demo.png +0 -0
  33. data/doc/images/widget_list_demo.png +0 -0
  34. data/doc/images/widget_overlay_demo.png +0 -0
  35. data/doc/images/widget_render.png +0 -0
  36. data/doc/images/widget_rich_text.png +0 -0
  37. data/doc/images/widget_scroll_text.png +0 -0
  38. data/doc/images/widget_sparkline_demo.png +0 -0
  39. data/doc/images/widget_table_demo.png +0 -0
  40. data/doc/images/widget_tabs_demo.png +0 -0
  41. data/doc/images/widget_text_width.png +0 -0
  42. data/doc/quickstart.md +69 -76
  43. data/doc/terminal_limitations.md +92 -0
  44. data/examples/app_all_events/README.md +45 -27
  45. data/examples/app_all_events/app.rb +38 -35
  46. data/examples/app_all_events/model/app_model.rb +157 -0
  47. data/examples/app_all_events/model/event_entry.rb +17 -0
  48. data/examples/app_all_events/model/msg.rb +37 -0
  49. data/examples/app_all_events/update.rb +73 -0
  50. data/examples/app_all_events/view/app_view.rb +8 -8
  51. data/examples/app_all_events/view/controls_view.rb +8 -6
  52. data/examples/app_all_events/view/counts_view.rb +12 -8
  53. data/examples/app_all_events/view/live_view.rb +8 -7
  54. data/examples/app_all_events/view/log_view.rb +10 -15
  55. data/examples/app_color_picker/README.md +84 -44
  56. data/examples/app_color_picker/app.rb +24 -62
  57. data/examples/app_color_picker/controls.rb +90 -0
  58. data/examples/app_color_picker/copy_dialog.rb +45 -49
  59. data/examples/app_color_picker/export_pane.rb +126 -0
  60. data/examples/app_color_picker/input.rb +99 -67
  61. data/examples/app_color_picker/main_container.rb +178 -0
  62. data/examples/app_color_picker/palette.rb +55 -26
  63. data/examples/app_login_form/README.md +47 -0
  64. data/examples/app_login_form/app.rb +2 -3
  65. data/examples/app_stateful_interaction/README.md +31 -0
  66. data/examples/app_stateful_interaction/app.rb +272 -0
  67. data/examples/timeout_demo.rb +43 -0
  68. data/examples/verify_quickstart_dsl/README.md +48 -0
  69. data/examples/verify_quickstart_dsl/app.rb +2 -0
  70. data/examples/verify_quickstart_layout/README.md +71 -0
  71. data/examples/verify_quickstart_layout/app.rb +2 -0
  72. data/examples/verify_quickstart_lifecycle/README.md +56 -0
  73. data/examples/verify_quickstart_lifecycle/app.rb +8 -2
  74. data/examples/verify_readme_usage/README.md +43 -0
  75. data/examples/verify_readme_usage/app.rb +8 -2
  76. data/examples/widget_barchart_demo/README.md +49 -0
  77. data/examples/widget_barchart_demo/app.rb +5 -5
  78. data/examples/widget_block_demo/README.md +34 -0
  79. data/examples/widget_block_demo/app.rb +256 -0
  80. data/examples/widget_box_demo/README.md +45 -0
  81. data/examples/widget_calendar_demo/README.md +39 -0
  82. data/examples/widget_canvas_demo/README.md +27 -0
  83. data/examples/widget_canvas_demo/app.rb +123 -0
  84. data/examples/widget_cell_demo/README.md +36 -0
  85. data/examples/widget_cell_demo/app.rb +31 -24
  86. data/examples/widget_center_demo/README.md +29 -0
  87. data/examples/widget_center_demo/app.rb +116 -0
  88. data/examples/widget_chart_demo/README.md +41 -0
  89. data/examples/widget_chart_demo/app.rb +7 -2
  90. data/examples/widget_gauge_demo/README.md +41 -0
  91. data/examples/widget_layout_split/README.md +44 -0
  92. data/examples/widget_line_gauge_demo/README.md +41 -0
  93. data/examples/widget_list_demo/README.md +49 -0
  94. data/examples/widget_list_demo/app.rb +91 -107
  95. data/examples/widget_map_demo/README.md +39 -0
  96. data/examples/{app_map_demo β†’ widget_map_demo}/app.rb +2 -2
  97. data/examples/widget_overlay_demo/app.rb +248 -0
  98. data/examples/widget_popup_demo/README.md +36 -0
  99. data/examples/widget_ratatui_logo_demo/README.md +34 -0
  100. data/examples/widget_ratatui_mascot_demo/README.md +34 -0
  101. data/examples/widget_rect/README.md +38 -0
  102. data/examples/widget_render/README.md +37 -0
  103. data/examples/widget_rich_text/README.md +35 -0
  104. data/examples/widget_rich_text/app.rb +62 -33
  105. data/examples/widget_scroll_text/README.md +37 -0
  106. data/examples/widget_scroll_text/app.rb +0 -1
  107. data/examples/widget_scrollbar_demo/README.md +37 -0
  108. data/examples/widget_sparkline_demo/README.md +42 -0
  109. data/examples/widget_sparkline_demo/app.rb +4 -3
  110. data/examples/widget_style_colors/README.md +34 -0
  111. data/examples/widget_table_demo/README.md +48 -0
  112. data/examples/{app_table_select β†’ widget_table_demo}/app.rb +46 -8
  113. data/examples/widget_tabs_demo/README.md +41 -0
  114. data/examples/widget_tabs_demo/app.rb +15 -1
  115. data/examples/widget_text_width/README.md +35 -0
  116. data/examples/widget_text_width/app.rb +106 -0
  117. data/exe/.gitkeep +0 -0
  118. data/ext/ratatui_ruby/Cargo.lock +11 -4
  119. data/ext/ratatui_ruby/Cargo.toml +2 -1
  120. data/ext/ratatui_ruby/src/events.rs +238 -26
  121. data/ext/ratatui_ruby/src/frame.rs +113 -1
  122. data/ext/ratatui_ruby/src/lib.rs +34 -4
  123. data/ext/ratatui_ruby/src/string_width.rs +101 -0
  124. data/ext/ratatui_ruby/src/terminal.rs +39 -15
  125. data/ext/ratatui_ruby/src/text.rs +1 -1
  126. data/ext/ratatui_ruby/src/widgets/barchart.rs +24 -6
  127. data/ext/ratatui_ruby/src/widgets/gauge.rs +9 -2
  128. data/ext/ratatui_ruby/src/widgets/line_gauge.rs +9 -2
  129. data/ext/ratatui_ruby/src/widgets/list.rs +179 -3
  130. data/ext/ratatui_ruby/src/widgets/list_state.rs +137 -0
  131. data/ext/ratatui_ruby/src/widgets/mod.rs +3 -0
  132. data/ext/ratatui_ruby/src/widgets/scrollbar.rs +93 -1
  133. data/ext/ratatui_ruby/src/widgets/scrollbar_state.rs +169 -0
  134. data/ext/ratatui_ruby/src/widgets/table.rs +113 -1
  135. data/ext/ratatui_ruby/src/widgets/table_state.rs +121 -0
  136. data/lib/ratatui_ruby/cell.rb +4 -4
  137. data/lib/ratatui_ruby/event/key/character.rb +35 -0
  138. data/lib/ratatui_ruby/event/key/media.rb +44 -0
  139. data/lib/ratatui_ruby/event/key/modifier.rb +95 -0
  140. data/lib/ratatui_ruby/event/key/navigation.rb +55 -0
  141. data/lib/ratatui_ruby/event/key/system.rb +45 -0
  142. data/lib/ratatui_ruby/event/key.rb +111 -51
  143. data/lib/ratatui_ruby/event/mouse.rb +3 -3
  144. data/lib/ratatui_ruby/event/paste.rb +1 -1
  145. data/lib/ratatui_ruby/frame.rb +96 -0
  146. data/lib/ratatui_ruby/list_state.rb +88 -0
  147. data/lib/ratatui_ruby/schema/bar_chart/bar.rb +2 -2
  148. data/lib/ratatui_ruby/schema/cursor.rb +5 -0
  149. data/lib/ratatui_ruby/schema/gauge.rb +3 -1
  150. data/lib/ratatui_ruby/schema/line_gauge.rb +2 -2
  151. data/lib/ratatui_ruby/schema/list.rb +25 -4
  152. data/lib/ratatui_ruby/schema/list_item.rb +41 -0
  153. data/lib/ratatui_ruby/schema/rect.rb +43 -0
  154. data/lib/ratatui_ruby/schema/style.rb +24 -4
  155. data/lib/ratatui_ruby/schema/table.rb +21 -3
  156. data/lib/ratatui_ruby/schema/text.rb +69 -1
  157. data/lib/ratatui_ruby/scrollbar_state.rb +112 -0
  158. data/lib/ratatui_ruby/session/autodoc.rb +65 -0
  159. data/lib/ratatui_ruby/session.rb +22 -7
  160. data/lib/ratatui_ruby/table_state.rb +90 -0
  161. data/lib/ratatui_ruby/test_helper/event_injection.rb +169 -0
  162. data/lib/ratatui_ruby/test_helper/snapshot.rb +390 -0
  163. data/lib/ratatui_ruby/test_helper/style_assertions.rb +351 -0
  164. data/lib/ratatui_ruby/test_helper/terminal.rb +127 -0
  165. data/lib/ratatui_ruby/test_helper/test_doubles.rb +68 -0
  166. data/lib/ratatui_ruby/test_helper.rb +65 -358
  167. data/lib/ratatui_ruby/version.rb +1 -1
  168. data/lib/ratatui_ruby.rb +42 -19
  169. data/sig/examples/app_stateful_interaction/app.rbs +33 -0
  170. data/sig/examples/widget_block_demo/app.rbs +32 -0
  171. data/sig/examples/{app_map_demo β†’ widget_map_demo}/app.rbs +2 -2
  172. data/sig/examples/{app_table_select β†’ widget_table_demo}/app.rbs +2 -2
  173. data/sig/examples/{widget_table_flex β†’ widget_text_width}/app.rbs +2 -3
  174. data/sig/ratatui_ruby/event.rbs +11 -1
  175. data/sig/ratatui_ruby/frame.rbs +2 -0
  176. data/sig/ratatui_ruby/list_state.rbs +13 -0
  177. data/sig/ratatui_ruby/ratatui_ruby.rbs +2 -2
  178. data/sig/ratatui_ruby/schema/bar_chart/bar.rbs +3 -3
  179. data/sig/ratatui_ruby/schema/gauge.rbs +2 -2
  180. data/sig/ratatui_ruby/schema/line_gauge.rbs +2 -2
  181. data/sig/ratatui_ruby/schema/list.rbs +4 -2
  182. data/sig/ratatui_ruby/schema/list_item.rbs +10 -0
  183. data/sig/ratatui_ruby/schema/rect.rbs +3 -0
  184. data/sig/ratatui_ruby/schema/style.rbs +3 -3
  185. data/sig/ratatui_ruby/schema/table.rbs +3 -1
  186. data/sig/ratatui_ruby/schema/text.rbs +8 -6
  187. data/sig/ratatui_ruby/scrollbar_state.rbs +18 -0
  188. data/sig/ratatui_ruby/session.rbs +13 -0
  189. data/sig/ratatui_ruby/table_state.rbs +15 -0
  190. data/sig/ratatui_ruby/test_helper/event_injection.rbs +16 -0
  191. data/sig/ratatui_ruby/test_helper/snapshot.rbs +12 -0
  192. data/sig/ratatui_ruby/test_helper/style_assertions.rbs +64 -0
  193. data/sig/ratatui_ruby/test_helper/terminal.rbs +14 -0
  194. data/sig/ratatui_ruby/test_helper/test_doubles.rbs +22 -0
  195. data/sig/ratatui_ruby/test_helper.rbs +5 -4
  196. data/tasks/autodoc/examples.rb +79 -0
  197. data/tasks/autodoc/inventory.rb +9 -7
  198. data/tasks/autodoc.rake +11 -5
  199. data/tasks/bump/changelog.rb +3 -3
  200. data/tasks/bump/links.rb +67 -0
  201. data/tasks/sourcehut.rake +61 -21
  202. data/tasks/terminal_preview/app_screenshot.rb +13 -3
  203. data/tasks/terminal_preview/saved_screenshot.rb +4 -3
  204. metadata +111 -37
  205. data/doc/images/app_table_select.png +0 -0
  206. data/doc/images/widget_block_padding.png +0 -0
  207. data/doc/images/widget_block_titles.png +0 -0
  208. data/doc/images/widget_list_styles.png +0 -0
  209. data/examples/app_all_events/model/events.rb +0 -180
  210. data/examples/app_all_events/model/highlight.rb +0 -57
  211. data/examples/app_all_events/test/snapshots/after_focus_lost.txt +0 -24
  212. data/examples/app_all_events/test/snapshots/after_focus_regained.txt +0 -24
  213. data/examples/app_all_events/test/snapshots/after_horizontal_resize.txt +0 -24
  214. data/examples/app_all_events/test/snapshots/after_key_a.txt +0 -24
  215. data/examples/app_all_events/test/snapshots/after_key_ctrl_x.txt +0 -24
  216. data/examples/app_all_events/test/snapshots/after_mouse_click.txt +0 -24
  217. data/examples/app_all_events/test/snapshots/after_mouse_drag.txt +0 -24
  218. data/examples/app_all_events/test/snapshots/after_multiple_events.txt +0 -24
  219. data/examples/app_all_events/test/snapshots/after_paste.txt +0 -24
  220. data/examples/app_all_events/test/snapshots/after_resize.txt +0 -24
  221. data/examples/app_all_events/test/snapshots/after_right_click.txt +0 -24
  222. data/examples/app_all_events/test/snapshots/after_vertical_resize.txt +0 -24
  223. data/examples/app_all_events/test/snapshots/initial_state.txt +0 -24
  224. data/examples/app_all_events/view_state.rb +0 -42
  225. data/examples/app_color_picker/scene.rb +0 -201
  226. data/examples/widget_block_padding/app.rb +0 -67
  227. data/examples/widget_block_titles/app.rb +0 -69
  228. data/examples/widget_list_styles/app.rb +0 -141
  229. data/examples/widget_table_flex/app.rb +0 -95
  230. data/sig/examples/widget_block_padding/app.rbs +0 -11
  231. data/sig/examples/widget_block_titles/app.rbs +0 -11
  232. data/sig/examples/widget_list_styles/app.rbs +0 -11
  233. data/tasks/bump/comparison_links.rb +0 -41
  234. /data/doc/images/{app_map_demo.png β†’ widget_map_demo.png} +0 -0
@@ -1,180 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
- # SPDX-License-Identifier: AGPL-3.0-or-later
5
-
6
- require_relative "timestamp"
7
- require_relative "event_color_cycle"
8
- require_relative "event_entry"
9
-
10
- # Manages the history and state of all application events.
11
- #
12
- # Applications need to track, count, and display event history for debugging and feedback.
13
- # Direct management of event arrays and counters across the app leads to scattered state.
14
- #
15
- # This class centralizes event storage. It records new events, maintains counts, and manages temporary highlights.
16
- #
17
- # Use it to store key presses, mouse clicks, and window resizes for display in a log or counter.
18
- #
19
- # === Examples
20
- #
21
- # events = Events.new
22
- # events.record(key_event)
23
- # puts events.count(:key) #=> 1
24
- #
25
- # if events.lit?(:key)
26
- # puts "Key event just happened!"
27
- # end
28
- class Events
29
- # Duration in milliseconds for an event to remain highlighted in the UI.
30
- HIGHLIGHT_DURATION_MS = 300
31
-
32
- # Creates a new Events manager.
33
- def initialize
34
- @entries = []
35
- @color_cycle = EventColorCycle.new
36
- @none_count = 0
37
- @lit_type = nil
38
- @lit_until = Timestamp.now
39
- @live = {}
40
- end
41
-
42
- # Records a new event.
43
- #
44
- # [event] RatatuiRuby::Event object.
45
- # [context] Hash of additional context (e.g., last_dimensions).
46
- #
47
- # === Example
48
- #
49
- # events.record(mouse_event)
50
- def record(event, context: {})
51
- if event.is_a?(RatatuiRuby::Event::None) || event == :none
52
- @none_count += 1
53
- return
54
- end
55
-
56
- color = @color_cycle.next_color
57
- timestamp = Timestamp.now
58
- entry = EventEntry.create(event, color, timestamp)
59
- @entries << entry
60
- update_lit_type(entry)
61
-
62
- display_type = live_type_for(entry.type)
63
- @live[display_type] = { time: Time.now, description: entry.description }
64
- end
65
-
66
- private def live_type_for(type)
67
- case type
68
- when :focus_gained, :focus_lost
69
- :focus
70
- else
71
- type
72
- end
73
- end
74
-
75
- # Returns the most recent live event data for a type.
76
- #
77
- # [type] Symbol event type to look up.
78
- #
79
- # === Example
80
- #
81
- # events.live_event(:key) #=> { time: ..., description: "..." }
82
- def live_event(type)
83
- @live[type]
84
- end
85
-
86
- # Returns all recorded live event data.
87
- #
88
- # === Example
89
- #
90
- # events.live_events #=> { key: { ... }, mouse: { ... } }
91
- def live_events
92
- @live
93
- end
94
-
95
- # Returns the most recent entries up to the given limit.
96
- #
97
- # [max_entries] Integer maximum number of entries to return.
98
- #
99
- # === Example
100
- #
101
- # events.visible(10) #=> [#<EventEntry ...>, ...]
102
- def visible(max_entries)
103
- @entries.last(max_entries)
104
- end
105
-
106
- # Checks if any events have been recorded.
107
- #
108
- # === Example
109
- #
110
- # events.empty? #=> true
111
- def empty?
112
- @entries.empty?
113
- end
114
-
115
- # Returns the count of events for a type.
116
- #
117
- # [type] Symbol event type.
118
- #
119
- # === Example
120
- #
121
- # events.count(:key) #=> 5
122
- def count(type)
123
- return @none_count if type == :none
124
-
125
- @entries.count { |e| e.matches_type?(type) }
126
- end
127
-
128
- # Returns counts grouped by subtype (kind or modifier status).
129
- #
130
- # [type] Symbol event type.
131
- #
132
- # === Example
133
- #
134
- # events.sub_counts(:mouse) #=> { "down" => 1, "up" => 2 }
135
- def sub_counts(type)
136
- return {} if type == :none
137
-
138
- entries = @entries.select { |e| e.matches_type?(type) }
139
-
140
- defaults = { key: %w[unmodified modified], focus: %w[gained lost], mouse: %w[down up drag moved scroll_up scroll_down] }
141
- entries.each_with_object(defaults.fetch(type, []).to_h { |k| [k, 0] }) do |entry, counts|
142
- group = if entry.event.respond_to?(:kind)
143
- entry.event.kind.to_s
144
- elsif entry.event.respond_to?(:modifiers)
145
- entry.event.modifiers.empty? ? "unmodified" : "modified"
146
- elsif type == :focus
147
- entry.type.to_s.sub("focus_", "")
148
- end
149
-
150
- counts[group] += 1 if group
151
- end
152
- end
153
-
154
- # Checks if a type should be highlighted.
155
- #
156
- # [type] Symbol event type.
157
- #
158
- # === Example
159
- #
160
- # events.lit?(:key) #=> true
161
- def lit?(type)
162
- return false if Timestamp.now.milliseconds >= @lit_until.milliseconds
163
-
164
- @lit_type == type
165
- end
166
-
167
- # Returns all event entries.
168
- #
169
- # === Example
170
- #
171
- # events.entries #=> [#<EventEntry ...>, ...]
172
- def entries
173
- @entries
174
- end
175
-
176
- private def update_lit_type(entry)
177
- @lit_type = live_type_for(entry.type)
178
- @lit_until = Timestamp.new(milliseconds: Timestamp.now.milliseconds + HIGHLIGHT_DURATION_MS)
179
- end
180
- end
@@ -1,57 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
- # SPDX-License-Identifier: AGPL-3.0-or-later
5
-
6
- require_relative "timestamp"
7
-
8
- # Manages temporary visual highlights for different event types.
9
- #
10
- # Users need visual feedback when an event occurs, but highlights should fade.
11
- # Manually tracking timers for every highlightable element is complex.
12
- #
13
- # This class manages the "lit" state of multiple keys with a consistent duration.
14
- #
15
- # Use it to trigger and check for temporary UI highlights.
16
- #
17
- # === Examples
18
- #
19
- # highlight = Highlight.new
20
- # highlight.light_up(:key)
21
- # highlight.lit?(:key) #=> true
22
- # sleep(0.4)
23
- # highlight.lit?(:key) #=> false
24
- class Highlight
25
- # Duration in milliseconds that a highlight remains active.
26
- DURATION_MS = 300
27
-
28
- # Creates a new Highlight manager.
29
- def initialize
30
- @lit_types = {}
31
- end
32
-
33
- # Triggers a highlight for the given type.
34
- #
35
- # [type] Symbol to highlight.
36
- #
37
- # === Example
38
- #
39
- # highlight.light_up(:mouse)
40
- def light_up(type)
41
- @lit_types[type] = Timestamp.now
42
- end
43
-
44
- # Checks if a highlight is currently active for the given type.
45
- #
46
- # [type] Symbol to check.
47
- #
48
- # === Example
49
- #
50
- # highlight.lit?(:mouse) #=> true
51
- def lit?(type)
52
- timestamp = @lit_types[type]
53
- return false unless timestamp
54
-
55
- !timestamp.elapsed?(DURATION_MS)
56
- end
57
- end
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 0 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 0 β”‚ β”‚Key β€” β€” β”‚
4
- β”‚ Modified: 0 β”‚ β”‚Mouse β€” β€” β”‚
5
- β”‚Mouse: 0 β”‚ β”‚Resize β€” β€” β”‚
6
- β”‚ Down: 0 β”‚ β”‚Paste β€” β€” β”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus XX:XX:XX #<RatatuiRuby::Event::FocusLost:0xXXXXXXβ”‚
8
- β”‚ Drag: 0 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚#<RatatuiRuby::Event::FocusLost:0xXXXXXX> β”‚
12
- β”‚Resize: 0 β”‚ β”‚ β”‚
13
- β”‚Paste: 0 β”‚ β”‚ β”‚
14
- β”‚Focus: 1 β”‚ β”‚ β”‚
15
- β”‚ Gained: 0 β”‚ β”‚ β”‚
16
- β”‚ Lost: 1 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚ β”‚
18
- β”‚ β”‚ β”‚ β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 0 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 0 β”‚ β”‚Key β€” β€” β”‚
4
- β”‚ Modified: 0 β”‚ β”‚Mouse β€” β€” β”‚
5
- β”‚Mouse: 0 β”‚ β”‚Resize β€” β€” β”‚
6
- β”‚ Down: 0 β”‚ β”‚Paste β€” β€” β”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus XX:XX:XX #<RatatuiRuby::Event::FocusGained:0xXXXXXXβ”‚
8
- β”‚ Drag: 0 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚#<RatatuiRuby::Event::FocusLost:0xXXXXXX> β”‚
12
- β”‚Resize: 0 β”‚ β”‚ β”‚
13
- β”‚Paste: 0 β”‚ β”‚#<RatatuiRuby::Event::FocusGained:0xXXXXXX> β”‚
14
- β”‚Focus: 2 β”‚ β”‚ β”‚
15
- β”‚ Gained: 1 β”‚ β”‚ β”‚
16
- β”‚ Lost: 1 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚ β”‚
18
- β”‚ β”‚ β”‚ β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 0 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 0 β”‚ β”‚Key β€” β€” β”‚
4
- β”‚ Modified: 0 β”‚ β”‚Mouse β€” β€” β”‚
5
- β”‚Mouse: 0 β”‚ β”‚Resize XX:XX:XX #<RatatuiRuby::Event::Resize:0xXXXXXXβ”‚
6
- β”‚ Down: 0 β”‚ β”‚Paste β€” β€” β”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus β€” β€” β”‚
8
- β”‚ Drag: 0 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚#<RatatuiRuby::Event::Resize:0xXXXXXX β”‚
12
- β”‚Resize: 1 β”‚ β”‚@width=100, @height=24> β”‚
13
- β”‚Paste: 0 β”‚ β”‚ β”‚
14
- β”‚Focus: 0 β”‚ β”‚ β”‚
15
- β”‚ Gained: 0 β”‚ β”‚ β”‚
16
- β”‚ Lost: 0 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚ β”‚
18
- β”‚ β”‚ β”‚ β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 1 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 1 β”‚ β”‚Key XX:XX:XX #<RatatuiRuby::Event::Key code="a" modβ”‚
4
- β”‚ Modified: 0 β”‚ β”‚Mouse β€” β€” β”‚
5
- β”‚Mouse: 0 β”‚ β”‚Resize β€” β€” β”‚
6
- β”‚ Down: 0 β”‚ β”‚Paste β€” β€” β”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus β€” β€” β”‚
8
- β”‚ Drag: 0 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚#<RatatuiRuby::Event::Key code="a" modifiers=[]> β”‚
12
- β”‚Resize: 0 β”‚ β”‚ β”‚
13
- β”‚Paste: 0 β”‚ β”‚ β”‚
14
- β”‚Focus: 0 β”‚ β”‚ β”‚
15
- β”‚ Gained: 0 β”‚ β”‚ β”‚
16
- β”‚ Lost: 0 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚ β”‚
18
- β”‚ β”‚ β”‚ β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 1 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 0 β”‚ β”‚Key XX:XX:XX #<RatatuiRuby::Event::Key code="x" modβ”‚
4
- β”‚ Modified: 1 β”‚ β”‚Mouse β€” β€” β”‚
5
- β”‚Mouse: 0 β”‚ β”‚Resize β€” β€” β”‚
6
- β”‚ Down: 0 β”‚ β”‚Paste β€” β€” β”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus β€” β€” β”‚
8
- β”‚ Drag: 0 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚#<RatatuiRuby::Event::Key code="x" modifiers=["ctrl"]> β”‚
12
- β”‚Resize: 0 β”‚ β”‚ β”‚
13
- β”‚Paste: 0 β”‚ β”‚ β”‚
14
- β”‚Focus: 0 β”‚ β”‚ β”‚
15
- β”‚ Gained: 0 β”‚ β”‚ β”‚
16
- β”‚ Lost: 0 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚ β”‚
18
- β”‚ β”‚ β”‚ β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 0 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 0 β”‚ β”‚Key β€” β€” β”‚
4
- β”‚ Modified: 0 β”‚ β”‚Mouse XX:XX:XX #<RatatuiRuby::Event::Mouse:0xXXXXXXβ”‚
5
- β”‚Mouse: 1 β”‚ β”‚Resize β€” β€” β”‚
6
- β”‚ Down: 1 β”‚ β”‚Paste β€” β€” β”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus β€” β€” β”‚
8
- β”‚ Drag: 0 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚#<RatatuiRuby::Event::Mouse:0xXXXXXX β”‚
12
- β”‚Resize: 0 β”‚ β”‚@kind="down", @x=40, @y=12, @button="left", β”‚
13
- β”‚Paste: 0 β”‚ β”‚@modifiers=[]> β”‚
14
- β”‚Focus: 0 β”‚ β”‚ β”‚
15
- β”‚ Gained: 0 β”‚ β”‚ β”‚
16
- β”‚ Lost: 0 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚ β”‚
18
- β”‚ β”‚ β”‚ β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 0 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 0 β”‚ β”‚Key β€” β€” β”‚
4
- β”‚ Modified: 0 β”‚ β”‚Mouse XX:XX:XX #<RatatuiRuby::Event::Mouse:0xXXXXXXβ”‚
5
- β”‚Mouse: 1 β”‚ β”‚Resize β€” β€” β”‚
6
- β”‚ Down: 0 β”‚ β”‚Paste β€” β€” β”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus β€” β€” β”‚
8
- β”‚ Drag: 1 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚#<RatatuiRuby::Event::Mouse:0xXXXXXX β”‚
12
- β”‚Resize: 0 β”‚ β”‚@kind="drag", @x=25, @y=8, @button="left", @modifiers=[]>β”‚
13
- β”‚Paste: 0 β”‚ β”‚ β”‚
14
- β”‚Focus: 0 β”‚ β”‚ β”‚
15
- β”‚ Gained: 0 β”‚ β”‚ β”‚
16
- β”‚ Lost: 0 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚ β”‚
18
- β”‚ β”‚ β”‚ β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 3 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 3 β”‚ β”‚Key XX:XX:XX #<RatatuiRuby::Event::Key code="c" modβ”‚
4
- β”‚ Modified: 0 β”‚ β”‚Mouse XX:XX:XX #<RatatuiRuby::Event::Mouse:0xXXXXXXβ”‚
5
- β”‚Mouse: 1 β”‚ β”‚Resize β€” β€” β”‚
6
- β”‚ Down: 1 β”‚ β”‚Paste β€” β€” β”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus β€” β€” β”‚
8
- β”‚ Drag: 0 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚#<RatatuiRuby::Event::Key code="a" modifiers=[]> β”‚
12
- β”‚Resize: 0 β”‚ β”‚ β”‚
13
- β”‚Paste: 0 β”‚ β”‚#<RatatuiRuby::Event::Key code="b" modifiers=[]> β”‚
14
- β”‚Focus: 0 β”‚ β”‚ β”‚
15
- β”‚ Gained: 0 β”‚ β”‚#<RatatuiRuby::Event::Key code="c" modifiers=[]> β”‚
16
- β”‚ Lost: 0 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚#<RatatuiRuby::Event::Mouse:0xXXXXXX β”‚
18
- β”‚ β”‚ β”‚@kind="down", @x=10, @y=5, @button="left", @modifiers=[]>β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 0 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 0 β”‚ β”‚Key β€” β€” β”‚
4
- β”‚ Modified: 0 β”‚ β”‚Mouse β€” β€” β”‚
5
- β”‚Mouse: 0 β”‚ β”‚Resize β€” β€” β”‚
6
- β”‚ Down: 0 β”‚ β”‚Paste XX:XX:XX #<RatatuiRuby::Event::Paste:0xXXXXXXβ”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus β€” β€” β”‚
8
- β”‚ Drag: 0 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚#<RatatuiRuby::Event::Paste:0xXXXXXX β”‚
12
- β”‚Resize: 0 β”‚ β”‚@content="Hello World"> β”‚
13
- β”‚Paste: 1 β”‚ β”‚ β”‚
14
- β”‚Focus: 0 β”‚ β”‚ β”‚
15
- β”‚ Gained: 0 β”‚ β”‚ β”‚
16
- β”‚ Lost: 0 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚ β”‚
18
- β”‚ β”‚ β”‚ β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 0 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 0 β”‚ β”‚Key β€” β€” β”‚
4
- β”‚ Modified: 0 β”‚ β”‚Mouse β€” β€” β”‚
5
- β”‚Mouse: 0 β”‚ β”‚Resize XX:XX:XX #<RatatuiRuby::Event::Resize:0xXXXXXXβ”‚
6
- β”‚ Down: 0 β”‚ β”‚Paste β€” β€” β”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus β€” β€” β”‚
8
- β”‚ Drag: 0 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚#<RatatuiRuby::Event::Resize:0xXXXXXX β”‚
12
- β”‚Resize: 1 β”‚ β”‚@width=100, @height=30> β”‚
13
- β”‚Paste: 0 β”‚ β”‚ β”‚
14
- β”‚Focus: 0 β”‚ β”‚ β”‚
15
- β”‚ Gained: 0 β”‚ β”‚ β”‚
16
- β”‚ Lost: 0 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚ β”‚
18
- β”‚ β”‚ β”‚ β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 0 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 0 β”‚ β”‚Key β€” β€” β”‚
4
- β”‚ Modified: 0 β”‚ β”‚Mouse XX:XX:XX #<RatatuiRuby::Event::Mouse:0xXXXXXXβ”‚
5
- β”‚Mouse: 1 β”‚ β”‚Resize β€” β€” β”‚
6
- β”‚ Down: 1 β”‚ β”‚Paste β€” β€” β”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus β€” β€” β”‚
8
- β”‚ Drag: 0 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚#<RatatuiRuby::Event::Mouse:0xXXXXXX β”‚
12
- β”‚Resize: 0 β”‚ β”‚@kind="down", @x=50, @y=10, @button="right", β”‚
13
- β”‚Paste: 0 β”‚ β”‚@modifiers=[]> β”‚
14
- β”‚Focus: 0 β”‚ β”‚ β”‚
15
- β”‚ Gained: 0 β”‚ β”‚ β”‚
16
- β”‚ Lost: 0 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚ β”‚
18
- β”‚ β”‚ β”‚ β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 0 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 0 β”‚ β”‚Key β€” β€” β”‚
4
- β”‚ Modified: 0 β”‚ β”‚Mouse β€” β€” β”‚
5
- β”‚Mouse: 0 β”‚ β”‚Resize XX:XX:XX #<RatatuiRuby::Event::Resize:0xXXXXXXβ”‚
6
- β”‚ Down: 0 β”‚ β”‚Paste β€” β€” β”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus β€” β€” β”‚
8
- β”‚ Drag: 0 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚#<RatatuiRuby::Event::Resize:0xXXXXXX β”‚
12
- β”‚Resize: 1 β”‚ β”‚@width=80, @height=30> β”‚
13
- β”‚Paste: 0 β”‚ β”‚ β”‚
14
- β”‚Focus: 0 β”‚ β”‚ β”‚
15
- β”‚ Gained: 0 β”‚ β”‚ β”‚
16
- β”‚ Lost: 0 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚ β”‚
18
- β”‚ β”‚ β”‚ β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,24 +0,0 @@
1
- β”ŒEvent Counts──────┐ β”ŒLive Display─────────────────────────────────────────────┐
2
- β”‚Key: 0 β”‚ β”‚Type Time Description β”‚
3
- β”‚ Unmodified: 0 β”‚ β”‚Key β€” β€” β”‚
4
- β”‚ Modified: 0 β”‚ β”‚Mouse β€” β€” β”‚
5
- β”‚Mouse: 0 β”‚ β”‚Resize β€” β€” β”‚
6
- β”‚ Down: 0 β”‚ β”‚Paste β€” β€” β”‚
7
- β”‚ Up: 0 β”‚ β”‚Focus β€” β€” β”‚
8
- β”‚ Drag: 0 β”‚ β”‚ β”‚
9
- β”‚ Moved: 0 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10
- β”‚ Scroll_up: 0 β”‚ β”ŒEvent Log────────────────────────────────────────────────┐
11
- β”‚ Scroll_down: 0 β”‚ β”‚No events yet... β”‚
12
- β”‚Resize: 0 β”‚ β”‚ β”‚
13
- β”‚Paste: 0 β”‚ β”‚ β”‚
14
- β”‚Focus: 0 β”‚ β”‚ β”‚
15
- β”‚ Gained: 0 β”‚ β”‚ β”‚
16
- β”‚ Lost: 0 β”‚ β”‚ β”‚
17
- β”‚None: 0 β”‚ β”‚ β”‚
18
- β”‚ β”‚ β”‚ β”‚
19
- β”‚ β”‚ β”‚ β”‚
20
- β”‚ β”‚ β”‚ β”‚
21
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
22
- β”ŒControls──────────────────────────────────────────────────────────────────────┐
23
- β”‚q: Quit Ctrl+C: Quit β”‚
24
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@@ -1,42 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
4
- # SPDX-License-Identifier: AGPL-3.0-or-later
5
-
6
- # Encapsulates all data required to render the application view.
7
- #
8
- # Views need access to models, global settings, and calculated styles.
9
- # Passing dozens of individual parameters to view components is messy and unmaintainable.
10
- #
11
- # This class provides a single, structured object containing all state necessary for rendering.
12
- #
13
- # Use it to shuttle data from the main application to the various view components.
14
- #
15
- # === Examples
16
- #
17
- # state = ViewState.build(events, true, tui, nil)
18
- # puts state.focused #=> true
19
- # app_view.call(state, tui, frame, area)
20
- class ViewState < Data.define(:events, :focused, :hotkey_style, :dimmed_style, :lit_style, :border_color, :area)
21
- # Builds a new ViewState with calculated styles.
22
- #
23
- # [events] Events model instance.
24
- # [focused] Boolean indicating if the app has focus.
25
- # [tui] RatatuiRuby instance for style creation.
26
- # [_resize_sub_counter] Unused parameter (reserved for future use).
27
- #
28
- # === Example
29
- #
30
- # ViewState.build(events, true, tui, nil) #=> #<ViewState ...>
31
- def self.build(events, focused, tui, _resize_sub_counter)
32
- new(
33
- events:,
34
- focused:,
35
- hotkey_style: tui.style(modifiers: [:bold, :underlined]),
36
- dimmed_style: tui.style(fg: :dark_gray),
37
- lit_style: tui.style(fg: :green, modifiers: [:bold]),
38
- border_color: focused ? :green : :gray,
39
- area: nil
40
- )
41
- end
42
- end