Crate dotrix_egui

Crate dotrix_egui 

Source
Expand description

EGUI integration interface

Dotrix provides a simple example demonstrating the EGUI integration.

Modules§

any
Any-type storages for Memory.
containers
Containers are pieces of the UI which wraps other pieces of UI. Examples: Window, ScrollArea, Resize, SidePanel, etc.
epaint
2D graphics/rendering. Fonts, textures, color, geometry, tessellation etc.
layers
Handles paint layers, i.e. how things are sometimes painted behind or in front of other things.
menu
Menu bar functionality (very basic so far).
output
All the data egui returns to the backend at the end of each frame.
special_emojis
egui supports around 1216 emojis in total. Here are some of the most useful: ∞⊗⎗⎘⎙⏏⏴⏵⏶⏷ ⏩⏪⏭⏮⏸⏹⏺■▶📾🔀🔁🔃 ☀☁★☆☐☑☜☝☞☟⛃⛶✔ ↺↻⟲⟳⬅➡⬆⬇⬈⬉⬊⬋⬌⬍⮨⮩⮪⮫ ♡ 📅📆 📈📉📊 📋📌📎📤📥🔆 🔈🔉🔊🔍🔎🔗🔘 🕓🖧🖩🖮🖱🖴🖵🖼🗀🗁🗋🗐🗑🗙🚫❓
style
egui theme (spacing, colors, etc).
util
Miscellaneous tools used by the rest of egui.
widgets
Widgets are pieces of GUI such as Label, Button, Slider etc.

Macros§

egui_assert
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.
github_link_file
Create a Hyperlink to the current file!() on github.
github_link_file_line
Create a Hyperlink to the current file!() (and line) on Github
trace
Show debug info on hover when Context::set_debug_on_hover has been turned on.

Structs§

Align2
Two-dimension alignment, e.g. Align2::LEFT_TOP.
Area
An area on the screen that can be moved by dragging.
CentralPanel
A panel that covers the remainder of the screen, i.e. whatever area is left after adding other panels.
Checkbox
Boolean on/off control with text label.
ClippedMesh
A Mesh within a clip rectangle.
CollapsingHeader
A header which can be collapsed/expanded, revealing a contained Ui region.
CollapsingResponse
The response from showing a CollapsingHeader.
Color32
This format is used for space-efficient color representation (32 bits).
ComboBox
A drop-down selection menu with a descriptive label.
Context
This is the first thing you need when working with egui. Create using CtxRef.
CtxRef
A wrapper around Arc<Context>. This is how you will normally create and access a Context.
CursorPair
DragValue
A numeric value that you can change by dragging the number. More compact than a Slider.
DroppedFile
A file dropped into egui.
Egui
EGUI overlay provider
FontDefinitions
Describes the font data and the sizes to use.
Frame
Color and margin of a rectangular background of a Ui.
Grid
A simple grid layout.
HoveredFile
A file about to be dropped into egui.
Hyperlink
A clickable hyperlink, e.g. to "https://github.com/emilk/egui".
Image
An widget to show an image of a given size.
ImageButton
A clickable image within a frame.
InnerResponse
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.:
Label
Static text.
LayerId
An identifier for a paint layer. Also acts as an identifier for Area:s.
Layout
The layout of a Ui, e.g. “vertical & centered”.
Memory
The data that egui persists between frames.
MultiTouchInfo
All you probably need to know about a multi-touch gesture.
Output
What egui emits each frame. The backend should use this.
Painter
Helper to paint shapes and text to a specific region on a specific layer.
PointerState
Mouse or touch state.
Pos2
A position on screen.
ProgressBar
A simple progress bar.
RadioButton
One out of several alternatives, either selected or not.
RawInput
What the integrations provides to egui at the start of each frame.
Rect
A rectangular region of space.
Resize
A region that can be resized by dragging the bottom right corner.
Response
The result of adding a widget to a Ui.
Rgba
0-1 linear space RGBA color with premultiplied alpha.
ScrollArea
Add vertical scrolling to a contained Ui.
SelectableLabel
One out of several alternatives, either selected or not. Will mark selected items with a different background color. An alternative to RadioButton and Checkbox.
Sense
What sort of interaction is a widget sensitive to?
Separator
A visual separator. A horizontal or vertical line (depending on Layout).
SidePanel
A panel that covers the entire left or right side of a Ui or screen.
Slider
Control a number by a horizontal slider.
Stroke
Describes the width and color of a line.
Style
Specifies the look and feel of egui.
TextEdit
A text region that the user can edit the contents of.
TopBottomPanel
A panel that covers the entire top or bottom of a Ui or screen.
TopPanelDeprecated
TouchDeviceId
this is a u64 as values of this kind can always be obtained by hashing
TouchId
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.
Vec2
A vector has a direction and length. A Vec2 is often used to represent a size.
Visuals
Controls the visual style (colors etc) of egui.
WidgetInfo
Describes a widget such as a crate::Button or a crate::TextEdit.

Enums§

Align
left/center/right or top/center/bottom alignment for e.g. anchors and layouts.
CursorIcon
A mouse cursor icon.
Direction
Layout direction, one of LeftToRight, RightToLeft, TopDown, BottomUp.
Event
An input event generated by the integration.
FontFamily
Which style of font: Monospace or Proportional.
Key
Keyboard keys.
Order
Different layer categories
PointerButton
Mouse button (or similar for touch input)
Shape
A paint primitive such as a circle or a piece of text. Coordinates are all screen space points (not physical pixels).
TextStyle
One of a few categories of styles of text, e.g. body, button or heading.
TextureId
What texture to use in a Mesh mesh.
TouchPhase
In what phase a touch event is in.
WidgetType
The different types of built-in widgets in egui

Constants§

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

Traits§

NumExt
Extends f32, Vec2 etc with at_least and at_most as aliases for max and min.
TextBuffer
Trait constraining what types TextEdit may use as an underlying buffer.

Functions§

combo_box_with_labelDeprecated
A drop-down selection menu with a descriptive label.
extension
Enables EGUI extension into Dotrix application
lerp
Linear interpolation.
popup_below_widget
Shows a popup below another widget.
pos2
pos2(x,y) == Pos2::new(x, y)
remap
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().
remap_clamp
Like remap, but also clamps the value so that the returned value is always in the to range.
reset_button
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_tooltip
Show a tooltip at the current pointer position (if any).
show_tooltip_at
Show a tooltip at the given position.
show_tooltip_at_pointer
Show a tooltip at the current pointer position (if any).
show_tooltip_text
Show some text at the current pointer position (if any).
show_tooltip_under
Show a tooltip under the given area.
startup
EGUI overlay startup system
stroke_ui
vec2
vec2(x,y) == Vec2::new(x, y)
warn_if_debug_build
Helper function that adds a label when compiling with debug assertions enabled.