Move easy_mark from egui deo egui_demo_lib

This commit is contained in:
Emil Ernerfeldt 2021-04-24 00:34:58 +02:00
parent 641e9c2d26
commit 6b24dbc997
10 changed files with 17 additions and 15 deletions

View file

@ -22,6 +22,9 @@ NOTE: [`eframe`](eframe/CHANGELOG.md), [`egui_web`](egui_web/CHANGELOG.md) and [
* Fix [defocus-bug on touch screens](https://github.com/emilk/egui/issues/288).
* Fix bug with the layout of wide `DragValue`:s.
### Removed 🔥
* Moved experimental markup language to `egui_demo_lib`
## 0.11.0 - 2021-04-05 - Optimization, screen reader & new layout logic

View file

@ -1,8 +0,0 @@
//! Experimental parts of egui, that may change suddenly or get removed.
//!
//! Be very careful about depending on the experimental parts of egui!
pub mod easy_mark_parser;
mod easy_mark_viewer;
pub use easy_mark_viewer::easy_mark;

View file

@ -296,7 +296,6 @@ pub mod any;
pub mod containers;
mod context;
mod data;
pub mod experimental;
mod frame_state;
pub(crate) mod grid;
mod id;

View file

@ -1,13 +1,11 @@
mod color_test;
mod demo;
mod easy_mark_editor;
mod fractal_clock;
#[cfg(feature = "http")]
mod http_app;
pub use color_test::ColorTest;
pub use demo::DemoApp;
pub use easy_mark_editor::EasyMarkEditor;
pub use fractal_clock::FractalClock;
#[cfg(feature = "http")]
pub use http_app::HttpApp;

View file

@ -44,7 +44,7 @@ impl EasyMarkEditor {
ScrollArea::auto_sized()
.id_source("rendered")
.show(&mut columns[1], |ui| {
egui::experimental::easy_mark(ui, &self.code);
crate::easy_mark::easy_mark(ui, &self.code);
});
});
}

View file

@ -61,7 +61,7 @@ pub struct Style {
///
/// # Example:
/// ```
/// # use egui::experimental::easy_mark_parser::Parser;
/// # use egui_demo_lib::easy_mark::parser::Parser;
/// for item in Parser::new("Hello *world*!") {
/// }
///

View file

@ -1,5 +1,5 @@
use super::easy_mark_parser as easy_mark;
use crate::*;
use egui::*;
/// Parse and display a VERY simple and small subset of Markdown.
pub fn easy_mark(ui: &mut Ui, easy_mark: &str) {

View file

@ -0,0 +1,9 @@
//! Experimental markup language
mod easy_mark_editor;
pub mod easy_mark_parser;
mod easy_mark_viewer;
pub use easy_mark_editor::EasyMarkEditor;
pub use easy_mark_parser as parser;
pub use easy_mark_viewer::easy_mark;

View file

@ -58,6 +58,7 @@
#![allow(clippy::manual_range_contains)]
mod apps;
pub mod easy_mark;
pub(crate) mod frame_history;
mod wrap_app;

View file

@ -4,7 +4,7 @@
#[cfg_attr(feature = "persistence", serde(default))]
pub struct Apps {
demo: crate::apps::DemoApp,
easy_mark_editor: crate::apps::EasyMarkEditor,
easy_mark_editor: crate::easy_mark::EasyMarkEditor,
#[cfg(feature = "http")]
http: crate::apps::HttpApp,
clock: crate::apps::FractalClock,