TextFrame — Aspose.Slides FOSS for C++ API Reference
Examples TextFrame class gestiona el contenido de texto de un AutoShape o tabla Cell. Contiene párrafos y proporciona acceso directo al texto.
Examples: Aspose::Slides::Foss
#include <Aspose/Slides/Foss/text_frame.h>class TextFrameExamples: include/Aspose/Slides/Foss/text_frame.h
Examples
| Examples | Examples | Examples |
|---|---|---|
text() | Examples | Devuelve el texto concatenado de todos los párrafos. |
set_text(const std::string&) | Examples | Reemplaza todo el contenido de texto. |
Interfaz ITextFrame
Examples ITextFrame interfaz (de i_text_frame.h) define:
| Examples | Examples |
|---|---|
text() | Obtener el contenido de texto. |
set_text(const std::string&) | Establecer el contenido de texto. |
Interfaz ITextFrameFormat
Examples ITextFrameFormat interfaz controla el diseño del marco de texto:
| Examples | Examples | Examples |
|---|---|---|
margin_left() / set_margin_left(double) | Lectura/Escritura | Margen izquierdo en puntos. |
margin_right() / set_margin_right(double) | Lectura/Escritura | Margen derecho en puntos. |
margin_top() / set_margin_top(double) | Lectura/Escritura | Margen superior en puntos. |
margin_bottom() / set_margin_bottom(double) | Lectura/Escritura | Margen inferior en puntos. |
wrap_text() / set_wrap_text(NullableBool) | Lectura/Escritura | Si el texto se ajusta. |
anchoring_type() / set_anchoring_type(TextAnchorType) | Lectura/Escritura | Anclaje vertical del texto. |
center_text() / set_center_text(NullableBool) | Lectura/Escritura | Si el texto está centrado verticalmente. |
Ejemplo de uso
#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");