class

Egui::Response

Inherits Reference < Object

egui Response::context_menu for a prebuilt ContextMenu — the class-based twin of the block version in containers/menu.cr.

Constants

TOOLTIP_DELAY = 0.5

egui tooltip (containers/tooltip.rs): appears in the Tooltip layer at the pointer + offset, after the widget has been hovered for a short delay (hover-start time is per-widget system state).

Constructors

new(ctx : Context, id : Id, rect : Rect, sense : Sense, hovered : Bool, clicked : Bool, click_count : Int32, pressed : Bool, active : Bool, dragged : Bool, drag_started : Bool, drag_stopped : Bool, drag_delta : Vec2, changed : Bool = false)
Source

Instance methods

active?
Source
changed?
Source
click_count
Source
clicked
Source
clicked?
Source
context_menu
Source
context_menu(menu : ContextMenu) : self
Source
double_clicked?
Source
drag_delta
Source
drag_started?
Source
drag_stopped?
Source
dragged
Source
dragged?
Source
gained_focus?
Source
has_focus?
Source
hovered
Source
hovered?
Source
lost_focus?
Source
mark_changed

egui Response::mark_changed — widgets call this after mutating the value they view.

Source
on_hover_and_drag_cursor(cursor : CursorIcon) : self

egui Response::on_hover_and_drag_cursor — same, but also while dragging (sliders, resize grips).

Source
on_hover_and_drag_cursor_image(cursor : CustomCursorImage) : self
Source
on_hover_cursor(cursor : CursorIcon) : self

egui Response::on_hover_cursor — when hovered, use this icon for the mouse cursor.

Source
on_hover_cursor_image(cursor : CustomCursorImage) : self

Bitmap-cursor twins of the two above (Context#set_cursor_image): show a CustomCursorImage (e.g. a paint-bucket sprite) instead of a standard icon while hovered / dragged.

Source
on_hover_text(text : String) : self
Source
paint_focus_ring(rounding : Float64 = 4.0) : Nil

egui focus highlight: a ring around the focused widget (upstream draws it in the widget's own stroke; a dedicated ring is simpler here). Widgets call this right after painting themselves.

Source
pressed?
Source
rect
Source
request_focus
Source
sense
Source
triple_clicked?
Source
widget_color

Color widgets (ColorPicker) publish the picked color (ui.color_edit32(color) { |c| … }).

Source
widget_color=(widget_color : Color32 | Nil)

Color widgets (ColorPicker) publish the picked color (ui.color_edit32(color) { |c| … }).

Source
widget_text

Text widgets (TextEdit) publish the edited buffer the same way (ui.text_edit_singleline(buf) { |new| … }).

Source
widget_text=(widget_text : String | Nil)

Text widgets (TextEdit) publish the edited buffer the same way (ui.text_edit_singleline(buf) { |new| … }).

Source
widget_value

Value widgets (Slider, DragValue) publish their freshly computed value here so the Ui block-form helpers can hand it back to the app (ui.slider(v, range) { |new_v| … }).

Source
widget_value=(widget_value : Float64 | Nil)

Value widgets (Slider, DragValue) publish their freshly computed value here so the Ui block-form helpers can hand it back to the app (ui.slider(v, range) { |new_v| … }).

Source