Struct qt_gui::QBackingStore
source · #[repr(C)]pub struct QBackingStore { /* private fields */ }
Expand description
The QBackingStore class provides a drawing area for QWindow.
C++ class: QBackingStore
.
The QBackingStore class provides a drawing area for QWindow.
QBackingStore enables the use of QPainter to paint on a QWindow with type RasterSurface. The other way of rendering to a QWindow is through the use of OpenGL with QOpenGLContext.
A QBackingStore contains a buffered representation of the window contents, and thus supports partial updates by using QPainter to only update a sub region of the window contents.
QBackingStore might be used by an application that wants to use QPainter without OpenGL acceleration and without the extra overhead of using the QWidget or QGraphicsView UI stacks. For an example of how to use QBackingStore see the Raster Window Example.
Implementations§
source§impl QBackingStore
impl QBackingStore
sourcepub unsafe fn begin_paint(&self, arg1: impl CastInto<Ref<QRegion>>)
pub unsafe fn begin_paint(&self, arg1: impl CastInto<Ref<QRegion>>)
This function is called before painting onto the surface begins, with the region in which the painting will occur.
Calls C++ function: void QBackingStore::beginPaint(const QRegion& arg1)
.
This function is called before painting onto the surface begins, with the region in which the painting will occur.
See also endPaint() and paintDevice().
sourcepub unsafe fn end_paint(&self)
pub unsafe fn end_paint(&self)
This function is called after painting onto the surface has ended.
Calls C++ function: void QBackingStore::endPaint()
.
This function is called after painting onto the surface has ended.
See also beginPaint() and paintDevice().
sourcepub unsafe fn flush_3a(
&self,
region: impl CastInto<Ref<QRegion>>,
window: impl CastInto<Ptr<QWindow>>,
offset: impl CastInto<Ref<QPoint>>
)
pub unsafe fn flush_3a( &self, region: impl CastInto<Ref<QRegion>>, window: impl CastInto<Ptr<QWindow>>, offset: impl CastInto<Ref<QPoint>> )
Flushes the given region from the specified window win onto the screen.
Calls C++ function: void QBackingStore::flush(const QRegion& region, QWindow* window = …, const QPoint& offset = …)
.
Flushes the given region from the specified window win onto the screen.
Note that the offset parameter is currently unused.
sourcepub unsafe fn flush_2a(
&self,
region: impl CastInto<Ref<QRegion>>,
window: impl CastInto<Ptr<QWindow>>
)
pub unsafe fn flush_2a( &self, region: impl CastInto<Ref<QRegion>>, window: impl CastInto<Ptr<QWindow>> )
Flushes the given region from the specified window win onto the screen.
Calls C++ function: void QBackingStore::flush(const QRegion& region, QWindow* window = …)
.
Flushes the given region from the specified window win onto the screen.
Note that the offset parameter is currently unused.
sourcepub unsafe fn flush_1a(&self, region: impl CastInto<Ref<QRegion>>)
pub unsafe fn flush_1a(&self, region: impl CastInto<Ref<QRegion>>)
Flushes the given region from the specified window win onto the screen.
Calls C++ function: void QBackingStore::flush(const QRegion& region)
.
Flushes the given region from the specified window win onto the screen.
Note that the offset parameter is currently unused.
sourcepub unsafe fn has_static_contents(&self) -> bool
pub unsafe fn has_static_contents(&self) -> bool
Returns a boolean indicating if this window has static contents or not.
Calls C++ function: bool QBackingStore::hasStaticContents() const
.
Returns a boolean indicating if this window has static contents or not.
sourcepub unsafe fn new(window: impl CastInto<Ptr<QWindow>>) -> CppBox<QBackingStore>
pub unsafe fn new(window: impl CastInto<Ptr<QWindow>>) -> CppBox<QBackingStore>
Constructs an empty surface for the given top-level window.
Calls C++ function: [constructor] void QBackingStore::QBackingStore(QWindow* window)
.
Constructs an empty surface for the given top-level window.
sourcepub unsafe fn paint_device(&self) -> Ptr<QPaintDevice>
pub unsafe fn paint_device(&self) -> Ptr<QPaintDevice>
Implement this function to return the appropriate paint device.
Calls C++ function: QPaintDevice* QBackingStore::paintDevice()
.
Implement this function to return the appropriate paint device.
sourcepub unsafe fn resize(&self, size: impl CastInto<Ref<QSize>>)
pub unsafe fn resize(&self, size: impl CastInto<Ref<QSize>>)
Sets the size of the windowsurface to be size.
Calls C++ function: void QBackingStore::resize(const QSize& size)
.
Sets the size of the windowsurface to be size.
See also size().
sourcepub unsafe fn scroll(
&self,
area: impl CastInto<Ref<QRegion>>,
dx: c_int,
dy: c_int
) -> bool
pub unsafe fn scroll( &self, area: impl CastInto<Ref<QRegion>>, dx: c_int, dy: c_int ) -> bool
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative.
Calls C++ function: bool QBackingStore::scroll(const QRegion& area, int dx, int dy)
.
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative.
Returns true
if the area was scrolled successfully; false otherwise.
sourcepub unsafe fn set_static_contents(&self, region: impl CastInto<Ref<QRegion>>)
pub unsafe fn set_static_contents(&self, region: impl CastInto<Ref<QRegion>>)
Set region as the static contents of this window.
Calls C++ function: void QBackingStore::setStaticContents(const QRegion& region)
.
Set region as the static contents of this window.
See also staticContents().
sourcepub unsafe fn size(&self) -> CppBox<QSize>
pub unsafe fn size(&self) -> CppBox<QSize>
Returns the current size of the windowsurface.
Calls C++ function: QSize QBackingStore::size() const
.
Returns the current size of the windowsurface.
sourcepub unsafe fn static_contents(&self) -> CppBox<QRegion>
pub unsafe fn static_contents(&self) -> CppBox<QRegion>
Returns a pointer to the QRegion that has the static contents of this window.
Calls C++ function: QRegion QBackingStore::staticContents() const
.
Returns a pointer to the QRegion that has the static contents of this window.
See also setStaticContents().