#[repr(C)]pub struct PaintContext { /* private fields */ }
Expand description
The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters used when painting a document's layout.
C++ class: QAbstractTextDocumentLayout::PaintContext
.
The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters used when painting a document’s layout.
A paint context is used when rendering custom layouts for QTextDocuments with the QAbstractTextDocumentLayout::draw() function. It is specified by a cursor position, default text color, clip rectangle and a collection of selections.
Implementations§
source§impl PaintContext
impl PaintContext
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<PaintContext>>
) -> Ref<PaintContext>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<PaintContext>> ) -> Ref<PaintContext>
The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters used when painting a document's layout.
Calls C++ function: QAbstractTextDocumentLayout::PaintContext& QAbstractTextDocumentLayout::PaintContext::operator=(const QAbstractTextDocumentLayout::PaintContext& other)
.
The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters used when painting a document’s layout.
A paint context is used when rendering custom layouts for QTextDocuments with the QAbstractTextDocumentLayout::draw() function. It is specified by a cursor position, default text color, clip rectangle and a collection of selections.
sourcepub unsafe fn cursor_position(&self) -> c_int
pub unsafe fn cursor_position(&self) -> c_int
Returns the value of the cursorPosition
field.
sourcepub unsafe fn new() -> CppBox<PaintContext>
pub unsafe fn new() -> CppBox<PaintContext>
Calls C++ function: [constructor] void QAbstractTextDocumentLayout::PaintContext::PaintContext()
.
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<PaintContext>>
) -> CppBox<PaintContext>
pub unsafe fn new_copy( other: impl CastInto<Ref<PaintContext>> ) -> CppBox<PaintContext>
The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters used when painting a document's layout.
Calls C++ function: [constructor] void QAbstractTextDocumentLayout::PaintContext::PaintContext(const QAbstractTextDocumentLayout::PaintContext& other)
.
The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters used when painting a document’s layout.
A paint context is used when rendering custom layouts for QTextDocuments with the QAbstractTextDocumentLayout::draw() function. It is specified by a cursor position, default text color, clip rectangle and a collection of selections.
sourcepub unsafe fn palette_mut(&self) -> Ref<QPalette>
pub unsafe fn palette_mut(&self) -> Ref<QPalette>
Returns a mutable reference to the palette
field.
sourcepub unsafe fn selections(&self) -> Ref<QVectorOfSelection>
pub unsafe fn selections(&self) -> Ref<QVectorOfSelection>
Returns a reference to the selections
field.
sourcepub unsafe fn selections_mut(&self) -> Ref<QVectorOfSelection>
pub unsafe fn selections_mut(&self) -> Ref<QVectorOfSelection>
Returns a mutable reference to the selections
field.
sourcepub unsafe fn set_clip(&self, value: impl CastInto<Ref<QRectF>>)
pub unsafe fn set_clip(&self, value: impl CastInto<Ref<QRectF>>)
Sets the value of the clip
field.
sourcepub unsafe fn set_cursor_position(&self, value: c_int)
pub unsafe fn set_cursor_position(&self, value: c_int)
Sets the value of the cursorPosition
field.
sourcepub unsafe fn set_palette(&self, value: impl CastInto<Ref<QPalette>>)
pub unsafe fn set_palette(&self, value: impl CastInto<Ref<QPalette>>)
Sets the value of the palette
field.
sourcepub unsafe fn set_selections(
&self,
value: impl CastInto<Ref<QVectorOfSelection>>
)
pub unsafe fn set_selections( &self, value: impl CastInto<Ref<QVectorOfSelection>> )
Sets the value of the selections
field.
Trait Implementations§
source§impl CppDeletable for PaintContext
impl CppDeletable for PaintContext
source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters used when painting a document's layout.
Calls C++ function: [destructor] void QAbstractTextDocumentLayout::PaintContext::~PaintContext()
.
The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters used when painting a document’s layout.
A paint context is used when rendering custom layouts for QTextDocuments with the QAbstractTextDocumentLayout::draw() function. It is specified by a cursor position, default text color, clip rectangle and a collection of selections.