zaxis 0.0.5

An event-driven immediate mode GUI for desktop tools
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

impl Widget for TextEdit<'_> {
    fn ui(mut self, ui: &mut Ui<'_>) -> Response {
        self.enabled &= ui.is_enabled();
        let id = self.exact_id.unwrap_or_else(|| match self.id {
            Some(id) => ui.scope.with(("text-edit", id)),
            None => ui.auto_id(("text-edit", self.source)),
        });
        let look = self.look(ui);
        match self.area {
            Some(_) => self.show_area(ui, id, look),
            None => self.show_single(ui, id, look),
        }
    }
}