KiThe 0.3.6

A numerical suite for chemical kinetics and thermodynamics, combustion, heat and mass transfer,chemical engeneering. Work in progress. Advices and contributions will be appreciated
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Helpers for rendering read-only GUI snapshots.
//!
//! These widgets present calculated reports and raw catalog payloads as
//! selectable/copyable text while keeping the underlying application state
//! immutable from direct user editing.

use eframe::egui;

/// Renders a multiline read-only snapshot that can still be selected and copied.
pub fn multiline(ui: &mut egui::Ui, text: &mut String, rows: usize) -> egui::Response {
    ui.add(
        egui::TextEdit::multiline(text)
            .desired_rows(rows)
            .desired_width(f32::INFINITY)
            .interactive(false)
            .code_editor(),
    )
}