Module column

Module column 

Source
Expand description

Multi-column layout settings for document sections.

A ColumnSettings describes how a section is divided into multiple columns (다단). In HWPX this maps to <hp:ctrl><hp:colPr> elements appearing after </hp:secPr> in the first run of the first paragraph.

Single-column layout is represented as None on Section, not as a ColumnSettings with one column. This keeps the common case (single column) zero-cost and matches HWPX conventions.

§Examples

use hwpforge_core::column::{ColumnSettings, ColumnType, ColumnLayoutMode, ColumnDef};
use hwpforge_foundation::HwpUnit;

// Equal-width 2-column layout with 4mm gap
let cols = ColumnSettings::equal_columns(2, HwpUnit::from_mm(4.0).unwrap()).unwrap();
assert_eq!(cols.columns.len(), 2);
assert_eq!(cols.column_type, ColumnType::Newspaper);

Structs§

ColumnDef
Individual column dimensions.
ColumnSettings
Multi-column layout settings for a section.

Enums§

ColumnLayoutMode
Column balance strategy.
ColumnType
Column flow type: how text flows between columns.