2022-06-26 23:26:42 +01:00
|
|
|
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
|
2021-11-19 22:30:38 +09:00
|
|
|
|
2023-12-22 10:25:00 +09:00
|
|
|
export const PageTextDirectionType = {
|
|
|
|
LEFT_TO_RIGHT_TOP_TO_BOTTOM: "lrTb",
|
|
|
|
TOP_TO_BOTTOM_RIGHT_TO_LEFT: "tbRl",
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
class PageTextDirectionAttributes extends XmlAttributeComponent<{
|
|
|
|
readonly val: (typeof PageTextDirectionType)[keyof typeof PageTextDirectionType];
|
|
|
|
}> {
|
2021-11-19 22:30:38 +09:00
|
|
|
protected readonly xmlKeys = { val: "w:val" };
|
|
|
|
}
|
|
|
|
|
2021-11-26 15:07:15 +00:00
|
|
|
export class PageTextDirection extends XmlComponent {
|
2023-12-22 10:25:00 +09:00
|
|
|
public constructor(value: (typeof PageTextDirectionType)[keyof typeof PageTextDirectionType]) {
|
2021-11-19 22:30:38 +09:00
|
|
|
super("w:textDirection");
|
|
|
|
|
|
|
|
this.root.push(
|
|
|
|
new PageTextDirectionAttributes({
|
|
|
|
val: value,
|
|
|
|
}),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|