Skip to content

Commit

Permalink
Better doc-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Sep 24, 2023
1 parent bad9db8 commit 5566372
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/egui/src/data/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ pub struct PlatformOutput {
pub mutable_text_under_cursor: bool,

/// Screen-space position of text edit cursor (used for IME).
///
/// Iff `Some`, the user is editing text.
pub text_cursor_pos: Option<crate::Pos2>,

#[cfg(feature = "accesskit")]
Expand Down
4 changes: 4 additions & 0 deletions crates/emath/src/rect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ use crate::*;
/// of `min` and `max` are swapped. These are usually a sign of an error.
///
/// Normally the unit is points (logical pixels) in screen space coordinates.
///
/// `Rect` does NOT implement `Default`, because there is no obvious default value.
/// [`Rect::ZERO`] may seem reasonable, but when used as a bounding box, [`Rect::NOTHING`]
/// is a better default - so be explicit instead!
#[repr(C)]
#[derive(Clone, Copy, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
Expand Down

0 comments on commit 5566372

Please sign in to comment.