//! zcatgui - Immediate Mode GUI Library for Zig //! //! A software-rendered, cross-platform GUI library with macro recording support. //! //! ## Features //! - Immediate mode paradigm (no callbacks, explicit state) //! - Software rendering (works everywhere, including SSH) //! - Macro system for recording/replaying user actions //! - SDL2 backend for cross-platform support //! //! ## Quick Start //! ```zig //! const zcatgui = @import("zcatgui"); //! //! pub fn main() !void { //! var app = try zcatgui.App.init(allocator, "My App", 800, 600); //! defer app.deinit(); //! //! while (app.running) { //! app.beginFrame(); //! //! if (app.button("Click me!")) { //! // Handle click //! } //! //! app.endFrame(); //! } //! } //! ``` const std = @import("std"); // ============================================================================= // Core modules // ============================================================================= pub const Context = @import("core/context.zig").Context; pub const Layout = @import("core/layout.zig"); pub const Style = @import("core/style.zig"); pub const Input = @import("core/input.zig"); pub const Command = @import("core/command.zig"); // ============================================================================= // Macro system // ============================================================================= pub const macro = @import("macro/macro.zig"); pub const MacroRecorder = macro.MacroRecorder; pub const MacroPlayer = macro.MacroPlayer; pub const KeyEvent = macro.KeyEvent; // ============================================================================= // Rendering // ============================================================================= pub const render = struct { pub const Framebuffer = @import("render/framebuffer.zig").Framebuffer; pub const SoftwareRenderer = @import("render/software.zig").SoftwareRenderer; pub const Font = @import("render/font.zig").Font; }; // ============================================================================= // Backend // ============================================================================= pub const backend = struct { pub const Backend = @import("backend/backend.zig").Backend; pub const Sdl2Backend = @import("backend/sdl2.zig").Sdl2Backend; }; // ============================================================================= // Widgets // ============================================================================= pub const widgets = @import("widgets/widgets.zig"); // Re-export common widget types pub const label = widgets.label.label; pub const labelEx = widgets.label.labelEx; pub const labelColored = widgets.label.labelColored; pub const labelCentered = widgets.label.labelCentered; pub const button = widgets.button.button; pub const buttonEx = widgets.button.buttonEx; pub const buttonPrimary = widgets.button.buttonPrimary; pub const buttonDanger = widgets.button.buttonDanger; pub const textInput = widgets.text_input.textInput; pub const textInputEx = widgets.text_input.textInputEx; pub const TextInputState = widgets.TextInputState; pub const checkbox = widgets.checkbox.checkbox; pub const checkboxEx = widgets.checkbox.checkboxEx; pub const select = widgets.select.select; pub const selectEx = widgets.select.selectEx; pub const SelectState = widgets.SelectState; pub const list = widgets.list.list; pub const listEx = widgets.list.listEx; pub const ListState = widgets.ListState; pub const FocusManager = widgets.FocusManager; pub const FocusRing = widgets.FocusRing; // ============================================================================= // Re-exports for convenience // ============================================================================= pub const Color = Style.Color; pub const Rect = Layout.Rect; pub const Constraint = Layout.Constraint; // ============================================================================= // Tests // ============================================================================= test { std.testing.refAllDecls(@This()); }