floating_ui/floating_ui/utils/
client_rect_object.rs1use super::{Axis, Coords, Dimensions, Length, Rect, Side, SideObject};
2use crate::utils_::{extends, index};
3
4pub struct ClientRectObject {
5 pub x: f64,
6 pub y: f64,
7 pub width: f64,
8 pub height: f64,
9 pub top: f64,
10 pub right: f64,
11 pub bottom: f64,
12 pub left: f64,
13}
14
15extends!(ClientRectObject => Rect, x, y, width, height);
16extends!(ClientRectObject => Coords, x, y);
17extends!(ClientRectObject => Dimensions, width, height);
18index!(ClientRectObject, Axis { X, Y } => f64);
19index!(ClientRectObject, Length { Width, Height } => f64);
20
21extends!(ClientRectObject => SideObject, top, right, bottom, left);
22index!(ClientRectObject, Side { Top, Right, Bottom, Left } => f64);