Skip to content

Commit 4964d76

Browse files
committed
Move WidgetType from output.rs to lib.rs
1 parent e6fe6a6 commit 4964d76

File tree

2 files changed

+26
-24
lines changed

2 files changed

+26
-24
lines changed

egui/src/data/output.rs

+2-23
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! All the data egui returns to the backend at the end of each frame.
22
3+
use crate::WidgetType;
4+
35
/// What egui emits each frame.
46
/// The backend should use this.
57
#[derive(Clone, Default, PartialEq)]
@@ -380,26 +382,3 @@ impl WidgetInfo {
380382
description.trim().to_owned()
381383
}
382384
}
383-
384-
/// The different types of built-in widgets in egui
385-
#[derive(Clone, Copy, Debug, PartialEq)]
386-
pub enum WidgetType {
387-
Label, // TODO: emit Label events
388-
Hyperlink,
389-
TextEdit,
390-
Button,
391-
Checkbox,
392-
RadioButton,
393-
SelectableLabel,
394-
ComboBox,
395-
Slider,
396-
DragValue,
397-
ColorButton,
398-
ImageButton,
399-
CollapsingHeader,
400-
401-
/// If you cannot fit any of the above slots.
402-
///
403-
/// If this is something you think should be added, file an issue.
404-
Other,
405-
}

egui/src/lib.rs

+24-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ pub use {
360360
context::{Context, CtxRef},
361361
data::{
362362
input::*,
363-
output::{self, CursorIcon, Output, WidgetInfo, WidgetType},
363+
output::{self, CursorIcon, Output, WidgetInfo},
364364
},
365365
grid::Grid,
366366
id::Id,
@@ -494,3 +494,26 @@ pub mod special_emojis {
494494

495495
// I really would like to have ferris here.
496496
}
497+
498+
/// The different types of built-in widgets in egui
499+
#[derive(Clone, Copy, Debug, PartialEq)]
500+
pub enum WidgetType {
501+
Label, // TODO: emit Label events
502+
Hyperlink,
503+
TextEdit,
504+
Button,
505+
Checkbox,
506+
RadioButton,
507+
SelectableLabel,
508+
ComboBox,
509+
Slider,
510+
DragValue,
511+
ColorButton,
512+
ImageButton,
513+
CollapsingHeader,
514+
515+
/// If you cannot fit any of the above slots.
516+
///
517+
/// If this is something you think should be added, file an issue.
518+
Other,
519+
}

0 commit comments

Comments
 (0)