pub struct ScreenLayout {
pub offset_row: usize,
pub offset_col: usize,
pub screen_rows: usize,
pub screen_cols: usize,
}Expand description
螢幕佈局資訊
管理編輯器視窗的尺寸和滾動位置。
§範例
use wedi_widget::ScreenLayout;
let mut layout = ScreenLayout::new(24, 80);
layout.scroll_to(10, 0); // 滾動到第 10 行
layout.resize(30, 100); // 調整尺寸Fields§
§offset_row: usize視窗頂部顯示的邏輯行號
offset_col: usize水平偏移(單行模式使用)
screen_rows: usize螢幕行數
screen_cols: usize螢幕列數
Implementations§
Source§impl ScreenLayout
impl ScreenLayout
Trait Implementations§
Source§impl Clone for ScreenLayout
impl Clone for ScreenLayout
Source§fn clone(&self) -> ScreenLayout
fn clone(&self) -> ScreenLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScreenLayout
impl Debug for ScreenLayout
impl Copy for ScreenLayout
Auto Trait Implementations§
impl Freeze for ScreenLayout
impl RefUnwindSafe for ScreenLayout
impl Send for ScreenLayout
impl Sync for ScreenLayout
impl Unpin for ScreenLayout
impl UnwindSafe for ScreenLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more