Crate flatbox_egui

source ·

Modules§

  • Containers are pieces of the UI which wraps other pieces of UI. Examples: Window, ScrollArea, Resize, SidePanel, etc.
  • A simple 2D graphics library for turning simple 2D shapes and text into textured triangles.
  • Showing UI:s for egui/epaint types.
  • 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.
  • The default egui fonts 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.

Macros§

Structs§

  • 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 or PaintCallback 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 2D RGBA color image in RAM.
  • A drop-down selection menu with a descriptive label.
  • Your handle to egui.
  • A numeric value that you can change by dragging the number. More compact than a Slider.
  • A file dropped into egui.
  • A .ttf or .otf file and a font face index.
  • Describes the font data and the sizes to use.
  • How to select a sized font.
  • A single-channel image designed for the font texture.
  • Extra scale and vertical tweak to apply to all text of a certain font.
  • Add a background, frame and/or margin to a rectangular background of a Ui.
  • What egui emits each frame from crate::Context::run.
  • Text that has been layed out, ready for painting.
  • A simple grid layout.
  • A file about to be dropped into egui.
  • A clickable hyperlink, e.g. to "https://github.com/emilk/egui".
  • 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”.
  • Clickable text, that looks like a hyperlink.
  • The data that egui persists between frames.
  • Textured triangles in two dimensions.
  • State of the modifier keys. These must be fed to egui.
  • All you probably need to know about a multi-touch gesture.
  • If you want to paint some 3D shapes inside an egui region, you can use this.
  • Information passed along with PaintCallback (Shape::Callback).
  • Helper to paint shapes and text to a specific region on a specific layer.
  • The non-rendering part of what egui emits each frame.
  • 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.
  • Text and optional style choices for it.
  • How rounded the corners of things should be
  • Add vertical and/or horizontal 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 with a slider.
  • A spinner widget used to indicate loading.
  • 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.
  • Used to paint images.
  • What has been allocated and freed during the last period.
  • 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).

Enums§

Constants§

Traits§

Functions§

  • For use in tests; especially doctests.
  • For use in tests; especially doctests.
  • Show larger buttons for switching between light and dark mode (globally).
  • Show a small button to switch to/from dark/light mode (globally).
  • 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 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 a tooltip under the given area.
  • Show some text at the current pointer position (if any).
  • vec2(x, y) == Vec2::new(x, y)
  • Helper function that adds a label when compiling with debug assertions enabled.

Type Aliases§

  • A function that paints the ComboBox icon
  • IdMap<V> is a HashMap<Id, V> optimized by knowing that Id has good entropy, and doesn’t need more hashing.