JFLib

diagram_core/src/names.rs#

Source: lib/diagram_core/src/names.rs

names -- the section, row and cell names the model itself refers to, and the style categories

  names::PIN_X ...                 (crate) fixed Syms: every Strings table starts with them
  Category::of(section, cell)      which style a cell inherits from: line, fill (with the
                                   effects) or text; None: only from the master shape

The categories follow the public format description [MS-VSDX] ("Style-to-Shape Inheritance",
"Line Properties", "Fill Properties", "Effect Properties", "Text"): LineStyle carries the
line cells and the LineGradient section, FillStyle the fill and effect cells and the
FillGradient section, TextStyle the Character, Paragraph and Tabs sections and the text block
cells.  The theme cells (ThemeIndex, ColorSchemeIndex ...) and the quick style cells have no
category there; shapes take them from the document's "Theme" style, so they go with fill
(the line and font quick style cells with line and text) -- an assumption the files cannot
test, since every style in them names one style for all three (JD6).
  • enum Category which style sheet a cell inherits from (the style attributes LineStyle, FillStyle, TextStyle)
    • Line -- LineStyle: line cells and the LineGradient section
    • Fill -- FillStyle: fill and effect cells (shadow, bevel, glow, reflection, soft edges, sketch, 3D rotation) and the FillGradient section
    • Text -- TextStyle: the Character, Paragraph and Tabs sections and the text block cells

impl Category

  • fn of(section: Option<&str>, cell: &str) -> Option<Category> the category of a cell; section is the name of its section (None: a single cell)

  • fn of_section(section: &str) -> Option<Category> the category of a whole section (None: rows come only from the master shape)

  • fn named_rows(section: &str) -> bool whether rows of this section are named (N) rather than indexed (IX), after [MS-VSDX] Row_Type

Source: docs/API.md in the JFLib repository.