LibreOffice Module sd (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
accessibility::AccessibleViewForwarder Class Referencefinal

#include <AccessibleViewForwarder.hxx>

Inheritance diagram for accessibility::AccessibleViewForwarder:
[legend]
Collaboration diagram for accessibility::AccessibleViewForwarder:
[legend]

Public Member Functions

 AccessibleViewForwarder (SdrPaintView *pView, const OutputDevice &rDevice)
 For the time being, the implementation of this class will not use the member mrDevice. More...
 
virtual ~AccessibleViewForwarder () override
 
virtual ::tools::Rectangle GetVisibleArea () const override
 Returns the area of the underlying document that is visible in the corresponding window. More...
 
virtual Point LogicToPixel (const Point &rPoint) const override
 Transform the specified point from internal coordinates to an absolute screen position. More...
 
virtual Size LogicToPixel (const Size &rSize) const override
 Transform the specified size from internal coordinates to a screen position. More...
 
- Public Member Functions inherited from accessibility::IAccessibleViewForwarder
 IAccessibleViewForwarder ()=default
 
 IAccessibleViewForwarder (IAccessibleViewForwarder const &)=default
 
 IAccessibleViewForwarder (IAccessibleViewForwarder &&)=default
 
IAccessibleViewForwarderoperator= (IAccessibleViewForwarder const &)=default
 
IAccessibleViewForwarderoperator= (IAccessibleViewForwarder &&)=default
 
virtual ~IAccessibleViewForwarder ()
 
virtual tools::Rectangle GetVisibleArea () const=0
 
virtual Point LogicToPixel (const Point &rPoint) const=0
 
virtual Size LogicToPixel (const Size &rSize) const=0
 

Private Member Functions

 AccessibleViewForwarder (AccessibleViewForwarder const &)=delete
 
AccessibleViewForwarderoperator= (AccessibleViewForwarder const &)=delete
 

Private Attributes

SdrPaintViewmpView
 
sal_uInt16 mnWindowId
 

Detailed Description

This class provides the means to transform between internal coordinates and screen coordinates without giving direct access to the underlying view. It represents a certain window. A call to <method>GetVisArea</method> returns the corresponding visible rectangle.

Attention: \n
Note, that modifications of the underlying view that lead to different transformations between internal and screen coordinates or change the validity of the forwarder have to be signaled separately.

Definition at line 40 of file AccessibleViewForwarder.hxx.

Constructor & Destructor Documentation

◆ AccessibleViewForwarder() [1/2]

accessibility::AccessibleViewForwarder::AccessibleViewForwarder ( SdrPaintView pView,
const OutputDevice rDevice 
)

For the time being, the implementation of this class will not use the member mrDevice.

Instead the device is retrieved from the view every time it is used. This is necessary because the device has to stay up-to-date with the current view and the class has to stay compatible. May change in the future.

Definition at line 35 of file AccessibleViewForwarder.cxx.

References a, SdrPaintWindow::GetOutputDevice(), SdrPaintView::GetPaintWindow(), mnWindowId, mpView, mpView, and SdrPaintView::PaintWindowCount().

◆ ~AccessibleViewForwarder()

accessibility::AccessibleViewForwarder::~AccessibleViewForwarder ( )
overridevirtual

Definition at line 53 of file AccessibleViewForwarder.cxx.

◆ AccessibleViewForwarder() [2/2]

accessibility::AccessibleViewForwarder::AccessibleViewForwarder ( AccessibleViewForwarder const &  )
privatedelete

Member Function Documentation

◆ GetVisibleArea()

tools::Rectangle accessibility::AccessibleViewForwarder::GetVisibleArea ( ) const
overridevirtual

Returns the area of the underlying document that is visible in the corresponding window.

Returns
The rectangle of the visible part of the document.

Implements accessibility::IAccessibleViewForwarder.

Definition at line 58 of file AccessibleViewForwarder.cxx.

References SdrPaintView::GetPaintWindow(), SdrPaintWindow::GetVisibleArea(), mnWindowId, mpView, and SdrPaintView::PaintWindowCount().

◆ LogicToPixel() [1/2]

Point accessibility::AccessibleViewForwarder::LogicToPixel ( const Point rPoint) const
overridevirtual

Transform the specified point from internal coordinates to an absolute screen position.

Transform the given point into pixel coordinates.

Parameters
rPointPoint in internal coordinates.
Returns
The same point but in screen coordinates relative to the upper left corner of the (current) screen.

After the pixel coordinates of the window origin are added to make the point coordinates absolute.

Implements accessibility::IAccessibleViewForwarder.

Definition at line 75 of file AccessibleViewForwarder.cxx.

References SdrPaintWindow::GetOutputDevice(), OutputDevice::GetOwnerWindow(), SdrPaintView::GetPaintWindow(), vcl::Window::GetWindowExtentsAbsolute(), OutputDevice::LogicToPixel(), mnWindowId, mpView, SdrPaintView::PaintWindowCount(), and tools::Rectangle::TopLeft().

◆ LogicToPixel() [2/2]

Size accessibility::AccessibleViewForwarder::LogicToPixel ( const Size rSize) const
overridevirtual

Transform the specified size from internal coordinates to a screen position.

Parameters
rSizeSize in internal coordinates.
Returns
The same size but in screen coordinates.

Implements accessibility::IAccessibleViewForwarder.

Definition at line 89 of file AccessibleViewForwarder.cxx.

References SdrPaintWindow::GetOutputDevice(), SdrPaintView::GetPaintWindow(), OutputDevice::LogicToPixel(), mnWindowId, mpView, and SdrPaintView::PaintWindowCount().

◆ operator=()

AccessibleViewForwarder & accessibility::AccessibleViewForwarder::operator= ( AccessibleViewForwarder const &  )
privatedelete

Member Data Documentation

◆ mnWindowId

sal_uInt16 accessibility::AccessibleViewForwarder::mnWindowId
private

◆ mpView

SdrPaintView* accessibility::AccessibleViewForwarder::mpView
private

The documentation for this class was generated from the following files: