1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 14:20:04 -04:00

Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports

This commit is contained in:
Konkitoman
2023-09-19 17:22:31 +03:00
91 changed files with 3056 additions and 1525 deletions

View File

@@ -15,13 +15,19 @@
mod color_test;
mod demo;
pub mod easy_mark;
pub mod syntax_highlighting;
pub use color_test::ColorTest;
pub use demo::DemoWindows;
#[cfg(test)]
use egui::ViewportId;
/// View some Rust code with syntax highlighting and selection.
pub(crate) fn rust_view_ui(ui: &mut egui::Ui, code: &str) {
let language = "rs";
let theme = egui_extras::syntax_highlighting::CodeTheme::from_memory(ui.ctx());
egui_extras::syntax_highlighting::code_view_ui(ui, &theme, code, language);
}
// ----------------------------------------------------------------------------
/// Create a [`Hyperlink`](egui::Hyperlink) to this egui source code file on github.