╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ────────╮ │src/ui/widget.zig│ ╰─────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │216 for (items) |item| { │ │217 var text_box = try wgt.TextBox.init(allocator, item.text, .{ .border_style = .hidden, .rounded_corners = true, .wrap_kind = .word });│ │218 errdefer text_box.deinit(allocator); │ │218 - text_box.getFocus().focusable = true; │ │219 + text_box.getFocus().mode = .all; │ │220 │ │221 if (item.link.len > 0) { │ │222 text_box.getFocus().kind = .{ .custom = try aa.dupe(u8, item.link) }; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │475 for (items) |item| { │ │476 var text_box = try wgt.TextBox.init(allocator, item.text, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │477 errdefer text_box.deinit(allocator); │ │477 - text_box.getFocus().focusable = true; │ │478 + text_box.getFocus().mode = .all; │ │479 │ │480 if (item.link.len > 0) { │ │481 text_box.getFocus().kind = .{ .custom = try aa.dupe(u8, item.link) }; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │744 { │ │745 var tb = try wgt.TextBox.init(allocator, content, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │746 errdefer tb.deinit(allocator); │ │746 - tb.getFocus().focusable = true; │ │747 + tb.getFocus().mode = .all; │ │748 try box.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │749 } │ │750 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │802 { │ │803 var button = try wgt.TextBox.init(allocator, label, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │804 errdefer button.deinit(allocator); │ │804 - button.getFocus().focusable = true; │ │805 + button.getFocus().mode = .all; │ │806 // the renderer distinguishes plain clickables from buttons that │ │807 // should POST to a server route by this kind. │ │808 button.getFocus().kind = .{ .custom = "submit" }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1281 if (choices.len > 1) for (choices) |choice| { │ │1282 var selector_box = try wgt.TextBox.init(allocator, choice.selector, .{ .border_style = .hidden, .wrap_kind = .none }); │ │1283 errdefer selector_box.deinit(allocator); │ │1283 - selector_box.getFocus().focusable = true; │ │1284 + selector_box.getFocus().mode = .all; │ │1285 try box.children.put(allocator, selector_box.getFocus().id, .{ .widget = .{ .text_box = selector_box }, .rect = null, .min_size = .{ .width = choice.selector.len + 2, .height = 3 } });│ │1286 }; │ │1287 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1294 .visible_width = null, │ │1295 }); │ │1296 errdefer text_input.deinit(allocator); │ │1296 - text_input.getFocus().focusable = true; │ │1297 + text_input.getFocus().mode = .all; │ │1298 try text_input.setContent(allocator, choices[0].text); │ │1299 box.getFocus().child_id = text_input.getFocus().id; │ │1300 try box.children.put(allocator, text_input.getFocus().id, .{ .widget = .{ .text_input = text_input }, .rect = null, .min_size = null, .flex = .shrink });│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │283 pub fn addTab(self: *Header, allocator: std.mem.Allocator, label: []const u8, link: []const u8, view_index: usize) !void { │ │284 var text_box = try wgt.TextBox.init(allocator, label, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │285 errdefer text_box.deinit(allocator); │ │286 - text_box.getFocus().focusable = true; │ │286 + text_box.getFocus().mode = .all; │ │287 text_box.getFocus().kind = .{ .custom = link }; │ │288 try self.tab_ids.put(allocator, text_box.getFocus().id, view_index); │ │289 try self.box.children.put(allocator, text_box.getFocus().id, .{ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │505 fn addToolButton(allocator: std.mem.Allocator, row: *wgt.Box(Widget), label: []const u8, action: []const u8) !void { │ │506 var button = try wgt.TextBox.init(allocator, label, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none }); │ │507 errdefer button.deinit(allocator); │ │508 - button.getFocus().focusable = true; │ │508 + button.getFocus().mode = .all; │ │509 button.getFocus().kind = .{ .custom = action }; │ │510 try row.children.put(allocator, button.getFocus().id, .{ .widget = .{ .text_box = button }, .rect = null, .min_size = .{ .width = try xitui.width.displayWidth(label) + 2, .height = null } });│ │511 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────╮ │591 } │ │592 │ │593 for (row.children.keys(), row.children.values()) |id, *child| {│ │594 - if (!child.widget.getFocus().focusable) continue; │ │594 + if (child.widget.getFocus().mode != .all) continue; │ │595 row.getFocus().child_id = id; │ │596 break; │ │597 } │ ╰────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │626 const back_label = try std.fmt.bufPrint(&back_label_buf, "← back to {s}", .{thread_name}); │ │627 var text_box = try wgt.TextBox.init(allocator, back_label, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none }); │ │628 errdefer text_box.deinit(allocator); │ │629 - text_box.getFocus().focusable = true; │ │629 + text_box.getFocus().mode = .all; │ │630 text_box.getFocus().kind = .{ .custom = try listLink(self.session.page_arena, self.data.identity, entryStatus(entry), "", entry.id) }; │ │631 try inner_box.children.put(allocator, text_box.getFocus().id, .{ .widget = .{ .text_box = text_box }, .rect = null, .min_size = null });│ │632 self.title_id = text_box.getFocus().id; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