Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4107,6 +4107,14 @@ dependencies = [
"env_logger",
]

[[package]]
name = "text_validation"
version = "0.1.0"
dependencies = [
"eframe",
"env_logger",
]

[[package]]
name = "thiserror"
version = "1.0.66"
Expand Down
6 changes: 3 additions & 3 deletions crates/egui/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2038,7 +2038,7 @@ impl Ui {
/// No newlines (`\n`) allowed. Pressing enter key will result in the [`TextEdit`] losing focus (`response.lost_focus`).
///
/// See also [`TextEdit`].
pub fn text_edit_singleline<S: widgets::text_edit::TextBuffer>(
pub fn text_edit_singleline<S: widgets::text_edit::TextType>(
&mut self,
text: &mut S,
) -> Response {
Expand All @@ -2048,7 +2048,7 @@ impl Ui {
/// A [`TextEdit`] for multiple lines. Pressing enter key will create a new line.
///
/// See also [`TextEdit`].
pub fn text_edit_multiline<S: widgets::text_edit::TextBuffer>(
pub fn text_edit_multiline<S: widgets::text_edit::TextType>(
&mut self,
text: &mut S,
) -> Response {
Expand All @@ -2060,7 +2060,7 @@ impl Ui {
/// This will be multiline, monospace, and will insert tabs instead of moving focus.
///
/// See also [`TextEdit::code_editor`].
pub fn code_editor<S: widgets::text_edit::TextBuffer>(&mut self, text: &mut S) -> Response {
pub fn code_editor<S: widgets::text_edit::TextType>(&mut self, text: &mut S) -> Response {
self.add(TextEdit::multiline(text).code_editor())
}

Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub use self::{
separator::Separator,
slider::{Slider, SliderClamping, SliderOrientation},
spinner::Spinner,
text_edit::{TextBuffer, TextEdit},
text_edit::{TextBuffer, TextEdit, TextType},
};

// ----------------------------------------------------------------------------
Expand Down
Loading