refactor: move command and EventHandler out of the tui module
This commit is contained in:
parent
f41fb97d02
commit
16c5471126
45 changed files with 132 additions and 81 deletions
|
@ -1,4 +1,5 @@
|
|||
const std = @import("std");
|
||||
const EventHandler = @import("EventHandler");
|
||||
|
||||
const status_widget = @import("widget.zig");
|
||||
const Widget = @import("../Widget.zig");
|
||||
|
@ -6,7 +7,7 @@ const WidgetList = @import("../WidgetList.zig");
|
|||
|
||||
pub const Style = enum { none, grip };
|
||||
|
||||
pub fn create(allocator: std.mem.Allocator, parent: Widget, config: []const u8, style: Style, event_handler: ?Widget.EventHandler) !Widget {
|
||||
pub fn create(allocator: std.mem.Allocator, parent: Widget, config: []const u8, style: Style, event_handler: ?EventHandler) !Widget {
|
||||
var w = try WidgetList.createH(allocator, parent, "statusbar", .{ .static = 1 });
|
||||
if (style == .grip) w.after_render = render_grip;
|
||||
w.ctx = w;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue