AtxHeadingBlock
ภาพรวม
AtxHeadingBlock เป็นคลาสใน Aspose.Words FOSS สำหรับ Python. สืบทอดจาก: HeadingBlock.
AtxHeadingBlock แสดงหัวเรื่องสไตล์ ATX และให้คุณสมบัติ level พร้อมเมธอด add_child(child) / get_parent() สำหรับการจัดการต้นไม้.
คลาสนี้มีเมธอด 5 ตัวสำหรับทำงานกับวัตถุ AtxHeadingBlock ในโปรแกรม Python. เมธอดที่พร้อมใช้งานรวมถึง: __init__, add_child, get_parent. สมาชิกสาธารณะทั้งหมดสามารถเข้าถึงได้โดยแอปพลิเคชัน Python ใด ๆ หลังจากติดตั้งแพ็กเกจ Aspose.Words FOSS สำหรับ Python. คุณสมบัติ: block_level, children, is_first_child, is_last_child, level, next_sibling และอีก 3 รายการ.
คุณสมบัติ
| ชื่อ | ประเภท | การเข้าถึง | คำอธิบาย |
|---|---|---|---|
level | `` | อ่าน | รับระดับ. |
is_first_child | bool | อ่าน | รับค่า is first child. |
is_last_child | bool | อ่าน | รับค่า IsLastChild. |
next_sibling | Optional["Block"] | อ่าน | ดึงโหนดพี่น้องถัดไป. |
previous_sibling | Optional["Block"] | อ่าน | รับพี่น้องก่อนหน้า. |
block_level | MarkdownBlockLevel | อ่าน | รับระดับบล็อก. |
type | `` | อ่าน | รับประเภท. |
parent | Optional["Block"] | อ่าน | รับโหนดแม่. |
children | list["Block"] | อ่าน | รับบล็อกลูก. |
วิธีการ
| ลายเซ็น | คำอธิบาย |
|---|---|
__init__(level: int) | Calls init(ระดับ) บนอินสแตนซ์ AtxHeadingBlock นี้. |
__init__(block_type: BlockType, level: int) | Calls init(block_type, ระดับ) บนอินสแตนซ์ AtxHeadingBlock นี้. |
__init__(block_type: BlockType) | Calls init(block_type) บนอินสแตนซ์ AtxHeadingBlock นี้. |
add_child(child: "Block") → "Block" | เรียก add_child(child) บนอินสแตนซ์ AtxHeadingBlock นี้. |
get_parent() → Optional["Block"] | เดินขึ้นไปตามสายบรรพบุรุษและคืนบล็อกแรกที่ |
``type`` is one of *types*, or ``None`` if none matches. |