From 4964d762a78ee1d531c831136241a27ad673a0ab Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 30 May 2021 22:52:13 +0200 Subject: [PATCH] Move WidgetType from output.rs to lib.rs --- egui/src/data/output.rs | 25 ++----------------------- egui/src/lib.rs | 25 ++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/egui/src/data/output.rs b/egui/src/data/output.rs index d53778d9..ee30f07f 100644 --- a/egui/src/data/output.rs +++ b/egui/src/data/output.rs @@ -1,5 +1,7 @@ //! All the data egui returns to the backend at the end of each frame. +use crate::WidgetType; + /// What egui emits each frame. /// The backend should use this. #[derive(Clone, Default, PartialEq)] @@ -380,26 +382,3 @@ impl WidgetInfo { description.trim().to_owned() } } - -/// The different types of built-in widgets in egui -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum WidgetType { - Label, // TODO: emit Label events - Hyperlink, - TextEdit, - Button, - Checkbox, - RadioButton, - SelectableLabel, - ComboBox, - Slider, - DragValue, - ColorButton, - ImageButton, - CollapsingHeader, - - /// If you cannot fit any of the above slots. - /// - /// If this is something you think should be added, file an issue. - Other, -} diff --git a/egui/src/lib.rs b/egui/src/lib.rs index 7884a890..17b6f021 100644 --- a/egui/src/lib.rs +++ b/egui/src/lib.rs @@ -360,7 +360,7 @@ pub use { context::{Context, CtxRef}, data::{ input::*, - output::{self, CursorIcon, Output, WidgetInfo, WidgetType}, + output::{self, CursorIcon, Output, WidgetInfo}, }, grid::Grid, id::Id, @@ -494,3 +494,26 @@ pub mod special_emojis { // I really would like to have ferris here. } + +/// The different types of built-in widgets in egui +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum WidgetType { + Label, // TODO: emit Label events + Hyperlink, + TextEdit, + Button, + Checkbox, + RadioButton, + SelectableLabel, + ComboBox, + Slider, + DragValue, + ColorButton, + ImageButton, + CollapsingHeader, + + /// If you cannot fit any of the above slots. + /// + /// If this is something you think should be added, file an issue. + Other, +}