pub struct Ui {Show 18 fields
pub grids: Vec<Grid>,
pub draw_order: Vec<DrawItem>,
pub float_windows_start: usize,
pub cursor: CursorInfo,
pub mouse: bool,
pub highlights: Vec<Option<Attributes>>,
pub highlight_groups: HashMap<String, HlId>,
pub did_highlights_change: bool,
pub current_mode: u32,
pub modes: Vec<ModeInfo>,
pub guifont_update: Option<GuiFont>,
pub default_colors: DefaultColorsSet,
pub messages: Messages,
pub cmdline: Cmdline,
pub popupmenu: Option<PopupmenuShow>,
pub tabline: Option<TablineUpdate>,
pub did_flush: bool,
pub ignore_next_scroll: bool,
}Expand description
Manages updates to the UI state from UI events
Fields§
§grids: Vec<Grid>UI grids, ordered by ID
draw_order: Vec<DrawItem>The order in which grids should be drawn, ordered from bottom to top
float_windows_start: usizeThe index into self.draw_order at which floating windows begin
cursor: CursorInfoCursor information
mouse: boolWhether the mouse is enabled
highlights: Vec<Option<Attributes>>UI highlights, indexed by their ID
highlight_groups: HashMap<String, HlId>A lookup from highlight names to highlight IDs
did_highlights_change: boolWhether the highlights changed since the last flush
current_mode: u32The ID of the current mode
modes: Vec<ModeInfo>Information about Vim modes, indexed by ID
guifont_update: Option<GuiFont>UI options set by the option_set event
default_colors: DefaultColorsSetDefault highlight colors
messages: MessagesManages ext_hlstate events
cmdline: CmdlineManages ext_cmdline events
Manages ext_popupmenu events
tabline: Option<TablineUpdate>Manages ext_tabline events
did_flush: boolDid we receive a flush event?
ignore_next_scroll: boolImplementations§
Source§impl Ui
impl Ui
pub fn new() -> Self
Sourcepub fn grid_index(&self, id: Id) -> Result<usize, usize>
pub fn grid_index(&self, id: Id) -> Result<usize, usize>
Index of the grid with the given id, or else the index where the grid should be inserted
Sourcepub fn clear_dirty(&mut self)
pub fn clear_dirty(&mut self)
Reset dirty flags
Sourcepub fn position(&self, grid: Id) -> Option<CellVec<f32>>
pub fn position(&self, grid: Id) -> Option<CellVec<f32>>
Get the position of the grid, accounting for anchor grids and other windowing details
Sourcepub fn grid_under_cursor(
&self,
cursor: PixelVec<u32>,
cell_size: Vec2<u32>,
) -> Option<GridUnderCursor>
pub fn grid_under_cursor( &self, cursor: PixelVec<u32>, cell_size: Vec2<u32>, ) -> Option<GridUnderCursor>
The grid under the cursor, accounting for anchor grids and other windowing details