Skip to main content

StyleEdit

Trait StyleEdit 

Source
pub trait StyleEdit {
    // Provided methods
    fn textbox_font(&self, ui: &mut Ui, _sp: &Sp<'_>) -> (i32, i32) { ... }
    fn textbox_metrics(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32) { ... }
    fn textbox_frame(&self, _ui: &mut Ui, _sp: &Sp<'_>) { ... }
    fn textbox_vbar(&self, _ui: &mut Ui, _sp: &Sp<'_>) { ... }
}
Expand description

text boxes (edit.s)

Provided Methods§

Source

fn textbox_font(&self, ui: &mut Ui, _sp: &Sp<'_>) -> (i32, i32)

Select the single-line input face and return its line height and baseline in px. Default preserves the body font; icon inputs may use a compact search-field face.

Source

fn textbox_metrics(&self, _ui: &mut Ui, _sp: &mut Sp<'_>) -> (i32, i32)

value natural width (DIP), flags 1 = multi-line (value2 line height px); must set s[0], s[1], s[2] = left, right, top text inset (px)

Source

fn textbox_frame(&self, _ui: &mut Ui, _sp: &Sp<'_>)

ev (hover), value 1 = editing, value2 1 = disabled; the core draws text, selection, caret

Source

fn textbox_vbar(&self, _ui: &mut Ui, _sp: &Sp<'_>)

value view h, value2 content h, s[0] scroll y, s[1] text top (px)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§