Crate dotrix_egui[][src]

Expand description

EGUI integration interface

Dotrix provides a simple example demonstrating the EGUI integration.


Any-type storages for Memory.

Containers are pieces of the UI which wraps other pieces of UI. Examples: Window, ScrollArea, Resize, SidePanel, etc.

2D graphics/rendering. Fonts, textures, color, geometry, tessellation etc.

Handles paint layers, i.e. how things are sometimes painted behind or in front of other things.

Menu bar functionality (very basic so far).

All the data egui returns to the backend at the end of each frame.

egui supports around 1216 emojis in total. Here are some of the most useful: ∞⊗⎗⎘⎙⏏⏴⏵⏶⏷ ⏩⏪⏭⏮⏸⏹⏺■▶📾🔀🔁🔃 ☀☁★☆☐☑☜☝☞☟⛃⛶✔ ↺↻⟲⟳⬅➡⬆⬇⬈⬉⬊⬋⬌⬍⮨⮩⮪⮫ ♡ 📅📆 📈📉📊 📋📌📎📤📥🔆 🔈🔉🔊🔍🔎🔗🔘 🕓🖧🖩🖮🖱🖴🖵🖼🗀🗁🗋🗐🗑🗙🚫❓

egui theme (spacing, colors, etc).

Miscellaneous tools used by the rest of egui.

Widgets are pieces of GUI such as Label, Button, Slider etc.


An assert that is only active when egui is compiled with the egui_assert feature or with the debug_egui_assert feature in debug builds.

Create a Hyperlink to the current file!() on github.

Create a Hyperlink to the current file!() (and line) on Github

Show debug info on hover when Context::set_debug_on_hover has been turned on.


Two-dimension alignment, e.g. Align2::LEFT_TOP.

An area on the screen that can be moved by dragging.

Clickable button with text.

A panel that covers the remainder of the screen, i.e. whatever area is left after adding other panels.

Boolean on/off control with text label.

A Mesh within a clip rectangle.

A header which can be collapsed/expanded, revealing a contained Ui region.

The response from showing a CollapsingHeader.

This format is used for space-efficient color representation (32 bits).

A drop-down selection menu with a descriptive label.

This is the first thing you need when working with egui. Create using CtxRef.

A wrapper around Arc<Context>. This is how you will normally create and access a Context.

A numeric value that you can change by dragging the number. More compact than a Slider.

A file dropped into egui.

EGUI overlay provider

Describes the font data and the sizes to use.

Color and margin of a rectangular background of a Ui.

A simple grid layout.

A file about to be dropped into egui.

A clickable hyperlink, e.g. to "".

egui tracks widgets frame-to-frame using Ids.

An widget to show an image of a given size.

A clickable image within a frame.

Returned when we wrap some ui-code and want to return both the results of the inner function and the ui as a whole, e.g.:

Input state that egui updates each frame.

Static text.

An identifier for a paint layer. Also acts as an identifier for Area:s.

The layout of a Ui, e.g. “vertical & centered”.

The data that egui persists between frames.

State of the modifier keys. These must be fed to egui.

All you probably need to know about a multi-touch gesture.

What egui emits each frame. The backend should use this.

Helper to paint shapes and text to a specific region on a specific layer.

Mouse or touch state.

A position on screen.

A simple progress bar.

One out of several alternatives, either selected or not.

What the integrations provides to egui at the start of each frame.

A rectangular region of space.

A region that can be resized by dragging the bottom right corner.

The result of adding a widget to a Ui.

0-1 linear space RGBA color with premultiplied alpha.

Add vertical scrolling to a contained Ui.

One out of several alternatives, either selected or not. Will mark selected items with a different background color. An alternative to RadioButton and Checkbox.

What sort of interaction is a widget sensitive to?

A visual separator. A horizontal or vertical line (depending on Layout).

A panel that covers the entire left or right side of a Ui or screen.

Control a number by a horizontal slider.

Describes the width and color of a line.

Specifies the look and feel of egui.

A text region that the user can edit the contents of.

An 8-bit texture containing font data.

A panel that covers the entire top or bottom of a Ui or screen.


this is a u64 as values of this kind can always be obtained by hashing

Unique identification of a touch occurrence (finger or pen or …). A Touch ID is valid until the finger is lifted. A new ID is used for the next touch.

This is what you use to place widgets.

A vector has a direction and length. A Vec2 is often used to represent a size.

Controls the visual style (colors etc) of egui.

Describes a widget such as a crate::Button or a crate::TextEdit.

Builder for a floating window which can be dragged, closed, collapsed, resized and scrolled (off by default).


left/center/right or top/center/bottom alignment for e.g. anchors and layouts.

A mouse cursor icon.

Layout direction, one of LeftToRight, RightToLeft, TopDown, BottomUp.

An input event generated by the integration.

Which style of font: Monospace or Proportional.

Keyboard keys.

Different layer categories

Mouse button (or similar for touch input)

A paint primitive such as a circle or a piece of text. Coordinates are all screen space points (not physical pixels).

One of a few categories of styles of text, e.g. body, button or heading.

What texture to use in a Mesh mesh.

In what phase a touch event is in.

The different types of built-in widgets in egui


Number of pointer buttons supported by egui, i.e. the number of possible states of PointerButton.


Extends f32, Vec2 etc with at_least and at_most as aliases for max and min.

Trait constraining what types TextEdit may use as an underlying buffer.

Anything implementing Widget can be added to a Ui with Ui::add.


A drop-down selection menu with a descriptive label.

Enables EGUI extension into Dotrix application

Linear interpolation.

Shows a popup below another widget.

pos2(x,y) == Pos2::new(x, y)

Linearly remap a value from one range to another, so that when x == from.start() returns to.start() and when x == from.end() returns to.end().

Like remap, but also clamps the value so that the returned value is always in the to range.

Show a button to reset a value to its default. The button is only enabled if the value does not already have its original value.

Show a tooltip at the current pointer position (if any).

Show a tooltip at the given position.

Show a tooltip at the current pointer position (if any).

Show some text at the current pointer position (if any).

Show a tooltip under the given area.

EGUI overlay startup system

vec2(x,y) == Vec2::new(x, y)

Helper function that adds a label when compiling with debug assertions enabled.