diagram_io/src/windows.rs#
Source: lib/diagram_io/src/windows.rs
windows -- the drawing window of a document's windows part (DF-10): the page it shows, the
zoom, the centre and what is shown, so that a file opens as it was saved
windows::drawing_window(&doc) -> Option<DrawingWindow> the first window of type Drawing
windows::set_drawing_window(&mut doc, &w) that window replaced by `w` (its ID and state
kept), added before the others when there is none, a part of
its own when the document has none; the other windows (stencils,
panes) stay as written
DrawingWindow { page, view_scale, center, show_* } None: not written / not in the file
ViewScale is the zoom (1 = 100 %); Visio writes -1 for "whole page" and -2 for "page width".
ViewCenterX/Y are the point in the window's middle, in inches from the page's lower left
corner. The stencil windows are template.rs's (stencil_windows, set_stencil_windows).
struct DrawingWindowwhat the drawing window showspage: Option<u32>-- the page's ID (Page)view_scale: Option<f64>-- the zoom, 1 = 100 %; -1 the whole page, -2 the page's width (ViewScale)center: Option<(f64, f64)>-- the point in the window's middle, inches from the page's lower left cornershow_rulers: Option<bool>-- ShowRulersshow_grid: Option<bool>-- ShowGridshow_page_breaks: Option<bool>-- ShowPageBreaksshow_guides: Option<bool>-- ShowGuidesshow_connection_points: Option<bool>-- ShowConnectionPoints
fn drawing_window(doc: &Document) -> Option<DrawingWindow>the document's drawing window (the first window of type Drawing), None without onefn set_drawing_window(doc: &mut Document, w: &DrawingWindow)make the document's drawing windoww(see the module comment)