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
|
@ -3,14 +3,15 @@ const Allocator = std.mem.Allocator;
|
|||
|
||||
const Plane = @import("renderer").Plane;
|
||||
const style = @import("renderer").style;
|
||||
const command = @import("command");
|
||||
const EventHandler = @import("EventHandler");
|
||||
|
||||
const Widget = @import("../Widget.zig");
|
||||
const Button = @import("../Button.zig");
|
||||
const command = @import("../command.zig");
|
||||
const tui = @import("../tui.zig");
|
||||
const CreateError = @import("widget.zig").CreateError;
|
||||
|
||||
pub fn create(allocator: Allocator, parent: Plane, event_handler: ?Widget.EventHandler) CreateError!Widget {
|
||||
pub fn create(allocator: Allocator, parent: Plane, event_handler: ?EventHandler) CreateError!Widget {
|
||||
return Button.create_widget(void, allocator, parent, .{
|
||||
.ctx = {},
|
||||
.label = tui.get_mode(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue