MCPcopy Index your code
hub / github.com/anhosh/egui_dock

github.com/anhosh/egui_dock @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
428 symbols 994 edges 34 files 152 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

egui_dock: docking system for egui

github crates.io docs.rs egui_version

Originally created by @lain-dono, this library provides a docking system for egui.

Contributing

Before contributing, please read the contribution guide and the AI usage policy.

This library is a collaborative project developed with direct involvement of its users.

Please feel free to open new issues and pull requests, and participate in discussions! A lot of our discussions take place on egui's official Discord server, in the #egui_dock channel.

Features

  • Opening and closing tabs.
  • Moving tabs between nodes and resizing.
  • Dragging tabs out into new egui windows.
  • Highly customizable look and feel.
  • High degree of control over behaviour of the whole dock area and of individual tabs.
  • Manipulating tabs and dock layout from code.

Quick start

Add egui and egui_dock to your project's dependencies.

[dependencies]
egui = "0.35"
egui_dock = "0.20"

Then proceed by setting up egui, following its quick start guide. Once that's done, you can start using egui_dock – more details on that can be found in the documentation.

Examples

The Git repository of this crate contains some example applications demonstrating how to achieve certain effects. You can find all of them in the examples folder.

You can run them with Cargo from the crate's root directory, for example: cargo run --example hello.

Demo

demo

Alternatives

egui_tiles

It's a library aiming to achieve similar goals in addition to being more flexible and customizable.

One feature it supports that egui_dock does not at the moment is the ability to divide nodes into more than two children, enabling horizontal, vertical, and grid layouts.

[!NOTE] egui_tiles is much earlier in development than egui_dock and doesn't yet support a lot of features.

Extension points exported contracts — how you extend this code

TabViewer (Interface)
Defines how a tab should behave and be rendered inside a [`Tree`](crate::Tree).
src/widgets/tab_viewer.rs

Core symbols most depended-on inside this repo

main
called by 21
examples/hello.rs
right
called by 20
src/dock_state/tree/node_index.rs
style
called by 17
src/widgets/dock_area/mod.rs
main_surface_mut
called by 17
src/dock_state/mod.rs
iter
called by 17
src/dock_state/tree/mod.rs
len
called by 16
src/dock_state/tree/mod.rs
left
called by 16
src/dock_state/tree/node_index.rs
node_path
called by 15
src/dock_state/tree/tab_index.rs

Shape

Method 329
Class 47
Function 37
Enum 14
Interface 1

Languages

Rust100%

Modules by API surface

src/dock_state/tree/mod.rs55 symbols
src/dock_state/mod.rs54 symbols
src/dock_state/tree/node/mod.rs31 symbols
src/widgets/dock_area/drag_and_drop.rs22 symbols
src/widgets/dock_area/mod.rs21 symbols
src/style.rs21 symbols
src/widgets/dock_area/show/leaf.rs17 symbols
src/widgets/tab_viewer.rs16 symbols
src/dock_state/tree/node_index.rs16 symbols
src/dock_state/tree/node/leaf.rs16 symbols
src/dock_state/surface.rs16 symbols
src/utils.rs15 symbols

For agents

$ claude mcp add egui_dock \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact