[][src]Struct qt_gui::QBackingStore

#[repr(C)]
pub struct QBackingStore { /* fields omitted */ }

The QBackingStore class provides a drawing area for QWindow.

C++ class: QBackingStore.

C++ documentation:

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.

Methods

impl QBackingStore[src]

pub unsafe fn begin_paint(&mut self, arg1: impl CastInto<Ref<QRegion>>)[src]

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).

C++ documentation:

This function is called before painting onto the surface begins, with the region in which the painting will occur.

See also endPaint() and paintDevice().

pub unsafe fn end_paint(&mut self)[src]

This function is called after painting onto the surface has ended.

Calls C++ function: void QBackingStore::endPaint().

C++ documentation:

This function is called after painting onto the surface has ended.

See also beginPaint() and paintDevice().

pub unsafe fn flush_3a(
    &mut self,
    region: impl CastInto<Ref<QRegion>>,
    window: impl CastInto<MutPtr<QWindow>>,
    offset: impl CastInto<Ref<QPoint>>
)
[src]

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 = …).

C++ documentation:

Flushes the given region from the specified window win onto the screen.

Note that the offset parameter is currently unused.

pub unsafe fn flush_2a(
    &mut self,
    region: impl CastInto<Ref<QRegion>>,
    window: impl CastInto<MutPtr<QWindow>>
)
[src]

Flushes the given region from the specified window win onto the screen.

Calls C++ function: void QBackingStore::flush(const QRegion& region, QWindow* window = …).

C++ documentation:

Flushes the given region from the specified window win onto the screen.

Note that the offset parameter is currently unused.

pub unsafe fn flush_1a(&mut self, region: impl CastInto<Ref<QRegion>>)[src]

Flushes the given region from the specified window win onto the screen.

Calls C++ function: void QBackingStore::flush(const QRegion& region).

C++ documentation:

Flushes the given region from the specified window win onto the screen.

Note that the offset parameter is currently unused.

pub unsafe fn has_static_contents(&self) -> bool[src]

Returns a boolean indicating if this window has static contents or not.

Calls C++ function: bool QBackingStore::hasStaticContents() const.

C++ documentation:

Returns a boolean indicating if this window has static contents or not.

pub unsafe fn new(
    window: impl CastInto<MutPtr<QWindow>>
) -> CppBox<QBackingStore>
[src]

Constructs an empty surface for the given top-level window.

Calls C++ function: [constructor] void QBackingStore::QBackingStore(QWindow* window).

C++ documentation:

Constructs an empty surface for the given top-level window.

pub unsafe fn paint_device(&mut self) -> MutPtr<QPaintDevice>[src]

Implement this function to return the appropriate paint device.

Calls C++ function: QPaintDevice* QBackingStore::paintDevice().

C++ documentation:

Implement this function to return the appropriate paint device.

pub unsafe fn resize(&mut self, size: impl CastInto<Ref<QSize>>)[src]

Sets the size of the windowsurface to be size.

Calls C++ function: void QBackingStore::resize(const QSize& size).

C++ documentation:

Sets the size of the windowsurface to be size.

See also size().

pub unsafe fn scroll(
    &mut self,
    area: impl CastInto<Ref<QRegion>>,
    dx: c_int,
    dy: c_int
) -> bool
[src]

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).

C++ documentation:

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.

pub unsafe fn set_static_contents(
    &mut self,
    region: impl CastInto<Ref<QRegion>>
)
[src]

Set region as the static contents of this window.

Calls C++ function: void QBackingStore::setStaticContents(const QRegion& region).

C++ documentation:

Set region as the static contents of this window.

See also staticContents().

pub unsafe fn size(&self) -> CppBox<QSize>[src]

Returns the current size of the windowsurface.

Calls C++ function: QSize QBackingStore::size() const.

C++ documentation:

Returns the current size of the windowsurface.

pub unsafe fn static_contents(&self) -> CppBox<QRegion>[src]

Returns a pointer to the QRegion that has the static contents of this window.

Calls C++ function: QRegion QBackingStore::staticContents() const.

C++ documentation:

Returns a pointer to the QRegion that has the static contents of this window.

See also setStaticContents().

pub unsafe fn window(&self) -> MutPtr<QWindow>[src]

Returns a pointer to the top-level window associated with this surface.

Calls C++ function: QWindow* QBackingStore::window() const.

C++ documentation:

Returns a pointer to the top-level window associated with this surface.

Trait Implementations

impl CppDeletable for QBackingStore[src]

unsafe fn delete(&mut self)[src]

Destroys this surface.

Calls C++ function: [destructor] void QBackingStore::~QBackingStore().

C++ documentation:

Destroys this surface.

impl Size for QBackingStore[src]

unsafe fn size(&self) -> usize[src]

Returns the current size of the windowsurface.

Calls C++ function: QSize QBackingStore::size() const.

C++ documentation:

Returns the current size of the windowsurface.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.