A tiling layout engine for egui with drag-and-drop and resizing

Overview

egui_tiles

github Latest version Documentation unsafe forbidden Build Status MIT Apache

Layouting and docking for egui.

Supports:

  • Horizontal and vertical layouts
  • Grid layouts
  • Tabs
  • Drag-and-drop docking

egui_tiles

Trying it

cargo r --example simple

Comparison with egui_dock

egui_dock is an excellent crate serving similar needs. egui_tiles aims to become a more flexible and feature-rich alternative to egui_dock.

egui_dock only supports binary splits (left/right or top/bottom), while egui_tiles support full horizontal and vertical layouts, as well as grid layouts. egui_tiles is also strives to be more customizable, enabling users to override the default style and behavior by implementing methods on a Behavior trait.

egui_dock supports some features that egui_tiles does not yet support, such as close-buttons on each tab, and built-in scroll areas.


egui_tiles development is sponsored by Rerun, a startup doing
visualizations for computer vision and robotics.

You might also like...
📁 Soothing pastel theme for egui
📁 Soothing pastel theme for egui

Catppuccin for egui Previews 🌻 Latte 🪴 Frappé 🌺 Macchiato 🌿 Mocha Usage Add this to your Cargo.toml: [dependencies] catppuccin-egui = "1.0" To use

Slippy map (openstreetmap) widget for egui
Slippy map (openstreetmap) widget for egui

Slippy maps widget for egui. Limitations There are couple of limitations when using this library. Some of them will might probably be lifted at some p

Hotkey widget for egui!
Hotkey widget for egui!

egui-keybind, a hotkey library for egui crates.io | docs.rs | examples | changelogs This library provides a simple egui widget for keybindings (hotkey

Show HTML content
Show HTML content "inside" your egui rendered application

hframe Show HTML content "inside" your egui rendered application. "hframe" stands for "HTML Frame". Note: hframe only works when the application is co

An egui app for prompting a local offline LLM.

An egui app for prompting a local offline LLM. Description coze is a small egui application for prompting a local offline LLM using the Huggingface ca

Fyrox - 3D and 2D game engine written in Rust
Fyrox - 3D and 2D game engine written in Rust

Fyrox - a modern Rust game engine A feature-rich, production-ready, general purpose 2D/3D game engine written in Rust with a scene editor. Formerly kn

A minimal browser with a super simple rendering engine for HTML and CSS, using Rust.

minimal-browser A minimal browser with a super simple rendering engine for HTML and CSS, using Rust. Credit: https://github.com/mbrubeck and https://l

A tool that allows you to modify, edit, and recompile the AST script of Artemis engine.

Artemis AST Script Processor This utility offers a set of Rust functions to parse and manipulate Artemis AST-based scripts. Features Tokenization: Con

A code-completion engine for Vim
A code-completion engine for Vim

YouCompleteMe: a code-completion engine for Vim Help, Advice, Support Looking for help, advice or support? Having problems getting YCM to work? First

Comments
  • Example with multiple Pane types?

    Example with multiple Pane types?

    I recently found this crate and it is exactly what I needed and solves problems I was struggling with when using egui by itself. Thanks! However, I'm running into an issue and I can't figure out a way (I'm new to Rust, and that doesn't help):

    What's the best way to implement multiple types of Pane, all in the same tree? I can see that the tree.ui(behavior, ui) function takes in a single behavior at the root, and I assume the individual Panes can have their own types that implement the Behavior trait, but... as soon as I use tiles.insert_pane(PaneType) with two different Pane types (both implementing Behavior) I get a "mismatched types" compiler error, even when I implementing the trait for Box<(dyn MyPaneType + 'static)> types, hoping to get around the type error.

    I also tried getting around it by using an enum and handling each pane type in a match statement, but I'm still running into issues when passing data from the app to the panes, since the pane_ui function defined in the Behavior trait doesn't allow passing custom data. Or does it? I can't figure it out.

    Long story short, would it be possible to add a tiny, very simple example that demonstrates using two different pane types that ideally display data from the main App, instead of creating multiple panes with the same Behavior as the examples currently do?

    Thank you so much!

    opened by DoctorWhoof 1
  • feat: Basic Scrolling in Tab Menu

    feat: Basic Scrolling in Tab Menu

    I don't usually do PR's, but I thought I'd have a crack at this one. This PR Addresses #2 in basic terms, as follows:

    This PR contains:

    1. Scrolling within tab view using scroll wheel
    2. Icons for moving back and forth for those without scroll wheel (Implemented in menubar)

    Note: Added top_bar_ltl_ui for the < icon incase left alignment is prefered.

    1. .click() for tab elements will scroll them into view.

    Implementation:

    Using a MPSC (std::sync::mpsc::channel::<f32>()) to share data between the menu elements > and <, and the ScrollArea. The tab menu is now wrapped in a ScrollAreawith an always hidden scroll bar.

    Issues with Implementation:

    I am not experienced enough with egui to know how to find the fitted width of an element's contents, and so scrolling rightward will permit over-scroll in some cases as the ui.available_width() is greater than the consumed width.

    Furthermore, as the scroll area's offset is stored using ctx().memory_mut(), I am unsure of how to update this value to match the scroll when using a mouse - and so, after using the mouse to scroll, and again using the chevrons, the scroll will jump to its previous state. Any help on this is much appreciated.

    opened by bennjii 4
  • Provide a way to access tabs in overflowing tab-bar

    Provide a way to access tabs in overflowing tab-bar

    Right now there's now way to access overflowing tabs. A common way to solve this is to allow it scrolling via the mouse wheel and provide a little side button

    egui_tile: image

    firefox: image

    opened by Wumpf 1
