Skip to content

Commit

Permalink
[libgui - Rust] Derived Bordered implementation forwards more trait m…
Browse files Browse the repository at this point in the history
…ethods to the underlying View
  • Loading branch information
codyd51 committed Feb 13, 2024
1 parent 44256ea commit 607753e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rust_programs/libgui_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ fn impl_bordered_derive(ast: &syn::DeriveInput) -> TokenStream {
fn draw_inner_content(&self, outer_frame: Rect, onto: &mut Box<dyn LikeLayerSlice>) {
self.view.draw_inner_content(outer_frame, onto);
}

fn draw_border_with_insets(&self, onto: &mut Box<dyn LikeLayerSlice>) -> Rect {
self.view.draw_border_with_insets(onto)
}

fn draw_border(&self) -> Rect {
self.view.draw_border()
}
}
};
gen.into()
Expand Down

0 comments on commit 607753e

Please sign in to comment.