1use dear_implot_sys as sys;
41
42#[allow(non_snake_case)]
49pub(crate) mod compat_ffi {
50 use super::sys;
51 use std::os::raw::c_char;
52
53 unsafe extern "C" {
54 pub fn ImPlot_GetPlotPos() -> sys::ImVec2;
55 pub fn ImPlot_GetPlotSize() -> sys::ImVec2;
56 }
57
58 #[cfg(target_arch = "wasm32")]
64 #[link(wasm_import_module = "imgui-sys-v0")]
65 unsafe extern "C" {
66 pub fn ImPlot_Annotation_Str0(
67 x: f64,
68 y: f64,
69 col: sys::ImVec4_c,
70 pix_offset: sys::ImVec2_c,
71 clamp: bool,
72 fmt: *const c_char,
73 );
74 pub fn ImPlot_TagX_Str0(x: f64, col: sys::ImVec4_c, fmt: *const c_char);
75 pub fn ImPlot_TagY_Str0(y: f64, col: sys::ImVec4_c, fmt: *const c_char);
76 }
77
78 #[cfg(not(target_arch = "wasm32"))]
79 unsafe extern "C" {
80 pub fn ImPlot_Annotation_Str0(
81 x: f64,
82 y: f64,
83 col: sys::ImVec4_c,
84 pix_offset: sys::ImVec2_c,
85 clamp: bool,
86 fmt: *const c_char,
87 );
88 pub fn ImPlot_TagX_Str0(x: f64, col: sys::ImVec4_c, fmt: *const c_char);
89 pub fn ImPlot_TagY_Str0(y: f64, col: sys::ImVec4_c, fmt: *const c_char);
90 }
91}
92
93pub use dear_imgui_rs::{Context, Ui};
95pub use sys::{ImPlotPoint, ImPlotRange, ImPlotRect};
96pub use sys::{ImTextureID, ImVec2, ImVec4};
97
98mod advanced;
99mod axis_types;
100mod colormap;
101mod colors;
102mod context;
103mod flags;
104mod histogram_bins;
105mod markers;
106mod plot_types;
107mod style;
108mod ui_ext;
109mod utils;
110
111pub mod plots;
113
114pub use axis_types::{Axis, XAxis, YAxis, YAxisChoice};
115pub(crate) use axis_types::{IMPLOT_AUTO, y_axis_choice_option_to_i32};
116pub use colormap::Colormap;
117pub use colors::PlotColorElement;
118pub use context::*;
119pub use flags::*;
120pub use histogram_bins::{BinMethod, HistogramBins};
121pub use markers::Marker;
122pub use plot_types::{PlotCond, PlotLocation, PlotOrientation};
123pub use style::*;
124pub use ui_ext::ImPlotExt;
125pub use utils::*;
126
127pub use plots::{
129 Plot, PlotData, PlotDataLayout, PlotDataOffset, PlotDataStride, PlotError,
130 bar::{BarPlot, PositionalBarPlot},
131 error_bars::{AsymmetricErrorBarsPlot, ErrorBarsPlot, SimpleErrorBarsPlot},
132 heatmap::{HeatmapPlot, HeatmapPlotF32},
133 histogram::{Histogram2DPlot, HistogramPlot},
134 line::{LinePlot, SimpleLinePlot},
135 pie::{PieChartPlot, PieChartPlotF32},
136 polygon::PolygonPlot,
137 scatter::{ScatterPlot, SimpleScatterPlot},
138 shaded::{ShadedBetweenPlot, ShadedPlot, SimpleShadedPlot},
139 stems::{SimpleStemPlot, StemPlot},
140};
141
142pub use plots::*;
144
145pub use advanced::{
147 LegendFlags, LegendLocation, LegendManager, LegendToken, MultiAxisPlot, MultiAxisToken,
148 SubplotFlags, SubplotGrid, SubplotToken, YAxisConfig,
149};