Releases(0.1.0)
Owner
rerun.io
Visualizing real world computer vision, powered by Rust
rerun.io
That program use on platform windows. And if you write any text on uncorrect keyboard layout, that program for that.

?? This program is designed to translate text into the correct layout when typing is incorrect. ?? Example ghbdtn -> привет Just (by default) pressing

Gest Se 5 Jan 26, 2023
Leptos integration with Golden Layout.

Leptos Golden Layout Leptos integration with Golden Layout. This has many features missing but covers the basics for integrating leptos with golden la

Ari Seyhun 3 Oct 23, 2023
Keybinder to type diacrytical characters without needing to hack the layout itself. Supports bindings to the left Alt + letter

Ďíáǩříťíǩád I just thought that it's a shame the word diakritika does not have any diacritics in it. Key points diakritika is a simple Windows daemon

null 4 Feb 26, 2024
A drop-in replacement for `dapp` and `seth` in Rust

dapptools.rs Rust port of DappTools dapp example Usage Run Solidity tests Any contract that contains a function starting with test is being tested. Th

Georgios Konstantopoulos 5k Jan 1, 2023
drop-in replacement for libfuzzer

Fazi A reimplementation of libfuzzer in Rust with some improvements Supported Features libFuzzer's mutations SanCov feedback Building without a main()

Lander Brandt 56 Nov 2, 2022
A lightweight, no-fuss, drop-in replacement for Rudderstack

Welcome to Stilgar! Stilgar is a lightweight, no-fuss, drop-in replacement for Rudderstack. Key features: Seamlessly compatible with all Rudderstack c

Withings 4 Jul 21, 2023
Drop-in replacement for the Actix Web HTTP Logger middleware

actix-contrib-logger Logger middleware for the Actix Web framework. Actually it's a copy & paste from the official Logger middleware (original source

Mariano Ruiz 5 Aug 28, 2023
Sudoku Solver using bitmasks and bit-manipulation with Rust 🦀 and egui 🎨

sudoku-solver Download This Rust application implements a very memory efficent algorithm to solve sudoku and lets the user know when a unique solution

cameron 24 Apr 10, 2023
A fast nostr opengraph server, built on nostrdb and egui.

notecrumbs A nostr opengraph server build on nostrdb, egui, and skia. It renders notes using the CPU in around 50ms. Status WIP! Local note fetching w

Damus 7 Dec 21, 2023
Exeprimental visual terminal for egui

eterm: a visual terminal for egui If you have a service written in rust (running on the cloud, or even locally) that you need to inspect, eterm might

Emil Ernerfeldt 48 Dec 29, 2022