# Changelog for planned 0.1.0 # TODO: Complete changelog. ## BIG refactoring A lot of the modules have been shifted and moved around to ease maintaining the project. Many of the moved around code has been re-exported in the areas where it made sense to reduce breakage. The biggest changes you should look out are that some traits have been moved into further subdirectories, some traits have been removed, and the prelude has been updated. ## Traits changed. Like, loads. Loads of changes. Big ones. Big changes. 🔥 The `Terminal` trait has been broken off into several traits. If you are an end user of a terminal, you should not see any difference, but if you are an implementor of a `Terminal`, you will see a lot of changes. ### The `Terminal` trait has been broken off into: - `Metadata`: These are methods that return basic info about the terminal. I decided to break it off into its own trait because otherwise, it would be repeated across `TerminalConst` and `TerminalMut`. - `TerminalConst`: Methods that do not require mutable access to the terminal. This is auto-implemented for all references and pointers to `TerminalConst`s. - `TerminalMut`: Methods that do require mutable access to the terminal. This is auto-implemented for all mutable references and pointers to `TerminalMut`s. There has also been a new marker trait added, `Terminal`, introduced that is auto-implemented for anything implements these 3 traits. ### The `Widget` trait has been updated accordingly The `Widget::update` method now takes in a `TerminalConst` because you should not be drawing to the terminal during an update. ### The `Style` trait, and the `Colour` struct have been moved into a new `style` subdirectory. It just made sense to break them off into their own thing. ### The `Target` trait got changed to `Renderer` to avoid confusion when not qualifying with `draw::Target`. This should help stop confusing people. Also makes sense. I mean... the `Renderer` trait has `render`, right? ### The `BoundingBox` trait and the `Rectangle` type. The `BoundingBox` trait now exists — this means that widgets may have child widgets now and use the `Rectangle`'s dimensions and coordinates to be able to work around them. ### `Terminal::view` and `Terminal::view_mut` methods Allows you to get a subsection of a `Terminal` and treat it as if it were a full `Terminal`. Invaluable if you want to take a widget and then draw it in a specific area. ### `terminal::ViewSplit` allows you to create horizontal and vertical splits of your terminal. Read the docs if you want to make use of this feature. ### Certified 240 FPS on a bad benchmark The benchmark is... inaccurate... but it can hit 240 FPS! ## New layout widgets. #### `Margin` widget allows you to add padding to your widgets. Your widget needs to implement proper `BoundingBox` support to make use of `Margin`. #### `Centered` widget allows you to center a widget in a terminal. Your widget needs to implement proper `BoundingBox` support to make use of `Centered`. #### `Stacked` widget allows you to stack widgets on top of each other. Your widget needs to implement proper `BoundingBox` support to make use of `Stacked`.