Don't export macros that should only be pub(crate)
This commit is contained in:
parent
95c0174331
commit
4d2eb5b71e
26 changed files with 39 additions and 47 deletions
|
@ -663,21 +663,19 @@ fn translate_cursor(cursor_icon: egui::CursorIcon) -> Option<winit::window::Curs
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Profiling macro for feature "puffin"
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
macro_rules! profile_function {
|
||||
($($arg: tt)*) => {
|
||||
#[cfg(feature = "puffin")]
|
||||
puffin::profile_function!($($arg)*);
|
||||
};
|
||||
}
|
||||
pub(crate) use profile_function;
|
||||
|
||||
/// Profiling macro for feature "puffin"
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
macro_rules! profile_scope {
|
||||
($($arg: tt)*) => {
|
||||
#[cfg(feature = "puffin")]
|
||||
puffin::profile_scope!($($arg)*);
|
||||
};
|
||||
}
|
||||
pub(crate) use profile_scope;
|
||||
|
|
|
@ -50,7 +50,7 @@ impl ColorTest {
|
|||
ui.set_max_width(680.0);
|
||||
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
|
||||
ui.label("This is made to test that the egui painter backend is set up correctly, so that all colors are interpolated and blended in linear space with premultiplied alpha.");
|
||||
|
|
|
@ -42,7 +42,7 @@ impl super::View for CodeEditor {
|
|||
ui.horizontal(|ui| {
|
||||
ui.set_height(0.0);
|
||||
ui.label("An example of syntax highlighting in a TextEdit.");
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
|
||||
if cfg!(feature = "syntect") {
|
||||
|
|
|
@ -84,7 +84,7 @@ impl super::View for CodeExample {
|
|||
use crate::syntax_highlighting::code_view_ui;
|
||||
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
|
||||
code_view_ui(
|
||||
|
|
|
@ -109,7 +109,7 @@ impl super::View for ContextMenus {
|
|||
});
|
||||
});
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ impl super::View for DancingStrings {
|
|||
ui.painter().extend(shapes);
|
||||
});
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ impl super::View for DragAndDropDemo {
|
|||
}
|
||||
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ impl super::Demo for FontBook {
|
|||
impl super::View for FontBook {
|
||||
fn ui(&mut self, ui: &mut egui::Ui) {
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
|
||||
ui.label(format!(
|
||||
|
|
|
@ -177,7 +177,7 @@ impl Widgets {
|
|||
pub fn ui(&mut self, ui: &mut Ui) {
|
||||
let Self { angle, password } = self;
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file_line!());
|
||||
ui.add(crate::egui_github_link_file_line!());
|
||||
});
|
||||
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
|
@ -628,6 +628,6 @@ fn text_layout_ui(
|
|||
ui.label(job);
|
||||
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file_line!());
|
||||
ui.add(crate::egui_github_link_file_line!());
|
||||
});
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ impl super::Demo for MultiTouch {
|
|||
impl super::View for MultiTouch {
|
||||
fn ui(&mut self, ui: &mut egui::Ui) {
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
ui.strong(
|
||||
"This demo only works on devices with multitouch support (e.g. mobiles and tablets).",
|
||||
|
|
|
@ -160,7 +160,7 @@ impl super::Demo for PaintBezier {
|
|||
impl super::View for PaintBezier {
|
||||
fn ui(&mut self, ui: &mut Ui) {
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
self.ui_control(ui);
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ impl super::Demo for Painting {
|
|||
impl super::View for Painting {
|
||||
fn ui(&mut self, ui: &mut Ui) {
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
self.ui_control(ui);
|
||||
ui.label("Paint with your mouse/touch!");
|
||||
|
|
|
@ -871,7 +871,7 @@ impl super::View for PlotDemo {
|
|||
ui.label("Zoom with ctrl + scroll.");
|
||||
}
|
||||
ui.label("Reset view with double-click.");
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
});
|
||||
ui.separator();
|
||||
|
|
|
@ -251,7 +251,7 @@ impl super::View for ScrollTo {
|
|||
ui.separator();
|
||||
ui.vertical_centered(|ui| {
|
||||
egui::reset_button(ui, self);
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ impl super::View for Sliders {
|
|||
|
||||
ui.vertical_centered(|ui| {
|
||||
egui::reset_button(ui, self);
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ impl super::View for StripDemo {
|
|||
});
|
||||
strip.cell(|ui| {
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -81,7 +81,7 @@ impl super::View for TableDemo {
|
|||
});
|
||||
strip.cell(|ui| {
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ impl super::View for CursorTest {
|
|||
.button(format!("{:?}", cursor_icon))
|
||||
.on_hover_cursor(cursor_icon);
|
||||
}
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ impl super::View for IdTest {
|
|||
let _ = ui.button("Button");
|
||||
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ impl super::View for ManualLayoutTest {
|
|||
let widget_rect =
|
||||
egui::Rect::from_min_size(ui.min_rect().min + *widget_offset, *widget_size);
|
||||
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
|
||||
// Showing how to place a widget anywhere in the [`Ui`]:
|
||||
match *widget_type {
|
||||
|
@ -296,7 +296,7 @@ impl super::View for TableTest {
|
|||
|
||||
ui.vertical_centered(|ui| {
|
||||
egui::reset_button(ui, self);
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ impl super::Demo for InputTest {
|
|||
impl super::View for InputTest {
|
||||
fn ui(&mut self, ui: &mut egui::Ui) {
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
|
||||
let response = ui.add(
|
||||
|
|
|
@ -91,7 +91,7 @@ impl super::View for WidgetGallery {
|
|||
ui.vertical_centered(|ui| {
|
||||
let tooltip_text = "The full egui documentation.\nYou can also click the different widgets names in the left column.";
|
||||
ui.hyperlink("https://docs.rs/egui/").on_hover_text(tooltip_text);
|
||||
ui.add(crate::__egui_github_link_file!(
|
||||
ui.add(crate::egui_github_link_file!(
|
||||
"Source code of the widget gallery"
|
||||
));
|
||||
});
|
||||
|
|
|
@ -135,7 +135,7 @@ impl super::View for WindowOptions {
|
|||
self.disabled_time = ui.input().time;
|
||||
}
|
||||
egui::reset_button(ui, self);
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ impl FractalClock {
|
|||
"Inspired by a screensaver by Rob Mayoff",
|
||||
"http://www.dqd.com/~mayoff/programs/FractalClock/",
|
||||
);
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
ui.add(crate::egui_github_link_file!());
|
||||
}
|
||||
|
||||
fn paint(&mut self, painter: &Painter) {
|
||||
|
|
|
@ -58,7 +58,7 @@ impl epi::App for HttpApp {
|
|||
egui::TopBottomPanel::bottom("http_bottom").show(ctx, |ui| {
|
||||
let layout = egui::Layout::top_down(egui::Align::Center).with_main_justify(true);
|
||||
ui.allocate_ui_with_layout(ui.available_size(), layout, |ui| {
|
||||
ui.add(crate::__egui_github_link_file!())
|
||||
ui.add(crate::egui_github_link_file!())
|
||||
})
|
||||
});
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ impl epi::App for EasyMarkEditor {
|
|||
egui::TopBottomPanel::bottom("easy_mark_bottom").show(ctx, |ui| {
|
||||
let layout = egui::Layout::top_down(egui::Align::Center).with_main_justify(true);
|
||||
ui.allocate_ui_with_layout(ui.available_size(), layout, |ui| {
|
||||
ui.add(crate::__egui_github_link_file!())
|
||||
ui.add(crate::egui_github_link_file!())
|
||||
})
|
||||
});
|
||||
|
||||
|
|
|
@ -19,11 +19,9 @@ pub use wrap_app::WrapApp;
|
|||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// Create a [`Hyperlink`](crate::Hyperlink) to this egui source code file on github.
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
macro_rules! __egui_github_link_file {
|
||||
macro_rules! egui_github_link_file {
|
||||
() => {
|
||||
crate::__egui_github_link_file!("(source code)")
|
||||
crate::egui_github_link_file!("(source code)")
|
||||
};
|
||||
($label: expr) => {
|
||||
egui::github_link_file!(
|
||||
|
@ -32,13 +30,12 @@ macro_rules! __egui_github_link_file {
|
|||
)
|
||||
};
|
||||
}
|
||||
pub(crate) use egui_github_link_file;
|
||||
|
||||
/// Create a [`Hyperlink`](crate::Hyperlink) to this egui source code file and line on github.
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
macro_rules! __egui_github_link_file_line {
|
||||
macro_rules! egui_github_link_file_line {
|
||||
() => {
|
||||
crate::__egui_github_link_file_line!("(source code)")
|
||||
crate::egui_github_link_file_line!("(source code)")
|
||||
};
|
||||
($label: expr) => {
|
||||
egui::github_link_file_line!(
|
||||
|
@ -47,6 +44,7 @@ macro_rules! __egui_github_link_file_line {
|
|||
)
|
||||
};
|
||||
}
|
||||
pub(crate) use egui_github_link_file_line;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ pub use crate::strip::*;
|
|||
pub use crate::table::*;
|
||||
|
||||
/// Log an error with either `tracing` or `eprintln`
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
macro_rules! log_err {
|
||||
($fmt: literal, $($arg: tt)*) => {{
|
||||
#[cfg(feature = "tracing")]
|
||||
|
@ -35,10 +33,9 @@ macro_rules! log_err {
|
|||
);
|
||||
}};
|
||||
}
|
||||
pub(crate) use log_err;
|
||||
|
||||
/// Panic in debug builds, log otherwise.
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
macro_rules! log_or_panic {
|
||||
($fmt: literal, $($arg: tt)*) => {{
|
||||
if cfg!(debug_assertions) {
|
||||
|
@ -48,3 +45,4 @@ macro_rules! log_or_panic {
|
|||
}
|
||||
}};
|
||||
}
|
||||
pub(crate) use log_or_panic;
|
||||
|
|
|
@ -89,21 +89,19 @@ pub fn check_for_gl_error_impl(gl: &glow::Context, file: &str, line: u32, contex
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Profiling macro for feature "puffin"
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
macro_rules! profile_function {
|
||||
($($arg: tt)*) => {
|
||||
#[cfg(feature = "puffin")]
|
||||
puffin::profile_function!($($arg)*);
|
||||
};
|
||||
}
|
||||
pub(crate) use profile_function;
|
||||
|
||||
/// Profiling macro for feature "puffin"
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
macro_rules! profile_scope {
|
||||
($($arg: tt)*) => {
|
||||
#[cfg(feature = "puffin")]
|
||||
puffin::profile_scope!($($arg)*);
|
||||
};
|
||||
}
|
||||
pub(crate) use profile_scope;
|
||||
|
|
Loading…
Reference in a new issue