TextFrame

TextFrame — Aspose.Slides FOSS for C++ API Reference

Enumerations TextFrame class quản lý nội dung văn bản của một AutoShape hoặc bảng Cell. Nó chứa các đoạn văn và cung cấp quyền truy cập văn bản trực tiếp.

Enumerations: Aspose::Slides::Foss

#include <Aspose/Slides/Foss/text_frame.h>
class TextFrame

Enumerations: include/Aspose/Slides/Foss/text_frame.h


Enumerations

EnumerationsEnumerationsEnumerations
text()EnumerationsTrả về văn bản đã nối của tất cả các đoạn văn.
set_text(const std::string&)EnumerationsThay thế toàn bộ nội dung văn bản.

Giao diện ITextFrame

Enumerations ITextFrame giao diện (từ i_text_frame.h) định nghĩa:

EnumerationsEnumerations
text()Lấy nội dung văn bản.
set_text(const std::string&)Đặt nội dung văn bản.

Giao diện ITextFrameFormat

Enumerations ITextFrameFormat giao diện điều khiển bố cục khung văn bản:

EnumerationsEnumerationsEnumerations
margin_left() / set_margin_left(double)Đọc/GhiLề trái tính bằng điểm.
margin_right() / set_margin_right(double)Đọc/GhiLề phải tính bằng điểm.
margin_top() / set_margin_top(double)Đọc/GhiLề trên tính bằng điểm.
margin_bottom() / set_margin_bottom(double)Đọc/GhiLề dưới tính bằng điểm.
wrap_text() / set_wrap_text(NullableBool)Đọc/GhiCó tự động ngắt dòng hay không.
anchoring_type() / set_anchoring_type(TextAnchorType)Đọc/GhiNeo văn bản dọc.
center_text() / set_center_text(NullableBool)Đọc/GhiLiệu văn bản có được căn giữa theo chiều dọc hay không.

Ví dụ sử dụng

#include <Aspose/Slides/Foss/presentation.h>
using namespace Aspose::Slides::Foss;

Presentation prs("deck.pptx");
auto& shape = prs.slides()[0].shapes()[0];
// If shape is an AutoShape with a TextFrame:
// auto& tf = shape.text_frame();
// std::cout << tf.text() << std::endl;
// tf.set_text("Updated text");

Xem Thêm

 Tiếng Việt