There was an error while loading. Please reload this page.
1 parent d188d6f commit d0e8416Copy full SHA for d0e8416
1 file changed
widget/src/text_editor.rs
@@ -698,6 +698,16 @@ where
698
Some(self.line(0)?.ending)
699
}
700
701
+ /// Returns the current boundaries of the [`Content`].
702
+ pub fn bounds(&self) -> Size {
703
+ self.0.borrow().editor.bounds()
704
+ }
705
+
706
+ /// Returns the minimum boundaries to fit the current text in the [`Content`].
707
+ pub fn min_bounds(&self) -> Size {
708
+ self.0.borrow().editor.min_bounds()
709
710
711
/// Returns whether or not the the [`Content`] is empty.
712
pub fn is_empty(&self) -> bool {
713
self.0.borrow().editor.is_empty()
0 commit comments